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

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

Issue 687873004: Introduce Property Trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wip-awoloszyn2
Patch Set: . Created 6 years 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
OLDNEW
(Empty)
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.
4
5 #ifndef CC_TREES_DRAW_PROPERTY_UTILS_H_
6 #define CC_TREES_DRAW_PROPERTY_UTILS_H_
7
8 #include "cc/base/cc_export.h"
9
10 namespace gfx {
11 class Rect;
12 class Transform;
13 } // namespace gfx
14
15 namespace cc {
16
17 class Layer;
18
19 struct ClipNodeData;
20 struct TransformNodeData;
21
22 template <typename T>
23 struct TreeNode;
24
25 template <typename T>
26 class PropertyTree;
27
28 // Computes combined clips for every node in |clip_tree|. This function requires
29 // that |transform_tree| has been updated via |ComputeTransforms|.
30 // TODO(vollick): ComputeClips and ComputeTransforms will eventually need to be
31 // done on both threads.
32 void CC_EXPORT
33 ComputeClips(PropertyTree<TreeNode<ClipNodeData>>* clip_tree,
34 const PropertyTree<TreeNode<TransformNodeData>>& transform_tree);
35
36 // Computes combined (screen space) transforms for every node in the transform
37 // tree. This must be done prior to calling |ComputeClips|.
38 void CC_EXPORT
39 ComputeTransforms(PropertyTree<TreeNode<TransformNodeData>>* transform_tree);
40
41 // Computes the visible content rect for every layer under |root_layer|. The
42 // visible content rect is the clipped content space rect that will be used for
43 // recording.
44 void CC_EXPORT ComputeVisibleRectsUsingPropertyTrees(
45 Layer* root_layer,
46 const Layer* page_scale_layer,
47 float page_scale_factor,
48 float device_scale_factor,
49 const gfx::Rect& viewport,
50 const gfx::Transform& device_transform,
51 PropertyTree<TreeNode<TransformNodeData>>* transform_tree,
52 PropertyTree<TreeNode<ClipNodeData>>* clip_tree);
53
54 } // namespace cc
55
56 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698