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
3 // found in the LICENSE file.
5 #ifndef CC_TREES_DRAW_PROPERTY_UTILS_H_
6 #define CC_TREES_DRAW_PROPERTY_UTILS_H_
8 #include "cc/base/cc_export.h"
24 // Computes combined clips for every node in |clip_tree|. This function requires
25 // that |transform_tree| has been updated via |ComputeTransforms|.
26 // TODO(vollick): ComputeClips and ComputeTransforms will eventually need to be
27 // done on both threads.
29 ComputeClips(ClipTree
* clip_tree
, const TransformTree
& transform_tree
);
31 // Computes combined (screen space) transforms for every node in the transform
32 // tree. This must be done prior to calling |ComputeClips|.
33 void CC_EXPORT
ComputeTransforms(TransformTree
* transform_tree
);
35 // Computes the visible content rect for every layer under |root_layer|. The
36 // visible content rect is the clipped content space rect that will be used for
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
);
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
);
57 ComputeVisibleRectsUsingPropertyTrees(Layer
* root_layer
,
58 PropertyTrees
* property_trees
);
61 ComputeVisibleRectsUsingPropertyTrees(LayerImpl
* root_layer
,
62 PropertyTrees
* property_trees
);
64 gfx::Transform CC_EXPORT
65 DrawTransformFromPropertyTrees(const Layer
* layer
, const TransformTree
& tree
);
67 gfx::Transform CC_EXPORT
68 DrawTransformFromPropertyTrees(const LayerImpl
* layer
,
69 const TransformTree
& tree
);
71 gfx::Transform CC_EXPORT
72 ScreenSpaceTransformFromPropertyTrees(const Layer
* layer
,
73 const TransformTree
& tree
);
75 gfx::Transform CC_EXPORT
76 ScreenSpaceTransformFromPropertyTrees(const LayerImpl
* layer
,
77 const TransformTree
& tree
);
80 DrawOpacityFromPropertyTrees(const Layer
* layer
, const OpacityTree
& tree
);
83 DrawOpacityFromPropertyTrees(const LayerImpl
* layer
, const OpacityTree
& tree
);
87 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_