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

Unified Diff: cc/layers/layer.cc

Issue 2110683004: cc: Move filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 5 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 e0e09b5d630c48532175ed6f7c0177344743c140..7d683bd2c065be64c7ef417a403d8abb4a18e9d6 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -1144,8 +1144,6 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
// property trees. So, it is enough to check it only for the current layer.
if (subtree_property_changed_ || layer_property_changed_)
layer->NoteLayerPropertyChanged();
- if (!FilterIsAnimating())
- layer->SetFilters(inputs_.filters);
layer->SetMasksToBounds(inputs_.masks_to_bounds);
layer->set_main_thread_scrolling_reasons(
inputs_.main_thread_scrolling_reasons);
@@ -1733,6 +1731,27 @@ void Layer::OnOpacityIsPotentiallyAnimatingChanged(
property_trees->effect_tree.set_needs_update(true);
}
+void Layer::OnFilterIsCurrentlyAnimatingChanged(bool is_currently_animating) {
+ DCHECK(layer_tree_host_);
+ PropertyTrees* property_trees = layer_tree_host_->property_trees();
+ if (!property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, id()))
+ return;
+ DCHECK_EQ(effect_tree_index(), property_trees->effect_id_to_index_map[id()]);
+ EffectNode* node = property_trees->effect_tree.Node(effect_tree_index());
+ node->is_currently_animating_filter = is_currently_animating;
+}
+
+void Layer::OnFilterIsPotentiallyAnimatingChanged(
+ bool has_potential_animation) {
+ DCHECK(layer_tree_host_);
+ PropertyTrees* property_trees = layer_tree_host_->property_trees();
+ if (!property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, id()))
+ return;
+ DCHECK_EQ(effect_tree_index(), property_trees->effect_id_to_index_map[id()]);
+ EffectNode* node = property_trees->effect_tree.Node(effect_tree_index());
+ node->has_potential_filter_animation = has_potential_animation;
+}
+
bool Layer::HasActiveAnimationForTesting() const {
return layer_tree_host_
? GetAnimationHost()->HasActiveAnimationForTesting(element_id())
« 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