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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/texture_layer_unittest.cc ('k') | cc/texture_mailbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_mailbox.h
diff --git a/cc/texture_mailbox.h b/cc/texture_mailbox.h
new file mode 100644
index 0000000000000000000000000000000000000000..178a618a219798695002904bb2b5c86a76255646
--- /dev/null
+++ b/cc/texture_mailbox.h
@@ -0,0 +1,43 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TEXTURE_MAILBOX_H_
+#define CC_TEXTURE_MAILBOX_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/callback.h"
+#include "cc/cc_export.h"
+#include "cc/transferable_resource.h"
+
+namespace cc {
+
+class CC_EXPORT TextureMailbox {
+ public:
+ typedef base::Callback<void(unsigned)> ReleaseCallback;
+ TextureMailbox();
+ TextureMailbox(const std::string& mailbox_name,
+ const ReleaseCallback& callback);
+ TextureMailbox(const Mailbox& mailbox_name,
+ const ReleaseCallback& callback);
+ ~TextureMailbox();
+
+ const ReleaseCallback& callback() const { return callback_; }
+ const int8* data() const { return name_.name; }
+ bool Equals(const Mailbox&) const;
+ bool Equals(const TextureMailbox&) const;
+ bool IsEmpty() const;
+ const Mailbox& name() const { return name_; }
+ void RunReleaseCallback(unsigned sync_point) const;
+ void SetName(const Mailbox&);
+
+ private:
+ Mailbox name_;
+ ReleaseCallback callback_;
+};
+
+} // namespace cc
+
+#endif // CC_TEXTURE_MAILBOX_H_
« 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