Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: cc/texture_mailbox.h

Issue 11888010: Cosmetic cleanup to texture_layer mailboxes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/texture_layer_unittest.cc ('k') | cc/texture_mailbox.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_TEXTURE_MAILBOX_H_
6 #define CC_TEXTURE_MAILBOX_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "cc/cc_export.h"
13 #include "cc/transferable_resource.h"
14
15 namespace cc {
16
17 class CC_EXPORT TextureMailbox {
18 public:
19 typedef base::Callback<void(unsigned)> ReleaseCallback;
20 TextureMailbox();
21 TextureMailbox(const std::string& mailbox_name,
22 const ReleaseCallback& callback);
23 TextureMailbox(const Mailbox& mailbox_name,
24 const ReleaseCallback& callback);
25 ~TextureMailbox();
26
27 const ReleaseCallback& callback() const { return callback_; }
28 const int8* data() const { return name_.name; }
29 bool Equals(const Mailbox&) const;
30 bool Equals(const TextureMailbox&) const;
31 bool IsEmpty() const;
32 const Mailbox& name() const { return name_; }
33 void RunReleaseCallback(unsigned sync_point) const;
34 void SetName(const Mailbox&);
35
36 private:
37 Mailbox name_;
38 ReleaseCallback callback_;
39 };
40
41 } // namespace cc
42
43 #endif // CC_TEXTURE_MAILBOX_H_
OLDNEW
« no previous file with comments | « cc/texture_layer_unittest.cc ('k') | cc/texture_mailbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698