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

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

Issue 1387003002: cc: Make property trees support resourceless draw mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DontReparentUnclippedClipNodes
Patch Set: Rebased Created 5 years, 2 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_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 struct DrawProperties;
20 class Layer; 20 class Layer;
21 class LayerImpl; 21 class LayerImpl;
22 struct RenderSurfaceDrawProperties; 22 struct RenderSurfaceDrawProperties;
23 class RenderSurfaceImpl; 23 class RenderSurfaceImpl;
24 class EffectTree; 24 class EffectTree;
25 class TransformTree; 25 class TransformTree;
26 class PropertyTrees; 26 class PropertyTrees;
27 27
28 // 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
29 // that |transform_tree| has been updated via |ComputeTransforms|. 29 // that |transform_tree| has been updated via |ComputeTransforms|.
30 // TODO(vollick): ComputeClips and ComputeTransforms will eventually need to be 30 void CC_EXPORT ComputeClips(ClipTree* clip_tree,
31 // done on both threads. 31 const TransformTree& transform_tree,
32 void CC_EXPORT 32 bool non_root_surfaces_enabled);
33 ComputeClips(ClipTree* clip_tree, const TransformTree& transform_tree);
34 33
35 // Computes combined (screen space) transforms for every node in the transform 34 // Computes combined (screen space) transforms for every node in the transform
36 // tree. This must be done prior to calling |ComputeClips|. 35 // tree. This must be done prior to calling |ComputeClips|.
37 void CC_EXPORT ComputeTransforms(TransformTree* transform_tree); 36 void CC_EXPORT ComputeTransforms(TransformTree* transform_tree);
38 37
39 // Computes screen space opacity for every node in the opacity tree. 38 // Computes screen space opacity for every node in the opacity tree.
40 void CC_EXPORT ComputeOpacities(EffectTree* effect_tree); 39 void CC_EXPORT ComputeOpacities(EffectTree* effect_tree);
41 40
42 // Computes the visible content rect for every layer under |root_layer|. The 41 // Computes the visible content rect for every layer under |root_layer|. The
43 // visible content rect is the clipped content space rect that will be used for 42 // visible content rect is the clipped content space rect that will be used for
44 // recording. 43 // recording.
45 void CC_EXPORT BuildPropertyTreesAndComputeVisibleRects( 44 void CC_EXPORT BuildPropertyTreesAndComputeVisibleRects(
46 Layer* root_layer, 45 Layer* root_layer,
47 const Layer* page_scale_layer, 46 const Layer* page_scale_layer,
48 const Layer* inner_viewport_scroll_layer, 47 const Layer* inner_viewport_scroll_layer,
49 const Layer* outer_viewport_scroll_layer, 48 const Layer* outer_viewport_scroll_layer,
50 float page_scale_factor, 49 float page_scale_factor,
51 float device_scale_factor, 50 float device_scale_factor,
52 const gfx::Rect& viewport, 51 const gfx::Rect& viewport,
53 const gfx::Transform& device_transform, 52 const gfx::Transform& device_transform,
53 bool can_render_to_separate_surface,
54 PropertyTrees* property_trees, 54 PropertyTrees* property_trees,
55 LayerList* update_layer_list); 55 LayerList* update_layer_list);
56 56
57 void CC_EXPORT BuildPropertyTreesAndComputeVisibleRects( 57 void CC_EXPORT BuildPropertyTreesAndComputeVisibleRects(
58 LayerImpl* root_layer, 58 LayerImpl* root_layer,
59 const LayerImpl* page_scale_layer, 59 const LayerImpl* page_scale_layer,
60 const LayerImpl* inner_viewport_scroll_layer, 60 const LayerImpl* inner_viewport_scroll_layer,
61 const LayerImpl* outer_viewport_scroll_layer, 61 const LayerImpl* outer_viewport_scroll_layer,
62 float page_scale_factor, 62 float page_scale_factor,
63 float device_scale_factor, 63 float device_scale_factor,
64 const gfx::Rect& viewport, 64 const gfx::Rect& viewport,
65 const gfx::Transform& device_transform, 65 const gfx::Transform& device_transform,
66 bool can_render_to_separate_surface,
66 PropertyTrees* property_trees, 67 PropertyTrees* property_trees,
67 LayerImplList* update_layer_list); 68 LayerImplList* update_layer_list);
68 69
69 void CC_EXPORT 70 void CC_EXPORT
70 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer, 71 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer,
71 PropertyTrees* property_trees, 72 PropertyTrees* property_trees,
73 bool can_render_to_separate_surface,
72 LayerList* update_layer_list); 74 LayerList* update_layer_list);
73 75
74 void CC_EXPORT 76 void CC_EXPORT
75 ComputeVisibleRectsUsingPropertyTrees(LayerImpl* root_layer, 77 ComputeVisibleRectsUsingPropertyTrees(LayerImpl* root_layer,
76 PropertyTrees* property_trees, 78 PropertyTrees* property_trees,
79 bool can_render_to_separate_surface,
77 LayerImplList* update_layer_list); 80 LayerImplList* update_layer_list);
78 81
79 void CC_EXPORT ComputeLayerDrawPropertiesUsingPropertyTrees( 82 void CC_EXPORT ComputeLayerDrawPropertiesUsingPropertyTrees(
80 const LayerImpl* layer, 83 const LayerImpl* layer,
81 const PropertyTrees* property_trees, 84 const PropertyTrees* property_trees,
82 bool layers_always_allowed_lcd_text, 85 bool layers_always_allowed_lcd_text,
83 bool can_use_lcd_text, 86 bool can_use_lcd_text,
84 DrawProperties* draw_properties); 87 DrawProperties* draw_properties);
85 88
86 void CC_EXPORT ComputeSurfaceDrawPropertiesUsingPropertyTrees( 89 void CC_EXPORT ComputeSurfaceDrawPropertiesUsingPropertyTrees(
(...skipping 29 matching lines...) Expand all
116 119
117 void CC_EXPORT 120 void CC_EXPORT
118 UpdatePageScaleFactorInPropertyTrees(PropertyTrees* property_trees, 121 UpdatePageScaleFactorInPropertyTrees(PropertyTrees* property_trees,
119 const Layer* page_scale_layer, 122 const Layer* page_scale_layer,
120 float page_scale_factor, 123 float page_scale_factor,
121 float device_scale_factor, 124 float device_scale_factor,
122 const gfx::Transform device_transform); 125 const gfx::Transform device_transform);
123 } // namespace cc 126 } // namespace cc
124 127
125 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ 128 #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