Disable blink_perf.events on x64.
[chromium-blink-merge.git] / cc / trees / draw_property_utils.h
blob986720782a56a6f0ccef1dc4201bbde2d543768f
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"
10 namespace gfx {
11 class Rect;
12 class Transform;
13 } // namespace gfx
15 namespace cc {
17 class ClipTree;
18 class Layer;
19 class LayerImpl;
20 class OpacityTree;
21 class TransformTree;
22 class PropertyTrees;
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.
28 void CC_EXPORT
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
37 // recording.
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);
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);
56 void CC_EXPORT
57 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer,
58 PropertyTrees* property_trees);
60 void CC_EXPORT
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);
79 float CC_EXPORT
80 DrawOpacityFromPropertyTrees(const Layer* layer, const OpacityTree& tree);
82 float CC_EXPORT
83 DrawOpacityFromPropertyTrees(const LayerImpl* layer, const OpacityTree& tree);
85 } // namespace cc
87 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_