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

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

Issue 1106013002: cc: Fix property tree position updates when rebuilding is skipped (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test 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/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.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_PROPERTY_TREE_H_ 5 #ifndef CC_TREES_PROPERTY_TREE_H_
6 #define CC_TREES_PROPERTY_TREE_H_ 6 #define CC_TREES_PROPERTY_TREE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 gfx::Transform from_target; 53 gfx::Transform from_target;
54 54
55 gfx::Transform to_screen; 55 gfx::Transform to_screen;
56 gfx::Transform from_screen; 56 gfx::Transform from_screen;
57 57
58 int target_id; 58 int target_id;
59 // This id is used for all content that draws into a render surface associated 59 // This id is used for all content that draws into a render surface associated
60 // with this transform node. 60 // with this transform node.
61 int content_target_id; 61 int content_target_id;
62 62
63 // This is the node with respect to which source_offset is defined. This will
64 // not be needed once layerization moves to cc, but is needed in order to
65 // efficiently update the transform tree for changes to position in the layer
66 // tree.
67 int source_node_id;
68
63 // TODO(vollick): will be moved when accelerated effects are implemented. 69 // TODO(vollick): will be moved when accelerated effects are implemented.
64 bool needs_local_transform_update; 70 bool needs_local_transform_update;
65 71
66 bool is_invertible; 72 bool is_invertible;
67 bool ancestors_are_invertible; 73 bool ancestors_are_invertible;
68 74
69 bool is_animated; 75 bool is_animated;
70 bool to_screen_is_animated; 76 bool to_screen_is_animated;
71 77
72 // Flattening, when needed, is only applied to a node's inherited transform, 78 // Flattening, when needed, is only applied to a node's inherited transform,
(...skipping 18 matching lines...) Expand all
91 97
92 // TODO(vollick): will be moved when accelerated effects are implemented. 98 // TODO(vollick): will be moved when accelerated effects are implemented.
93 gfx::Vector2dF scroll_offset; 99 gfx::Vector2dF scroll_offset;
94 100
95 // We scroll snap where possible, but this has an effect on scroll 101 // We scroll snap where possible, but this has an effect on scroll
96 // compensation: the snap is yet more scrolling that must be compensated for. 102 // compensation: the snap is yet more scrolling that must be compensated for.
97 // This value stores the snapped amount for this purpose. 103 // This value stores the snapped amount for this purpose.
98 gfx::Vector2dF scroll_snap; 104 gfx::Vector2dF scroll_snap;
99 105
100 // TODO(vollick): will be moved when accelerated effects are implemented. 106 // TODO(vollick): will be moved when accelerated effects are implemented.
101 gfx::Vector2dF parent_offset; 107 gfx::Vector2dF source_offset;
102 108
103 void set_to_parent(const gfx::Transform& transform) { 109 void set_to_parent(const gfx::Transform& transform) {
104 to_parent = transform; 110 to_parent = transform;
105 is_invertible = to_parent.IsInvertible(); 111 is_invertible = to_parent.IsInvertible();
106 } 112 }
107 113
108 void update_pre_local_transform(const gfx::Point3F& transform_origin); 114 void update_pre_local_transform(const gfx::Point3F& transform_origin);
109 115
110 void update_post_local_transform(const gfx::PointF& position, 116 void update_post_local_transform(const gfx::PointF& position,
111 const gfx::Point3F& transform_origin); 117 const gfx::Point3F& transform_origin);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 237
232 TransformTree transform_tree; 238 TransformTree transform_tree;
233 OpacityTree opacity_tree; 239 OpacityTree opacity_tree;
234 ClipTree clip_tree; 240 ClipTree clip_tree;
235 bool needs_rebuild; 241 bool needs_rebuild;
236 }; 242 };
237 243
238 } // namespace cc 244 } // namespace cc
239 245
240 #endif // CC_TREES_PROPERTY_TREE_H_ 246 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698