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

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: Add TODOs; comment out OVERRIDE. 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
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index bf5ec34892e6931729308e51ce207ea595c40801..30934d2fae7e05d29bf110df08d2813c9f2e551b 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())
danakj 2012/10/19 19:34:24 There are a few other places that check for this:
Stephen White 2012/10/19 21:34:50 I think I got them all now. Please let me know if
nearestAncestorThatMovesPixels = renderSurface;
// The render surface clipRect is expressed in the space where this surface draws, i.e. the same space as clipRectFromAncestor.

Powered by Google App Engine
This is Rietveld 408576698