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

Unified Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 21154002: Add support for converting cc::FilterOperations into an SkImageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 3 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 | « webkit/renderer/compositor_bindings/web_filter_operations_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index f2a3cdea2b6339c2303f4c7ba8dac5af8453b782..c0b56b88ac87ee2f64b5b16c8be52e3748762715 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -178,8 +178,14 @@ void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) {
layer_->SetBackgroundFilters(filters_impl.AsFilterOperations());
}
+// TODO(ajuma): Remove this once the Blink CL that stops calling this lands.
void WebLayerImpl::setFilter(SkImageFilter* filter) {
- layer_->SetFilter(skia::SharePtr(filter));
+ cc::FilterOperations filters;
+ if (filter) {
+ filters.Append(
+ cc::FilterOperation::CreateReferenceFilter(skia::SharePtr(filter)));
+ }
+ layer_->SetFilters(filters);
}
void WebLayerImpl::setCompositingReasons(
« no previous file with comments | « webkit/renderer/compositor_bindings/web_filter_operations_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698