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

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

Issue 2639723002: [NOT FOR REVIEW]
Patch Set: . Created 3 years, 11 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/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 RectF;
13 class Transform; 14 class Transform;
14 class Vector2dF; 15 class Vector2dF;
15 } // namespace gfx 16 } // namespace gfx
16 17
17 namespace cc { 18 namespace cc {
18 19
19 class Layer; 20 class Layer;
20 class LayerImpl; 21 class LayerImpl;
21 class LayerTree; 22 class LayerTree;
22 class RenderSurfaceImpl; 23 class RenderSurfaceImpl;
23 class EffectTree; 24 class EffectTree;
24 class TransformTree; 25 class TransformTree;
25 class PropertyTrees; 26 class PropertyTrees;
26 struct EffectNode; 27 struct EffectNode;
27 28
28 namespace draw_property_utils { 29 namespace draw_property_utils {
29 30
30 void CC_EXPORT PostConcatSurfaceContentsScale(const EffectNode* effect_node, 31 void CC_EXPORT PostConcatSurfaceContentsScale(const EffectNode* effect_node,
31 gfx::Transform* transform); 32 gfx::Transform* transform);
32 33
33 void CC_EXPORT ConcatInverseSurfaceContentsScale(const EffectNode* effect_node, 34 void CC_EXPORT ConcatInverseSurfaceContentsScale(const EffectNode* effect_node,
34 gfx::Transform* transform); 35 gfx::Transform* transform);
35 // Computes combined clips for every node in |clip_tree|. This function requires 36
36 // that |transform_tree| has been updated via |ComputeTransforms|. 37 gfx::RectF CC_EXPORT
37 void CC_EXPORT ComputeClips(PropertyTrees* property_trees, 38 ComputeAccumulatedClipInRootSpaceForVisibleRect(PropertyTrees* property_trees,
38 bool non_root_surfaces_enabled); 39 int local_clip_id);
39 40
40 // Computes combined (screen space) transforms for every node in the transform 41 // Computes combined (screen space) transforms for every node in the transform
41 // tree. This must be done prior to calling |ComputeClips|. 42 // tree. This must be done prior to calling |ComputeClips|.
42 void CC_EXPORT ComputeTransforms(TransformTree* transform_tree); 43 void CC_EXPORT ComputeTransforms(TransformTree* transform_tree);
43 44
44 // Computes screen space opacity for every node in the opacity tree. 45 // Computes screen space opacity for every node in the opacity tree.
45 void CC_EXPORT ComputeEffects(EffectTree* effect_tree); 46 void CC_EXPORT ComputeEffects(EffectTree* effect_tree);
46 47
47 void CC_EXPORT BuildPropertyTreesAndComputeVisibleRects( 48 void CC_EXPORT BuildPropertyTreesAndComputeVisibleRects(
48 LayerImpl* root_layer, 49 LayerImpl* root_layer,
(...skipping 16 matching lines...) Expand all
65 void CC_EXPORT FindLayersThatNeedUpdates(LayerTree* layer_tree, 66 void CC_EXPORT FindLayersThatNeedUpdates(LayerTree* layer_tree,
66 const PropertyTrees* property_trees, 67 const PropertyTrees* property_trees,
67 LayerList* update_layer_list); 68 LayerList* update_layer_list);
68 69
69 void CC_EXPORT ComputeVisibleRects(LayerImpl* root_layer, 70 void CC_EXPORT ComputeVisibleRects(LayerImpl* root_layer,
70 PropertyTrees* property_trees, 71 PropertyTrees* property_trees,
71 bool can_render_to_separate_surface, 72 bool can_render_to_separate_surface,
72 LayerImplList* visible_layer_list); 73 LayerImplList* visible_layer_list);
73 74
74 gfx::Rect CC_EXPORT 75 gfx::Rect CC_EXPORT
75 ComputeLayerVisibleRectDynamic(const PropertyTrees* property_trees, 76 ComputeLayerVisibleRectDynamic(PropertyTrees* property_trees,
76 const LayerImpl* layer); 77 const LayerImpl* layer);
77 void CC_EXPORT
78 VerifyVisibleRectsCalculations(const LayerImplList& layer_list,
79 const PropertyTrees* property_trees);
80 78
81 void CC_EXPORT ComputeLayerDrawProperties(LayerImpl* layer, 79 void CC_EXPORT ComputeLayerDrawProperties(LayerImpl* layer,
82 const PropertyTrees* property_trees); 80 const PropertyTrees* property_trees);
83 81
84 void CC_EXPORT ComputeMaskDrawProperties(LayerImpl* mask_layer, 82 void CC_EXPORT ComputeMaskDrawProperties(LayerImpl* mask_layer,
85 const PropertyTrees* property_trees); 83 const PropertyTrees* property_trees);
86 84
87 void CC_EXPORT ComputeSurfaceDrawProperties(const PropertyTrees* property_trees, 85 void CC_EXPORT ComputeSurfaceDrawProperties(PropertyTrees* property_trees,
88 RenderSurfaceImpl* render_surface); 86 RenderSurfaceImpl* render_surface);
89 87
90 bool CC_EXPORT LayerShouldBeSkipped(LayerImpl* layer, 88 bool CC_EXPORT LayerShouldBeSkipped(LayerImpl* layer,
91 const TransformTree& transform_tree, 89 const TransformTree& transform_tree,
92 const EffectTree& effect_tree); 90 const EffectTree& effect_tree);
93 91
94 bool CC_EXPORT LayerNeedsUpdate(Layer* layer, 92 bool CC_EXPORT LayerNeedsUpdate(Layer* layer,
95 bool layer_is_drawn, 93 bool layer_is_drawn,
96 const PropertyTrees* property_trees); 94 const PropertyTrees* property_trees);
97 95
98 bool CC_EXPORT LayerNeedsUpdate(LayerImpl* layer, 96 bool CC_EXPORT LayerNeedsUpdate(LayerImpl* layer,
99 bool layer_is_drawn, 97 bool layer_is_drawn,
100 const PropertyTrees* property_trees); 98 const PropertyTrees* property_trees);
101 99
102 void CC_EXPORT VerifyClipTreeCalculations(const LayerImplList& layer_list,
103 PropertyTrees* property_trees);
104
105 gfx::Transform CC_EXPORT DrawTransform(const LayerImpl* layer, 100 gfx::Transform CC_EXPORT DrawTransform(const LayerImpl* layer,
106 const TransformTree& transform_tree, 101 const TransformTree& transform_tree,
107 const EffectTree& effect_tree); 102 const EffectTree& effect_tree);
108 103
109 gfx::Transform CC_EXPORT ScreenSpaceTransform(const Layer* layer, 104 gfx::Transform CC_EXPORT ScreenSpaceTransform(const Layer* layer,
110 const TransformTree& tree); 105 const TransformTree& tree);
111 106
112 gfx::Transform CC_EXPORT ScreenSpaceTransform(const LayerImpl* layer, 107 gfx::Transform CC_EXPORT ScreenSpaceTransform(const LayerImpl* layer,
113 const TransformTree& tree); 108 const TransformTree& tree);
114 109
(...skipping 16 matching lines...) Expand all
131 126
132 void CC_EXPORT 127 void CC_EXPORT
133 UpdateElasticOverscroll(PropertyTrees* property_trees, 128 UpdateElasticOverscroll(PropertyTrees* property_trees,
134 const Layer* overscroll_elasticity_layer, 129 const Layer* overscroll_elasticity_layer,
135 const gfx::Vector2dF& elastic_overscroll); 130 const gfx::Vector2dF& elastic_overscroll);
136 131
137 } // namespace draw_property_utils 132 } // namespace draw_property_utils
138 } // namespace cc 133 } // namespace cc
139 134
140 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ 135 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_
OLDNEW
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698