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

Side by Side Diff: cc/trees/draw_property_utils.h

Issue 1864183002: cc: Main thread skip single layers instead of subtrees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Format the comments Created 4 years, 8 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/test/layer_tree_host_common_test.cc ('k') | cc/trees/draw_property_utils.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 #ifndef CC_TREES_DRAW_PROPERTY_UTILS_H_ 5 #ifndef CC_TREES_DRAW_PROPERTY_UTILS_H_
6 #define CC_TREES_DRAW_PROPERTY_UTILS_H_ 6 #define CC_TREES_DRAW_PROPERTY_UTILS_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/layers/layer_collections.h" 9 #include "cc/layers/layer_collections.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 class Rect; 12 class Rect;
13 class Transform; 13 class Transform;
14 class Vector2dF; 14 class Vector2dF;
15 } // namespace gfx 15 } // namespace gfx
16 16
17 namespace cc { 17 namespace cc {
18 18
19 class ClipTree; 19 class ClipTree;
20 struct DrawProperties; 20 struct DrawProperties;
21 class Layer; 21 class Layer;
22 class LayerImpl; 22 class LayerImpl;
23 class LayerTreeHost;
23 class RenderSurfaceImpl; 24 class RenderSurfaceImpl;
24 class EffectTree; 25 class EffectTree;
25 class TransformTree; 26 class TransformTree;
26 class PropertyTrees; 27 class PropertyTrees;
27 28
28 namespace draw_property_utils { 29 namespace draw_property_utils {
29 30
30 // Computes combined clips for every node in |clip_tree|. This function requires 31 // Computes combined clips for every node in |clip_tree|. This function requires
31 // that |transform_tree| has been updated via |ComputeTransforms|. 32 // that |transform_tree| has been updated via |ComputeTransforms|.
32 void CC_EXPORT ComputeClips(ClipTree* clip_tree, 33 void CC_EXPORT ComputeClips(ClipTree* clip_tree,
(...skipping 21 matching lines...) Expand all
54 bool can_render_to_separate_surface, 55 bool can_render_to_separate_surface,
55 PropertyTrees* property_trees, 56 PropertyTrees* property_trees,
56 LayerImplList* visible_layer_list); 57 LayerImplList* visible_layer_list);
57 58
58 void CC_EXPORT UpdateRenderSurfaces(Layer* root_layer, 59 void CC_EXPORT UpdateRenderSurfaces(Layer* root_layer,
59 PropertyTrees* property_trees); 60 PropertyTrees* property_trees);
60 61
61 void CC_EXPORT UpdatePropertyTrees(PropertyTrees* property_trees, 62 void CC_EXPORT UpdatePropertyTrees(PropertyTrees* property_trees,
62 bool can_render_to_separate_surface); 63 bool can_render_to_separate_surface);
63 64
64 void CC_EXPORT FindLayersThatNeedUpdates(Layer* layer, 65 void CC_EXPORT FindLayersThatNeedUpdates(LayerTreeHost* layer_tree_host,
65 const TransformTree& transform_tree, 66 const TransformTree& transform_tree,
66 const EffectTree& effect_tree, 67 const EffectTree& effect_tree,
67 LayerList* update_layer_list); 68 LayerList* update_layer_list);
68 69
69 void CC_EXPORT 70 void CC_EXPORT
70 ComputeVisibleRectsForTesting(PropertyTrees* property_trees, 71 ComputeVisibleRectsForTesting(PropertyTrees* property_trees,
71 bool can_render_to_separate_surface, 72 bool can_render_to_separate_surface,
72 LayerList* visible_layer_list); 73 LayerList* visible_layer_list);
73 74
74 void CC_EXPORT ComputeVisibleRects(LayerImpl* root_layer, 75 void CC_EXPORT ComputeVisibleRects(LayerImpl* root_layer,
75 PropertyTrees* property_trees, 76 PropertyTrees* property_trees,
76 bool can_render_to_separate_surface, 77 bool can_render_to_separate_surface,
77 LayerImplList* visible_layer_list); 78 LayerImplList* visible_layer_list);
78 79
79 void CC_EXPORT ComputeLayerDrawProperties(LayerImpl* layer, 80 void CC_EXPORT ComputeLayerDrawProperties(LayerImpl* layer,
80 const PropertyTrees* property_trees, 81 const PropertyTrees* property_trees,
81 bool layers_always_allowed_lcd_text, 82 bool layers_always_allowed_lcd_text,
82 bool can_use_lcd_text); 83 bool can_use_lcd_text);
83 84
84 void CC_EXPORT ComputeSurfaceDrawProperties(const PropertyTrees* property_trees, 85 void CC_EXPORT ComputeSurfaceDrawProperties(const PropertyTrees* property_trees,
85 RenderSurfaceImpl* render_surface); 86 RenderSurfaceImpl* render_surface);
86 87
87 bool CC_EXPORT LayerShouldBeSkipped(LayerImpl* layer, 88 bool CC_EXPORT LayerShouldBeSkipped(LayerImpl* layer,
88 bool layer_is_drawn, 89 bool layer_is_drawn,
89 const TransformTree& transform_tree); 90 const TransformTree& transform_tree,
91 const EffectTree& effect_tree);
90 92
91 bool CC_EXPORT LayerNeedsUpdate(Layer* layer, 93 bool CC_EXPORT LayerNeedsUpdate(Layer* layer,
92 bool layer_is_drawn, 94 bool layer_is_drawn,
93 const TransformTree& tree); 95 const TransformTree& tree);
94 96
95 bool CC_EXPORT LayerNeedsUpdate(LayerImpl* layer, 97 bool CC_EXPORT LayerNeedsUpdate(LayerImpl* layer,
96 bool layer_is_drawn, 98 bool layer_is_drawn,
97 const TransformTree& tree); 99 const TransformTree& tree);
98 100
99 gfx::Transform CC_EXPORT DrawTransform(const LayerImpl* layer, 101 gfx::Transform CC_EXPORT DrawTransform(const LayerImpl* layer,
(...skipping 24 matching lines...) Expand all
124 126
125 void CC_EXPORT 127 void CC_EXPORT
126 UpdateElasticOverscroll(PropertyTrees* property_trees, 128 UpdateElasticOverscroll(PropertyTrees* property_trees,
127 const Layer* overscroll_elasticity_layer, 129 const Layer* overscroll_elasticity_layer,
128 const gfx::Vector2dF& elastic_overscroll); 130 const gfx::Vector2dF& elastic_overscroll);
129 131
130 } // namespace draw_property_utils 132 } // namespace draw_property_utils
131 } // namespace cc 133 } // namespace cc
132 134
133 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ 135 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_host_common_test.cc ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698