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

Side by Side Diff: cc/trees/draw_property_utils.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, 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
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_common_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/trees/draw_property_utils.h" 5 #include "cc/trees/draw_property_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 #if DCHECK_IS_ON() 35 #if DCHECK_IS_ON()
36 static void ValidateRenderSurfaceForLayer(LayerImpl* layer) { 36 static void ValidateRenderSurfaceForLayer(LayerImpl* layer) {
37 // This test verifies that there are no cases where a LayerImpl needs 37 // This test verifies that there are no cases where a LayerImpl needs
38 // a render surface, but doesn't have one. 38 // a render surface, but doesn't have one.
39 if (layer->has_render_surface()) 39 if (layer->has_render_surface())
40 return; 40 return;
41 41
42 DCHECK(layer->filters().IsEmpty()) << "layer: " << layer->id(); 42 DCHECK(layer->filters().IsEmpty()) << "layer: " << layer->id();
43 DCHECK(layer->background_filters().IsEmpty()) << "layer: " << layer->id();
44 DCHECK(!IsRootLayer(layer)) << "layer: " << layer->id(); 43 DCHECK(!IsRootLayer(layer)) << "layer: " << layer->id();
45 EffectNode* effect_node = 44 EffectNode* effect_node =
46 layer->layer_tree_impl()->property_trees()->effect_tree.Node( 45 layer->layer_tree_impl()->property_trees()->effect_tree.Node(
47 layer->effect_tree_index()); 46 layer->effect_tree_index());
48 if (effect_node->owner_id != layer->id()) 47 if (effect_node->owner_id != layer->id())
49 return; 48 return;
50 DCHECK_EQ(effect_node->data.mask_layer_id, -1) << "layer: " << layer->id(); 49 DCHECK_EQ(effect_node->data.mask_layer_id, -1) << "layer: " << layer->id();
51 DCHECK_EQ(effect_node->data.replica_layer_id, -1) << "layer: " << layer->id(); 50 DCHECK_EQ(effect_node->data.replica_layer_id, -1) << "layer: " << layer->id();
51 DCHECK(effect_node->data.background_filters.IsEmpty());
52 } 52 }
53 53
54 #endif 54 #endif
55 55
56 template <typename LayerType> 56 template <typename LayerType>
57 bool ComputeClipRectInTargetSpace(const LayerType* layer, 57 bool ComputeClipRectInTargetSpace(const LayerType* layer,
58 const ClipNode* clip_node, 58 const ClipNode* clip_node,
59 const TransformTree& transform_tree, 59 const TransformTree& transform_tree,
60 int target_node_id, 60 int target_node_id,
61 gfx::RectF* clip_rect_in_target_space) { 61 gfx::RectF* clip_rect_in_target_space) {
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1372 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1373 const Layer* overscroll_elasticity_layer, 1373 const Layer* overscroll_elasticity_layer,
1374 const gfx::Vector2dF& elastic_overscroll) { 1374 const gfx::Vector2dF& elastic_overscroll) {
1375 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1375 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1376 elastic_overscroll); 1376 elastic_overscroll);
1377 } 1377 }
1378 1378
1379 } // namespace draw_property_utils 1379 } // namespace draw_property_utils
1380 1380
1381 } // namespace cc 1381 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698