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

Unified Diff: cc/layers/layer.cc

Issue 16896017: Add a hide_layer_and_subtree() flag to cc::Layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hide-subtree-flag: SetIsDrawable on the new cc_layer Created 7 years, 6 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/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index bdcbc755d15db112782d34e3623ca2b07bd58c53..fcdbded62d351a0d607e5311a5aaedfc9ce6c6ac 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -47,6 +47,7 @@ Layer::Layer()
anchor_point_z_(0.f),
is_container_for_fixed_position_layers_(false),
is_drawable_(false),
+ hide_layer_and_subtree_(false),
masks_to_bounds_(false),
contents_opaque_(false),
double_sided_(true),
@@ -612,6 +613,15 @@ void Layer::SetIsDrawable(bool is_drawable) {
SetNeedsCommit();
}
+void Layer::SetHideLayerAndSubtree(bool hide) {
+ DCHECK(IsPropertyChangeAllowed());
+ if (hide_layer_and_subtree_ == hide)
+ return;
+
+ hide_layer_and_subtree_ = hide;
+ SetNeedsCommit();
+}
+
void Layer::SetNeedsDisplayRect(const gfx::RectF& dirty_rect) {
update_rect_.Union(dirty_rect);
needs_display_ = true;
@@ -682,6 +692,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
draw_checkerboard_for_missing_tiles_);
layer->SetForceRenderSurface(force_render_surface_);
layer->SetDrawsContent(DrawsContent());
+ layer->SetHideLayerAndSubtree(hide_layer_and_subtree_);
layer->SetFilters(filters());
layer->SetFilter(filter());
layer->SetBackgroundFilters(background_filters());
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698