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

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

Issue 16968002: Move implementation of WebFilterOperations into cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « 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 8f0adb41e4111ab1c0e93f96dceb8156631a57b3..4baa9aeb9dead9be268d265320c01e5d4593c88d 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -16,6 +16,7 @@
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/skia/include/utils/SkMatrix44.h"
#include "webkit/renderer/compositor_bindings/web_animation_impl.h"
+#include "webkit/renderer/compositor_bindings/web_filter_operations_impl.h"
using cc::Animation;
using cc::Layer;
@@ -155,11 +156,24 @@ WebColor WebLayerImpl::backgroundColor() const {
}
void WebLayerImpl::setFilters(const WebFilterOperations& filters) {
- layer_->SetFilters(filters);
+#if WEB_FILTER_OPERATIONS_IS_VIRTUAL
+ const WebFilterOperationsImpl& filters_impl =
+ static_cast<const WebFilterOperationsImpl&>(filters);
+ layer_->SetFilters(filters_impl.AsFilterOperations());
+#else
+ layer_->SetFilters(ConvertWebFilterOperationsToFilterOperations(filters));
+#endif
}
void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) {
- layer_->SetBackgroundFilters(filters);
+#if WEB_FILTER_OPERATIONS_IS_VIRTUAL
+ const WebFilterOperationsImpl& filters_impl =
+ static_cast<const WebFilterOperationsImpl&>(filters);
+ layer_->SetBackgroundFilters(filters_impl.AsFilterOperations());
+#else
+ layer_->SetBackgroundFilters(
+ ConvertWebFilterOperationsToFilterOperations(filters));
+#endif
}
void WebLayerImpl::setFilter(SkImageFilter* filter) {
« 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