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

Unified Diff: cc/layer_tree_host_common.cc

Issue 11175009: Implement SkImageFilter support in the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated to ToT (past the Great Renaming) Created 8 years, 2 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/layer_impl_unittest.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index c629ea35d2d0c892f6e999a28c7e71d0f3a26977..8419b3bcdc5a827e030fca9da15899d7409fc8d5 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -242,7 +242,7 @@ static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig
return true;
// If the layer uses a CSS filter.
- if (!layer->filters().isEmpty() || !layer->backgroundFilters().isEmpty())
+ if (!layer->filters().isEmpty() || !layer->backgroundFilters().isEmpty() || layer->filter())
return true;
// If the layer flattens its subtree (i.e. the layer doesn't preserve-3d), but it is
@@ -576,7 +576,9 @@ static void calculateDrawTransformsInternal(LayerType* layer, LayerType* rootLay
layer->replicaLayer()->maskLayer()->setVisibleContentRect(IntRect(IntPoint(), layer->contentBounds()));
}
- if (layer->filters().hasFilterThatMovesPixels())
+ // FIXME: make this smarter for the SkImageFilter case (check for
+ // pixel-moving filters)
+ if (layer->filters().hasFilterThatMovesPixels() || layer->filter())
nearestAncestorThatMovesPixels = renderSurface;
// The render surface clipRect is expressed in the space where this surface draws, i.e. the same space as clipRectFromAncestor.
« no previous file with comments | « cc/layer_impl_unittest.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698