Index: cc/layers/texture_layer.h |
diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h |
index cb34cf5f6e92bcc4337a7a68d483db1a0a37ab69..1bf0f4ff18f717374dfea0c2cdb6a23a456e2625 100644 |
--- a/cc/layers/texture_layer.h |
+++ b/cc/layers/texture_layer.h |
@@ -11,6 +11,7 @@ |
#include "base/synchronization/lock.h" |
#include "cc/base/cc_export.h" |
#include "cc/layers/layer.h" |
+#include "cc/resources/scoped_release_callback.h" |
piman
2013/09/12 01:13:03
File is missing from the CL :(
danakj
2013/09/12 01:20:16
Ooops oops, fixed!
|
#include "cc/resources/texture_mailbox.h" |
namespace WebKit { class WebGraphicsContext3D; } |
@@ -41,20 +42,22 @@ class CC_EXPORT TextureLayer : public Layer { |
// Gets a ReleaseCallback that can be called from another thread. Note: the |
// caller must ensure the callback is called. |
- TextureMailbox::ReleaseCallback GetCallbackForImplThread(); |
+ ScopedReleaseCallback GetCallbackForImplThread(); |
protected: |
friend class TextureLayer; |
// Protected visiblity so only TextureLayer and unit tests can create these. |
static scoped_ptr<MainThreadReference> Create( |
- const TextureMailbox& mailbox); |
+ const TextureMailbox& mailbox, |
+ ScopedReleaseCallback release_callback); |
virtual ~MailboxHolder(); |
private: |
friend class base::RefCountedThreadSafe<MailboxHolder>; |
friend class MainThreadReference; |
- explicit MailboxHolder(const TextureMailbox& mailbox); |
+ explicit MailboxHolder(const TextureMailbox& mailbox, |
+ ScopedReleaseCallback release_callback); |
void InternalAddRef(); |
void InternalRelease(); |
@@ -67,6 +70,7 @@ class CC_EXPORT TextureLayer : public Layer { |
// during commit where the main thread is blocked. |
unsigned internal_references_; |
TextureMailbox mailbox_; |
+ ScopedReleaseCallback release_callback_; |
// This lock guards the sync_point_ and is_lost_ fields because they can be |
// accessed on both the impl and main thread. We do this to ensure that the |
@@ -125,7 +129,8 @@ class CC_EXPORT TextureLayer : public Layer { |
// Code path for plugins which supply their own mailbox. |
bool uses_mailbox() const { return uses_mailbox_; } |
- void SetTextureMailbox(const TextureMailbox& mailbox); |
+ void SetTextureMailbox(const TextureMailbox& mailbox, |
+ ScopedReleaseCallback release_callback); |
void WillModifyTexture(); |