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_ |