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

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

Issue 2148383005: cc: Use sublayer scale from effect tree (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 5 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/property_tree_unittest.cc ('k') | cc/trees/transform_node.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TRANSFORM_NODE_H_ 5 #ifndef CC_TREES_TRANSFORM_NODE_H_
6 #define CC_TREES_TRANSFORM_NODE_H_ 6 #define CC_TREES_TRANSFORM_NODE_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "ui/gfx/geometry/point_f.h" 9 #include "ui/gfx/geometry/point_f.h"
10 #include "ui/gfx/geometry/scroll_offset.h" 10 #include "ui/gfx/geometry/scroll_offset.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // This is true if the to_parent transform at every node on the path to the 84 // This is true if the to_parent transform at every node on the path to the
85 // root is flat. 85 // root is flat.
86 bool node_and_ancestors_are_flat : 1; 86 bool node_and_ancestors_are_flat : 1;
87 87
88 // This is needed to know if a layer can use lcd text. 88 // This is needed to know if a layer can use lcd text.
89 bool node_and_ancestors_have_only_integer_translation : 1; 89 bool node_and_ancestors_have_only_integer_translation : 1;
90 90
91 bool scrolls : 1; 91 bool scrolls : 1;
92 92
93 bool needs_sublayer_scale : 1; 93 bool needs_surface_contents_scale : 1;
94 94
95 // These are used to position nodes wrt the right or bottom of the inner or 95 // These are used to position nodes wrt the right or bottom of the inner or
96 // outer viewport. 96 // outer viewport.
97 bool affected_by_inner_viewport_bounds_delta_x : 1; 97 bool affected_by_inner_viewport_bounds_delta_x : 1;
98 bool affected_by_inner_viewport_bounds_delta_y : 1; 98 bool affected_by_inner_viewport_bounds_delta_y : 1;
99 bool affected_by_outer_viewport_bounds_delta_x : 1; 99 bool affected_by_outer_viewport_bounds_delta_x : 1;
100 bool affected_by_outer_viewport_bounds_delta_y : 1; 100 bool affected_by_outer_viewport_bounds_delta_y : 1;
101 101
102 // Layer scale factor is used as a fallback when we either cannot adjust 102 // Layer scale factor is used as a fallback when we either cannot adjust
103 // raster scale or if the raster scale cannot be extracted from the screen 103 // raster scale or if the raster scale cannot be extracted from the screen
104 // space transform. For layers in the subtree of the page scale layer, the 104 // space transform. For layers in the subtree of the page scale layer, the
105 // layer scale factor should include the page scale factor. 105 // layer scale factor should include the page scale factor.
106 bool in_subtree_of_page_scale_layer : 1; 106 bool in_subtree_of_page_scale_layer : 1;
107 107
108 // We need to track changes to to_screen transform to compute the damage rect. 108 // We need to track changes to to_screen transform to compute the damage rect.
109 bool transform_changed : 1; 109 bool transform_changed : 1;
110 110
111 // TODO(vollick): will be moved when accelerated effects are implemented. 111 // TODO(vollick): will be moved when accelerated effects are implemented.
112 float post_local_scale_factor; 112 float post_local_scale_factor;
113 113
114 gfx::Vector2dF sublayer_scale; 114 gfx::Vector2dF surface_contents_scale;
115 115
116 // TODO(vollick): will be moved when accelerated effects are implemented. 116 // TODO(vollick): will be moved when accelerated effects are implemented.
117 gfx::ScrollOffset scroll_offset; 117 gfx::ScrollOffset scroll_offset;
118 118
119 // We scroll snap where possible, but this means fixed-pos elements must be 119 // We scroll snap where possible, but this means fixed-pos elements must be
120 // adjusted. This value stores the snapped amount for this purpose. 120 // adjusted. This value stores the snapped amount for this purpose.
121 gfx::Vector2dF scroll_snap; 121 gfx::Vector2dF scroll_snap;
122 122
123 // TODO(vollick): will be moved when accelerated effects are implemented. 123 // TODO(vollick): will be moved when accelerated effects are implemented.
124 gfx::Vector2dF source_offset; 124 gfx::Vector2dF source_offset;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 bool operator==(const TransformCachedNodeData& other) const; 160 bool operator==(const TransformCachedNodeData& other) const;
161 161
162 void ToProtobuf(proto::TransformCachedNodeData* proto) const; 162 void ToProtobuf(proto::TransformCachedNodeData* proto) const;
163 void FromProtobuf(const proto::TransformCachedNodeData& proto); 163 void FromProtobuf(const proto::TransformCachedNodeData& proto);
164 }; 164 };
165 165
166 } // namespace cc 166 } // namespace cc
167 167
168 #endif // CC_TREES_TRANSFORM_NODE_H_ 168 #endif // CC_TREES_TRANSFORM_NODE_H_
OLDNEW
« no previous file with comments | « cc/trees/property_tree_unittest.cc ('k') | cc/trees/transform_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698