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

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

Issue 1097583002: cc: Commit property trees to the compositor thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win bool conversion compile fix Created 5 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/layers/layer_impl.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 9
10 namespace gfx { 10 namespace gfx {
11 class Rect; 11 class Rect;
12 class Transform; 12 class Transform;
13 } // namespace gfx 13 } // namespace gfx
14 14
15 namespace cc { 15 namespace cc {
16 16
17 class ClipTree; 17 class ClipTree;
18 class Layer; 18 class Layer;
19 class LayerImpl;
19 class OpacityTree; 20 class OpacityTree;
20 class TransformTree; 21 class TransformTree;
21 class PropertyTrees; 22 class PropertyTrees;
22 23
23 // Computes combined clips for every node in |clip_tree|. This function requires 24 // Computes combined clips for every node in |clip_tree|. This function requires
24 // that |transform_tree| has been updated via |ComputeTransforms|. 25 // that |transform_tree| has been updated via |ComputeTransforms|.
25 // TODO(vollick): ComputeClips and ComputeTransforms will eventually need to be 26 // TODO(vollick): ComputeClips and ComputeTransforms will eventually need to be
26 // done on both threads. 27 // done on both threads.
27 void CC_EXPORT 28 void CC_EXPORT
28 ComputeClips(ClipTree* clip_tree, const TransformTree& transform_tree); 29 ComputeClips(ClipTree* clip_tree, const TransformTree& transform_tree);
29 30
30 // Computes combined (screen space) transforms for every node in the transform 31 // Computes combined (screen space) transforms for every node in the transform
31 // tree. This must be done prior to calling |ComputeClips|. 32 // tree. This must be done prior to calling |ComputeClips|.
32 void CC_EXPORT ComputeTransforms(TransformTree* transform_tree); 33 void CC_EXPORT ComputeTransforms(TransformTree* transform_tree);
33 34
34 // Computes the visible content rect for every layer under |root_layer|. The 35 // Computes the visible content rect for every layer under |root_layer|. The
35 // visible content rect is the clipped content space rect that will be used for 36 // visible content rect is the clipped content space rect that will be used for
36 // recording. 37 // recording.
37 void CC_EXPORT 38 void CC_EXPORT
39 BuildPropertyTreesAndComputeVisibleRects(Layer* root_layer,
40 const Layer* page_scale_layer,
41 float page_scale_factor,
42 float device_scale_factor,
43 const gfx::Rect& viewport,
44 const gfx::Transform& device_transform,
45 PropertyTrees* property_trees);
46
47 void CC_EXPORT
48 BuildPropertyTreesAndComputeVisibleRects(LayerImpl* root_layer,
49 const LayerImpl* page_scale_layer,
50 float page_scale_factor,
51 float device_scale_factor,
52 const gfx::Rect& viewport,
53 const gfx::Transform& device_transform,
54 PropertyTrees* property_trees);
55
56 void CC_EXPORT
38 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer, 57 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer,
39 const Layer* page_scale_layer,
40 float page_scale_factor,
41 float device_scale_factor,
42 const gfx::Rect& viewport,
43 const gfx::Transform& device_transform,
44 PropertyTrees* property_trees); 58 PropertyTrees* property_trees);
45 59
60 void CC_EXPORT
61 ComputeVisibleRectsUsingPropertyTrees(LayerImpl* root_layer,
62 PropertyTrees* property_trees);
63
64 gfx::Transform CC_EXPORT
65 DrawTransformFromPropertyTrees(const Layer* layer, const TransformTree& tree);
66
67 gfx::Transform CC_EXPORT
68 DrawTransformFromPropertyTrees(const LayerImpl* layer,
69 const TransformTree& tree);
70
71 gfx::Transform CC_EXPORT
72 ScreenSpaceTransformFromPropertyTrees(const Layer* layer,
73 const TransformTree& tree);
74
75 gfx::Transform CC_EXPORT
76 ScreenSpaceTransformFromPropertyTrees(const LayerImpl* layer,
77 const TransformTree& tree);
78
79 float CC_EXPORT
80 DrawOpacityFromPropertyTrees(const Layer* layer, const OpacityTree& tree);
81
82 float CC_EXPORT
83 DrawOpacityFromPropertyTrees(const LayerImpl* layer, const OpacityTree& tree);
84
46 } // namespace cc 85 } // namespace cc
47 86
48 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ 87 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698