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

Unified Diff: cc/layers/texture_layer.h

Issue 23648014: cc: Move TextureMailbox::ReleaseCallback to SingleReleaseCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/cc.gyp ('k') | cc/layers/texture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698