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

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

Issue 1310283002: cc: Avoid duplicate work when computing draw properties using property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move RenderSurfaceDrawProperties to its own file Created 5 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 unified diff | Download patch
« no previous file with comments | « cc/layers/render_surface_draw_properties.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_lists.h" 9 #include "cc/layers/layer_lists.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 class Rect; 12 class Rect;
13 class Transform; 13 class Transform;
14 } // namespace gfx 14 } // namespace gfx
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class ClipTree; 18 class ClipTree;
19 struct DrawProperties;
19 class Layer; 20 class Layer;
20 class LayerImpl; 21 class LayerImpl;
22 struct RenderSurfaceDrawProperties;
21 class RenderSurfaceImpl; 23 class RenderSurfaceImpl;
22 class EffectTree; 24 class EffectTree;
23 class TransformTree; 25 class TransformTree;
24 class PropertyTrees; 26 class PropertyTrees;
25 27
26 // Computes combined clips for every node in |clip_tree|. This function requires 28 // Computes combined clips for every node in |clip_tree|. This function requires
27 // that |transform_tree| has been updated via |ComputeTransforms|. 29 // that |transform_tree| has been updated via |ComputeTransforms|.
28 // TODO(vollick): ComputeClips and ComputeTransforms will eventually need to be 30 // TODO(vollick): ComputeClips and ComputeTransforms will eventually need to be
29 // done on both threads. 31 // done on both threads.
30 void CC_EXPORT 32 void CC_EXPORT
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void CC_EXPORT 69 void CC_EXPORT
68 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer, 70 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer,
69 PropertyTrees* property_trees, 71 PropertyTrees* property_trees,
70 LayerList* update_layer_list); 72 LayerList* update_layer_list);
71 73
72 void CC_EXPORT 74 void CC_EXPORT
73 ComputeVisibleRectsUsingPropertyTrees(LayerImpl* root_layer, 75 ComputeVisibleRectsUsingPropertyTrees(LayerImpl* root_layer,
74 PropertyTrees* property_trees, 76 PropertyTrees* property_trees,
75 LayerImplList* update_layer_list); 77 LayerImplList* update_layer_list);
76 78
79 void CC_EXPORT ComputeLayerDrawPropertiesUsingPropertyTrees(
80 const LayerImpl* layer,
81 const PropertyTrees* property_trees,
82 bool layers_always_allowed_lcd_text,
83 bool can_use_lcd_text,
84 DrawProperties* draw_properties);
85
86 void CC_EXPORT ComputeSurfaceDrawPropertiesUsingPropertyTrees(
87 RenderSurfaceImpl* render_surface,
88 const PropertyTrees* property_trees,
89 RenderSurfaceDrawProperties* draw_properties);
90
77 gfx::Transform CC_EXPORT 91 gfx::Transform CC_EXPORT
78 DrawTransformFromPropertyTrees(const Layer* layer, const TransformTree& tree); 92 DrawTransformFromPropertyTrees(const Layer* layer, const TransformTree& tree);
79 93
80 gfx::Transform CC_EXPORT DrawTransformOfRenderSurfaceFromPropertyTrees(
81 const RenderSurfaceImpl* render_Surface,
82 const TransformTree& tree);
83
84 bool CC_EXPORT
85 RenderSurfaceIsClippedFromPropertyTrees(const RenderSurfaceImpl* render_surface,
86 const ClipTree& tree);
87
88 gfx::Rect CC_EXPORT ClipRectOfRenderSurfaceFromPropertyTrees(
89 const RenderSurfaceImpl* render_surface,
90 const ClipTree& clip_tree);
91
92 gfx::Transform CC_EXPORT ScreenSpaceTransformOfRenderSurfaceFromPropertyTrees(
93 const RenderSurfaceImpl* render_surface,
94 const TransformTree& tree);
95
96 gfx::Transform CC_EXPORT 94 gfx::Transform CC_EXPORT
97 DrawTransformFromPropertyTrees(const LayerImpl* layer, 95 DrawTransformFromPropertyTrees(const LayerImpl* layer,
98 const TransformTree& tree); 96 const TransformTree& tree);
99 97
100 gfx::Transform CC_EXPORT 98 gfx::Transform CC_EXPORT
101 ScreenSpaceTransformFromPropertyTrees(const Layer* layer, 99 ScreenSpaceTransformFromPropertyTrees(const Layer* layer,
102 const TransformTree& tree); 100 const TransformTree& tree);
103 101
104 gfx::Transform CC_EXPORT 102 gfx::Transform CC_EXPORT
105 ScreenSpaceTransformFromPropertyTrees(const LayerImpl* layer, 103 ScreenSpaceTransformFromPropertyTrees(const LayerImpl* layer,
106 const TransformTree& tree); 104 const TransformTree& tree);
107 105
108 bool CC_EXPORT
109 ScreenSpaceTransformIsAnimatingFromPropertyTrees(const Layer* layer,
110 const TransformTree& tree);
111
112 bool CC_EXPORT
113 ScreenSpaceTransformIsAnimatingFromPropertyTrees(const LayerImpl* layer,
114 const TransformTree& tree);
115
116 float CC_EXPORT
117 MaximumAnimationTargetScaleFromPropertyTrees(const LayerImpl* layer,
118 const TransformTree& tree);
119
120 float CC_EXPORT
121 StartingAnimationScaleFromPropertyTrees(const LayerImpl* layer,
122 const TransformTree& tree);
123
124 float CC_EXPORT DrawOpacityFromPropertyTrees(const LayerImpl* layer,
125 const EffectTree& tree);
126
127 float CC_EXPORT
128 DrawOpacityOfRenderSurfaceFromPropertyTrees(RenderSurfaceImpl* render_surface,
129 const EffectTree& tree);
130
131 bool CC_EXPORT
132 CanUseLcdTextFromPropertyTrees(const LayerImpl* layer,
133 bool layers_always_allowed_lcd_text,
134 bool can_use_lcd_text,
135 PropertyTrees* property_trees);
136
137 gfx::Rect CC_EXPORT DrawableContentRectOfSurfaceFromPropertyTrees(
138 const RenderSurfaceImpl* render_surface,
139 const TransformTree& transform_tree);
140
141 gfx::Rect CC_EXPORT
142 DrawableContentRectFromPropertyTrees(const LayerImpl* layer,
143 const TransformTree& transform_tree);
144
145 gfx::Rect CC_EXPORT
146 ClipRectFromPropertyTrees(const LayerImpl* layer,
147 const TransformTree& transform_tree);
148
149 gfx::Transform CC_EXPORT DrawTransformOfRenderSurfaceReplicaFromPropertyTrees(
150 const RenderSurfaceImpl* render_surface,
151 const TransformTree& tree);
152
153 gfx::Transform CC_EXPORT
154 ScreenSpaceTransformOfRenderSurfaceReplicaFromPropertyTrees(
155 const RenderSurfaceImpl* render_surface,
156 const TransformTree& tree);
157
158 } // namespace cc 106 } // namespace cc
159 107
160 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ 108 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_
OLDNEW
« no previous file with comments | « cc/layers/render_surface_draw_properties.cc ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698