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

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: releasecallback: SingleReleaseCallback 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..5fb214c2c1336bbe4d676cb0fb6dfd85abd08091 100644
--- a/cc/layers/texture_layer.h
+++ b/cc/layers/texture_layer.h
@@ -17,6 +17,7 @@ namespace WebKit { class WebGraphicsContext3D; }
namespace cc {
class BlockingTaskRunner;
+class SingleReleaseCallback;
class TextureLayerClient;
// A Layer containing a the rendered output of a plugin instance.
@@ -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();
+ scoped_ptr<SingleReleaseCallback> 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,
+ scoped_ptr<SingleReleaseCallback> release_callback);
virtual ~MailboxHolder();
private:
friend class base::RefCountedThreadSafe<MailboxHolder>;
friend class MainThreadReference;
- explicit MailboxHolder(const TextureMailbox& mailbox);
+ explicit MailboxHolder(const TextureMailbox& mailbox,
+ scoped_ptr<SingleReleaseCallback> 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_;
+ scoped_ptr<SingleReleaseCallback> 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,
+ scoped_ptr<SingleReleaseCallback> 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