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

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

Issue 1142853003: cc: Make TransformNodeData scroll offset a ScrollOffset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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.cc ('k') | cc/trees/property_tree_builder.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"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/scroll_offset.h"
13 #include "ui/gfx/transform.h" 14 #include "ui/gfx/transform.h"
14 15
15 namespace cc { 16 namespace cc {
16 17
17 template <typename T> 18 template <typename T>
18 struct CC_EXPORT TreeNode { 19 struct CC_EXPORT TreeNode {
19 TreeNode() : id(-1), parent_id(-1), owner_id(-1), data() {} 20 TreeNode() : id(-1), parent_id(-1), owner_id(-1), data() {}
20 int id; 21 int id;
21 int parent_id; 22 int parent_id;
22 int owner_id; 23 int owner_id;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // This is used as a fallback when we either cannot adjust raster scale or if 90 // This is used as a fallback when we either cannot adjust raster scale or if
90 // the raster scale cannot be extracted from the screen space transform. 91 // the raster scale cannot be extracted from the screen space transform.
91 float layer_scale_factor; 92 float layer_scale_factor;
92 93
93 // TODO(vollick): will be moved when accelerated effects are implemented. 94 // TODO(vollick): will be moved when accelerated effects are implemented.
94 float post_local_scale_factor; 95 float post_local_scale_factor;
95 96
96 gfx::Vector2dF sublayer_scale; 97 gfx::Vector2dF sublayer_scale;
97 98
98 // TODO(vollick): will be moved when accelerated effects are implemented. 99 // TODO(vollick): will be moved when accelerated effects are implemented.
99 gfx::Vector2dF scroll_offset; 100 gfx::ScrollOffset scroll_offset;
100 101
101 // We scroll snap where possible, but this has an effect on scroll 102 // We scroll snap where possible, but this has an effect on scroll
102 // compensation: the snap is yet more scrolling that must be compensated for. 103 // compensation: the snap is yet more scrolling that must be compensated for.
103 // This value stores the snapped amount for this purpose. 104 // This value stores the snapped amount for this purpose.
104 gfx::Vector2dF scroll_snap; 105 gfx::Vector2dF scroll_snap;
105 106
106 // TODO(vollick): will be moved when accelerated effects are implemented. 107 // TODO(vollick): will be moved when accelerated effects are implemented.
107 gfx::Vector2dF source_offset; 108 gfx::Vector2dF source_offset;
108 109
109 void set_to_parent(const gfx::Transform& transform) { 110 void set_to_parent(const gfx::Transform& transform) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 244
244 TransformTree transform_tree; 245 TransformTree transform_tree;
245 OpacityTree opacity_tree; 246 OpacityTree opacity_tree;
246 ClipTree clip_tree; 247 ClipTree clip_tree;
247 bool needs_rebuild; 248 bool needs_rebuild;
248 }; 249 };
249 250
250 } // namespace cc 251 } // namespace cc
251 252
252 #endif // CC_TREES_PROPERTY_TREE_H_ 253 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698