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

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
« 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 88043a749aba0d0a3e1087765892c247209569b8..1ebf3ebc47841025c4b790872558538523f4778c 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -98,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);
@@ -537,6 +536,10 @@ void Layer::SetOpacity(float opacity) {
SetNeedsCommit();
}
+float Layer::EffectiveOpacity() const {
+ return hide_layer_and_subtree_ ? 0.f : opacity_;
+}
+
bool Layer::OpacityIsAnimating() const {
DCHECK(layer_tree_host_);
return layer_animation_controller_
@@ -1238,7 +1241,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_) {
« 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