Index: cc/texture_mailbox.h |
diff --git a/cc/texture_mailbox.h b/cc/texture_mailbox.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bae6e6ae29768a63a5a3774c44a87dbda76d323a |
--- /dev/null |
+++ b/cc/texture_mailbox.h |
@@ -0,0 +1,42 @@ |
+// 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& name, |
+ const ReleaseCallback& callback); |
+ TextureMailbox(const Mailbox& name, |
+ const ReleaseCallback& callback); |
+ ~TextureMailbox(); |
+ |
+ const ReleaseCallback& callback() const { return callback_; } |
+ const int8* data() const { return name_.name; } |
+ bool Equals(const TextureMailbox&) const; |
+ bool IsEmpty() const; |
+ const Mailbox& name() const { return name_; } |
+ void RunReleaseCallback(unsigned sync_point) const; |
+ void SetName(const int8* data); |
piman
2013/01/17 21:30:01
Can we make this take a Mailbox as well? I think i
alexst (slow to review)
2013/01/17 22:10:11
Done.
|
+ |
+ private: |
+ Mailbox name_; |
+ ReleaseCallback callback_; |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_TEXTURE_MAILBOX_H_ |