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

Side by Side Diff: cc/layers/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/scrollbar_animation_controller.h" 10 #include "cc/animation/scrollbar_animation_controller.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 break; 705 break;
706 } 706 }
707 if (SkColorGetA(color) != 255) 707 if (SkColorGetA(color) != 255)
708 color = layer_tree_impl()->background_color(); 708 color = layer_tree_impl()->background_color();
709 if (SkColorGetA(color) != 255) 709 if (SkColorGetA(color) != 255)
710 color = SkColorSetA(color, 255); 710 color = SkColorSetA(color, 255);
711 } 711 }
712 return color; 712 return color;
713 } 713 }
714 714
715 void LayerImpl::SetFilters(const WebKit::WebFilterOperations& filters) { 715 void LayerImpl::SetFilters(const FilterOperations& filters) {
716 if (filters_ == filters) 716 if (filters_ == filters)
717 return; 717 return;
718 718
719 DCHECK(!filter_); 719 DCHECK(!filter_);
720 filters_ = filters; 720 filters_ = filters;
721 NoteLayerPropertyChangedForSubtree(); 721 NoteLayerPropertyChangedForSubtree();
722 } 722 }
723 723
724 void LayerImpl::SetBackgroundFilters( 724 void LayerImpl::SetBackgroundFilters(
725 const WebKit::WebFilterOperations& filters) { 725 const FilterOperations& filters) {
726 if (background_filters_ == filters) 726 if (background_filters_ == filters)
727 return; 727 return;
728 728
729 background_filters_ = filters; 729 background_filters_ = filters;
730 NoteLayerPropertyChanged(); 730 NoteLayerPropertyChanged();
731 } 731 }
732 732
733 void LayerImpl::SetFilter(const skia::RefPtr<SkImageFilter>& filter) { 733 void LayerImpl::SetFilter(const skia::RefPtr<SkImageFilter>& filter) {
734 if (filter_.get() == filter.get()) 734 if (filter_.get() == filter.get())
735 return; 735 return;
736 736
737 DCHECK(filters_.isEmpty()); 737 DCHECK(filters_.IsEmpty());
738 filter_ = filter; 738 filter_ = filter;
739 NoteLayerPropertyChangedForSubtree(); 739 NoteLayerPropertyChangedForSubtree();
740 } 740 }
741 741
742 void LayerImpl::SetMasksToBounds(bool masks_to_bounds) { 742 void LayerImpl::SetMasksToBounds(bool masks_to_bounds) {
743 if (masks_to_bounds_ == masks_to_bounds) 743 if (masks_to_bounds_ == masks_to_bounds)
744 return; 744 return;
745 745
746 masks_to_bounds_ = masks_to_bounds; 746 masks_to_bounds_ = masks_to_bounds;
747 NoteLayerPropertyChangedForSubtree(); 747 NoteLayerPropertyChangedForSubtree();
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 1168
1169 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } 1169 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; }
1170 1170
1171 scoped_ptr<base::Value> LayerImpl::AsValue() const { 1171 scoped_ptr<base::Value> LayerImpl::AsValue() const {
1172 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1172 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1173 AsValueInto(state.get()); 1173 AsValueInto(state.get());
1174 return state.PassAs<base::Value>(); 1174 return state.PassAs<base::Value>();
1175 } 1175 }
1176 1176
1177 } // namespace cc 1177 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698