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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 2099743002: cc: Move background filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ' Created 4 years, 6 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/trees/property_tree.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree_builder.cc
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index 7430a24a5d63c868d90d0bd4fc868ceeef0aab96..c86dde4330a5d4983c9389c8167cc069069ef8f9 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -716,6 +716,14 @@ static inline float Opacity(LayerImpl* layer) {
return layer->test_properties()->opacity;
}
+static inline const FilterOperations& BackgroundFilters(Layer* layer) {
+ return layer->background_filters();
+}
+
+static inline const FilterOperations& BackgroundFilters(LayerImpl* layer) {
+ return layer->test_properties()->background_filters;
+}
+
static inline bool HideLayerAndSubtree(Layer* layer) {
return layer->hide_layer_and_subtree();
}
@@ -763,7 +771,7 @@ bool ShouldCreateRenderSurface(LayerType* layer,
}
// If the layer uses a CSS filter.
- if (!layer->filters().IsEmpty() || !layer->background_filters().IsEmpty()) {
+ if (!layer->filters().IsEmpty() || !BackgroundFilters(layer).IsEmpty()) {
return true;
}
@@ -899,7 +907,7 @@ bool AddEffectNodeIfNeeded(
node.data.opacity = Opacity(layer);
node.data.has_render_surface = should_create_render_surface;
node.data.has_copy_request = HasCopyRequest(layer);
- node.data.has_background_filters = !layer->background_filters().IsEmpty();
+ node.data.background_filters = BackgroundFilters(layer);
node.data.has_potential_opacity_animation = has_potential_opacity_animation;
node.data.double_sided = DoubleSided(layer);
node.data.subtree_hidden = HideLayerAndSubtree(layer);
« no previous file with comments | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698