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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 2099743002: cc: Move background filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ' Created 4 years, 5 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
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_test_properties.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 layer->safe_opaque_background_color_ = safe_opaque_background_color_; 340 layer->safe_opaque_background_color_ = safe_opaque_background_color_;
341 layer->blend_mode_ = blend_mode_; 341 layer->blend_mode_ = blend_mode_;
342 layer->draw_blend_mode_ = draw_blend_mode_; 342 layer->draw_blend_mode_ = draw_blend_mode_;
343 layer->position_ = position_; 343 layer->position_ = position_;
344 layer->transform_ = transform_; 344 layer->transform_ = transform_;
345 layer->transform_tree_index_ = transform_tree_index_; 345 layer->transform_tree_index_ = transform_tree_index_;
346 layer->effect_tree_index_ = effect_tree_index_; 346 layer->effect_tree_index_ = effect_tree_index_;
347 layer->clip_tree_index_ = clip_tree_index_; 347 layer->clip_tree_index_ = clip_tree_index_;
348 layer->scroll_tree_index_ = scroll_tree_index_; 348 layer->scroll_tree_index_ = scroll_tree_index_;
349 layer->filters_ = filters_; 349 layer->filters_ = filters_;
350 layer->background_filters_ = background_filters_;
351 layer->sorting_context_id_ = sorting_context_id_; 350 layer->sorting_context_id_ = sorting_context_id_;
352 layer->has_will_change_transform_hint_ = has_will_change_transform_hint_; 351 layer->has_will_change_transform_hint_ = has_will_change_transform_hint_;
353 352
354 if (layer_property_changed_) { 353 if (layer_property_changed_) {
355 layer->layer_tree_impl()->set_needs_update_draw_properties(); 354 layer->layer_tree_impl()->set_needs_update_draw_properties();
356 layer->layer_property_changed_ = true; 355 layer->layer_property_changed_ = true;
357 } 356 }
358 357
359 // If whether layer has render surface changes, we need to update draw 358 // If whether layer has render surface changes, we need to update draw
360 // properties. 359 // properties.
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 } 798 }
800 799
801 bool LayerImpl::FilterIsAnimating() const { 800 bool LayerImpl::FilterIsAnimating() const {
802 return layer_tree_impl_->IsAnimatingFilterProperty(this); 801 return layer_tree_impl_->IsAnimatingFilterProperty(this);
803 } 802 }
804 803
805 bool LayerImpl::HasPotentiallyRunningFilterAnimation() const { 804 bool LayerImpl::HasPotentiallyRunningFilterAnimation() const {
806 return layer_tree_impl_->HasPotentiallyRunningFilterAnimation(this); 805 return layer_tree_impl_->HasPotentiallyRunningFilterAnimation(this);
807 } 806 }
808 807
809 void LayerImpl::SetBackgroundFilters(
810 const FilterOperations& filters) {
811 if (background_filters_ == filters)
812 return;
813
814 background_filters_ = filters;
815 NoteLayerPropertyChanged();
816 }
817
818 void LayerImpl::SetMasksToBounds(bool masks_to_bounds) { 808 void LayerImpl::SetMasksToBounds(bool masks_to_bounds) {
819 if (masks_to_bounds_ == masks_to_bounds) 809 if (masks_to_bounds_ == masks_to_bounds)
820 return; 810 return;
821 811
822 masks_to_bounds_ = masks_to_bounds; 812 masks_to_bounds_ = masks_to_bounds;
823 } 813 }
824 814
825 void LayerImpl::SetContentsOpaque(bool opaque) { 815 void LayerImpl::SetContentsOpaque(bool opaque) {
826 if (contents_opaque_ == opaque) 816 if (contents_opaque_ == opaque)
827 return; 817 return;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 .layer_transforms_should_scale_layer_contents) { 1238 .layer_transforms_should_scale_layer_contents) {
1249 return default_scale; 1239 return default_scale;
1250 } 1240 }
1251 1241
1252 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1242 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1253 ScreenSpaceTransform(), default_scale); 1243 ScreenSpaceTransform(), default_scale);
1254 return std::max(transform_scales.x(), transform_scales.y()); 1244 return std::max(transform_scales.x(), transform_scales.y());
1255 } 1245 }
1256 1246
1257 } // namespace cc 1247 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_test_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698