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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2110683004: cc: Move filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ' 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
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 218bc825bf6ef35ff9504e3157922dfa469449fe..ee7a3ed9a408a7b029ecfd459967462a5a39ffab 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -644,7 +644,7 @@ void LayerTreeHostImpl::TrackDamageForAllSurfaces(
render_surface->layer_list(), render_surface,
render_surface->SurfacePropertyChangedOnlyFromDescendant(),
render_surface->content_rect(), render_surface->MaskLayer(),
- render_surface_layer->filters());
+ render_surface->Filters());
}
}
@@ -4005,6 +4005,32 @@ void LayerTreeHostImpl::ElementOpacityIsAnimatingChanged(
}
}
+void LayerTreeHostImpl::ElementFilterIsAnimatingChanged(
+ ElementId element_id,
+ ElementListType list_type,
+ AnimationChangeType change_type,
+ bool is_animating) {
+ LayerTreeImpl* tree =
+ list_type == ElementListType::ACTIVE ? active_tree() : pending_tree();
+ if (!tree)
+ return;
+ LayerImpl* layer = tree->LayerByElementId(element_id);
+ if (layer) {
+ switch (change_type) {
+ case AnimationChangeType::POTENTIAL:
+ layer->OnFilterIsPotentiallyAnimatingChanged(is_animating);
+ break;
+ case AnimationChangeType::RUNNING:
+ layer->OnFilterIsCurrentlyAnimatingChanged(is_animating);
+ break;
+ case AnimationChangeType::BOTH:
+ layer->OnFilterIsPotentiallyAnimatingChanged(is_animating);
+ layer->OnFilterIsCurrentlyAnimatingChanged(is_animating);
+ break;
+ }
+ }
+}
+
void LayerTreeHostImpl::ScrollOffsetAnimationFinished() {
// TODO(majidvp): We should pass in the original starting scroll position here
ScrollStateData scroll_state_data;

Powered by Google App Engine
This is Rietveld 408576698