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

Unified Diff: cc/layers/layer_impl.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_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 0c11c6b60fd94b566b7caddd1e6e5d46c1b3afee..254a17f3dac1c42332cde610f686ae94361f7d8b 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -51,6 +51,7 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
use_parent_backface_visibility_(false),
draw_checkerboard_for_missing_tiles_(false),
draws_content_(false),
+ hide_layer_and_subtree_(false),
force_render_surface_(false),
is_container_for_fixed_position_layers_(false),
draw_depth_(0.f),
@@ -368,6 +369,7 @@ void LayerImpl::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());
@@ -604,6 +606,14 @@ void LayerImpl::SetDrawsContent(bool draws_content) {
NoteLayerPropertyChanged();
}
+void LayerImpl::SetHideLayerAndSubtree(bool hide) {
+ if (hide_layer_and_subtree_ == hide)
+ return;
+
+ hide_layer_and_subtree_ = hide;
+ NoteLayerPropertyChangedForSubtree();
+}
+
void LayerImpl::SetAnchorPoint(gfx::PointF anchor_point) {
if (anchor_point_ == anchor_point)
return;
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698