diff options
author | clholgat@chromium.org <clholgat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-18 03:24:34 +0000 |
---|---|---|
committer | clholgat@chromium.org <clholgat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-18 03:24:34 +0000 |
commit | ad0250b469ec6afbd7cdceab302ec2142ea90ebb (patch) | |
tree | 2488c1a4764074adf78e326f2af1d4e5df897d95 /cc/layers/texture_layer_impl.h | |
parent | b8c7eed238ffa4a47f90df3a077f4ee1daf23569 (diff) | |
download | chromium_src-ad0250b469ec6afbd7cdceab302ec2142ea90ebb.zip chromium_src-ad0250b469ec6afbd7cdceab302ec2142ea90ebb.tar.gz chromium_src-ad0250b469ec6afbd7cdceab302ec2142ea90ebb.tar.bz2 |
Pluming for needs_push_properties for the impl tree.
This change ensures that pending tree is only synced
with the active tree if something has changed on the
pending tree.
Notable performance improvements to BrowserCompositorInvalidateLayerTreePerfTest
Before:
*RESULT layer_tree_host_frame_time: dense_layer_tree= 768.87890625 us
After:
*RESULT layer_tree_host_frame_time: dense_layer_tree= 655.21044921875 us
(run on a Galaxy Nexus running Android 4.3)
BUG=259511
Review URL: https://codereview.chromium.org/25896002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/texture_layer_impl.h')
-rw-r--r-- | cc/layers/texture_layer_impl.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/cc/layers/texture_layer_impl.h b/cc/layers/texture_layer_impl.h index 8f5cab1..50511fe 100644 --- a/cc/layers/texture_layer_impl.h +++ b/cc/layers/texture_layer_impl.h @@ -37,28 +37,21 @@ class CC_EXPORT TextureLayerImpl : public LayerImpl { virtual void ReleaseResources() 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(const gfx::PointF& top_left) { uv_top_left_ = top_left; } - void set_uv_bottom_right(const gfx::PointF& bottom_right) { - uv_bottom_right_ = bottom_right; - } + + // 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); |