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

Unified Diff: cc/layers/layer.cc

Issue 1633203002: cc :: Reland compute if layer is drawn from property trees (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 2519daa55636f354fdef38a564a7d21d0b868dcf..5556bce300de2087bd8318c78914bbdda98431fe 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -100,8 +100,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);
@@ -539,6 +538,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_
@@ -1241,7 +1244,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_) {

Powered by Google App Engine
This is Rietveld 408576698