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

Unified Diff: cc/layers/layer.cc

Issue 1588093004: Compute if a layer is drawn without LayerTree hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 9fa27317b5bd4d3b6f48c4f15c456865d2c87ffd..ab5dc1bec629fa86784893a75ad3aa5715d72ee7 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -77,7 +77,6 @@ Layer::Layer(const LayerSettings& settings)
is_container_for_fixed_position_layers_(false),
is_drawable_(false),
draws_content_(false),
- hide_layer_and_subtree_(false),
masks_to_bounds_(false),
contents_opaque_(false),
double_sided_(true),
@@ -99,8 +98,7 @@ Layer::Layer(const LayerSettings& settings)
replica_layer_(nullptr),
client_(nullptr),
num_unclipped_descendants_(0),
- frame_timing_requests_dirty_(false),
- is_hidden_from_property_trees_(false) {
+ frame_timing_requests_dirty_(false) {
if (!settings.use_compositor_animation_timelines) {
layer_animation_controller_ = LayerAnimationController::Create(layer_id_);
layer_animation_controller_->AddValueObserver(this);
@@ -1097,15 +1095,6 @@ void Layer::SetIsDrawable(bool is_drawable) {
UpdateDrawsContent(HasDrawableContent());
}
-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::Rect& dirty_rect) {
if (dirty_rect.IsEmpty())
return;
@@ -1188,7 +1177,6 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->set_offset_to_transform_parent(offset_to_transform_parent_);
layer->SetDoubleSided(double_sided_);
layer->SetDrawsContent(DrawsContent());
- layer->SetHideLayerAndSubtree(hide_layer_and_subtree_);
layer->SetHasRenderSurface(has_render_surface_);
layer->SetForceRenderSurface(force_render_surface_);
if (!layer->FilterIsAnimatingOnImplOnly() && !FilterIsAnimating())
@@ -1228,7 +1216,6 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->set_user_scrollable_vertical(user_scrollable_vertical_);
layer->SetElementId(element_id_);
layer->SetMutableProperties(mutable_properties_);
- layer->set_is_hidden_from_property_trees(is_hidden_from_property_trees_);
LayerImpl* scroll_parent = nullptr;
if (scroll_parent_) {
@@ -1458,7 +1445,6 @@ void Layer::LayerSpecificPropertiesToProto(proto::LayerProperties* proto) {
base->mutable_offset_to_transform_parent());
base->set_double_sided(double_sided_);
base->set_draws_content(draws_content_);
- base->set_hide_layer_and_subtree(hide_layer_and_subtree_);
base->set_has_render_surface(has_render_surface_);
// TODO(nyquist): Add support for serializing FilterOperations for
@@ -1548,7 +1534,6 @@ void Layer::FromLayerSpecificPropertiesProto(
ProtoToVector2dF(base.offset_to_transform_parent());
double_sided_ = base.double_sided();
draws_content_ = base.draws_content();
- hide_layer_and_subtree_ = base.hide_layer_and_subtree();
has_render_surface_ = base.has_render_surface();
masks_to_bounds_ = base.masks_to_bounds();
should_scroll_on_main_thread_ = base.should_scroll_on_main_thread();
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | cc/trees/layer_tree_host_common.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698