Index: cc/layers/texture_layer.h |
diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h |
index d87a9d3fcf385727e9ac59866708b2d0bfee4a1f..5e4a34f46d2710fbe7c98d8195f55be29a2df65d 100644 |
--- a/cc/layers/texture_layer.h |
+++ b/cc/layers/texture_layer.h |
@@ -34,8 +34,16 @@ class CC_EXPORT TextureLayer : public Layer { |
static scoped_refptr<TextureLayer> CreateForMailbox( |
TextureLayerClient* client); |
+ // Resets the client, which also resets the texture. This may synchronize with |
+ // the impl thread if it is currently drawing a texture or a mailbox from the |
+ // client. After this call it is safe to destroy the texture / mailbox. |
void ClearClient(); |
+ // Resets the texture. This may synchronize with the impl thread if it is |
+ // currently drawing a texture or a mailbox from the client. After this call |
+ // it is safe to destroy the texture / mailbox. |
+ void ClearTexture(); |
+ |
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
OVERRIDE; |
@@ -66,15 +74,10 @@ class CC_EXPORT TextureLayer : public Layer { |
// Requires a non-nil client. Defaults to false. |
void SetRateLimitContext(bool rate_limit); |
- // Code path for plugins which supply their own texture ID. |
- void SetTextureId(unsigned texture_id); |
- |
// Code path for plugins which supply their own mailbox. |
bool uses_mailbox() const { return uses_mailbox_; } |
void SetTextureMailbox(const TextureMailbox& mailbox); |
- void WillModifyTexture(); |
- |
virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; |
virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; |
@@ -135,6 +138,10 @@ class CC_EXPORT TextureLayer : public Layer { |
DISALLOW_COPY_AND_ASSIGN(MailboxHolder); |
}; |
+ // Returns true if we draw content coming from the client, which implies we |
+ // may need to synchronize with the impl thread when the client goes away. |
+ bool DrawsClientData() const; |
+ |
TextureLayerClient* client_; |
bool uses_mailbox_; |
@@ -146,7 +153,7 @@ class CC_EXPORT TextureLayer : public Layer { |
bool premultiplied_alpha_; |
bool blend_background_color_; |
bool rate_limit_context_; |
- bool content_committed_; |
+ bool impl_may_draw_client_data_; |
unsigned texture_id_; |
scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; |