summaryrefslogtreecommitdiffstats
path: root/chromium/cc/layers/texture_layer_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/cc/layers/texture_layer_impl.h')
-rw-r--r--chromium/cc/layers/texture_layer_impl.h44
1 files changed, 15 insertions, 29 deletions
diff --git a/chromium/cc/layers/texture_layer_impl.h b/chromium/cc/layers/texture_layer_impl.h
index c20d9604387..82eec95283d 100644
--- a/chromium/cc/layers/texture_layer_impl.h
+++ b/chromium/cc/layers/texture_layer_impl.h
@@ -17,10 +17,8 @@ class ScopedResource;
class CC_EXPORT TextureLayerImpl : public LayerImpl {
public:
- static scoped_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl,
- int id,
- bool uses_mailbox) {
- return make_scoped_ptr(new TextureLayerImpl(tree_impl, id, uses_mailbox));
+ static scoped_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
+ return make_scoped_ptr(new TextureLayerImpl(tree_impl, id));
}
virtual ~TextureLayerImpl();
@@ -32,44 +30,33 @@ class CC_EXPORT TextureLayerImpl : public LayerImpl {
ResourceProvider* resource_provider) OVERRIDE;
virtual void AppendQuads(QuadSink* quad_sink,
AppendQuadsData* append_quads_data) OVERRIDE;
- virtual void DidDraw(ResourceProvider* resource_provider) OVERRIDE;
virtual Region VisibleContentOpaqueRegion() const OVERRIDE;
- virtual void DidLoseOutputSurface() OVERRIDE;
-
- unsigned texture_id() const { return texture_id_; }
- void set_texture_id(unsigned id) { texture_id_ = id; }
- void set_premultiplied_alpha(bool premultiplied_alpha) {
- premultiplied_alpha_ = premultiplied_alpha;
- }
- void set_blend_background_color(bool blend) {
- blend_background_color_ = blend;
- }
- void set_flipped(bool flipped) { flipped_ = flipped; }
- void set_uv_top_left(gfx::PointF top_left) { uv_top_left_ = top_left; }
- void set_uv_bottom_right(gfx::PointF bottom_right) {
- uv_bottom_right_ = bottom_right;
- }
+ virtual void ReleaseResources() OVERRIDE;
+
+ // These setter methods don't cause any implicit damage, so the texture client
+ // must explicitly invalidate if they intend to cause a visible change in the
+ // layer's output.
+ void SetTextureId(unsigned id);
+ void SetPremultipliedAlpha(bool premultiplied_alpha);
+ void SetBlendBackgroundColor(bool blend);
+ void SetFlipped(bool flipped);
+ void SetUVTopLeft(const gfx::PointF top_left);
+ void SetUVBottomRight(const gfx::PointF bottom_right);
// 1--2
// | |
// 0--3
- void set_vertex_opacity(const float vertex_opacity[4]) {
- vertex_opacity_[0] = vertex_opacity[0];
- vertex_opacity_[1] = vertex_opacity[1];
- vertex_opacity_[2] = vertex_opacity[2];
- vertex_opacity_[3] = vertex_opacity[3];
- }
+ void SetVertexOpacity(const float vertex_opacity[4]);
void SetTextureMailbox(const TextureMailbox& mailbox,
scoped_ptr<SingleReleaseCallback> release_callback);
private:
- TextureLayerImpl(LayerTreeImpl* tree_impl, int id, bool uses_mailbox);
+ TextureLayerImpl(LayerTreeImpl* tree_impl, int id);
virtual const char* LayerTypeAsString() const OVERRIDE;
void FreeTextureMailbox();
- unsigned texture_id_;
ResourceProvider::ResourceId external_texture_resource_;
bool premultiplied_alpha_;
bool blend_background_color_;
@@ -82,7 +69,6 @@ class CC_EXPORT TextureLayerImpl : public LayerImpl {
TextureMailbox texture_mailbox_;
scoped_ptr<SingleReleaseCallback> release_callback_;
- bool uses_mailbox_;
bool own_mailbox_;
bool valid_texture_copy_;