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

Unified Diff: cc/layers/layer.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 | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 86887a6ad2c72264f8447612c97e8d7804034649..238d2c3ae26852ef5cf8a2069cfc5edc93368db7 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -123,8 +123,7 @@ void Layer::SetLayerTreeHost(LayerTreeHost* host) {
if (host && layer_animation_controller_->has_any_animation())
host->SetNeedsCommit();
- if (host &&
- (!filters_.IsEmpty() || !background_filters_.IsEmpty() || filter_))
+ if (host && (!filters_.IsEmpty() || !background_filters_.IsEmpty()))
layer_tree_host_->set_needs_filter_context();
}
@@ -472,24 +471,12 @@ void Layer::SetFilters(const FilterOperations& filters) {
DCHECK(IsPropertyChangeAllowed());
if (filters_ == filters)
return;
- DCHECK(!filter_);
filters_ = filters;
SetNeedsCommit();
if (!filters.IsEmpty() && layer_tree_host_)
layer_tree_host_->set_needs_filter_context();
}
-void Layer::SetFilter(const skia::RefPtr<SkImageFilter>& filter) {
- DCHECK(IsPropertyChangeAllowed());
- if (filter_.get() == filter.get())
- return;
- DCHECK(filters_.IsEmpty());
- filter_ = filter;
- SetNeedsCommit();
- if (filter && layer_tree_host_)
- layer_tree_host_->set_needs_filter_context();
-}
-
void Layer::SetBackgroundFilters(const FilterOperations& filters) {
DCHECK(IsPropertyChangeAllowed());
if (background_filters_ == filters)
@@ -821,7 +808,6 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->SetDrawsContent(DrawsContent());
layer->SetHideLayerAndSubtree(hide_layer_and_subtree_);
layer->SetFilters(filters());
- layer->SetFilter(filter());
layer->SetBackgroundFilters(background_filters());
layer->SetMasksToBounds(masks_to_bounds_);
layer->SetShouldScrollOnMainThread(should_scroll_on_main_thread_);
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698