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

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

Issue 2454203002: Revert of cc : Move screen space scale factor to root transform node (Closed)
Patch Set: Created 4 years, 1 month 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_impl.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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void set_page_scale_factor(float page_scale_factor) { 214 void set_page_scale_factor(float page_scale_factor) {
215 page_scale_factor_ = page_scale_factor; 215 page_scale_factor_ = page_scale_factor;
216 } 216 }
217 float page_scale_factor() const { return page_scale_factor_; } 217 float page_scale_factor() const { return page_scale_factor_; }
218 218
219 void set_device_scale_factor(float device_scale_factor) { 219 void set_device_scale_factor(float device_scale_factor) {
220 device_scale_factor_ = device_scale_factor; 220 device_scale_factor_ = device_scale_factor;
221 } 221 }
222 float device_scale_factor() const { return device_scale_factor_; } 222 float device_scale_factor() const { return device_scale_factor_; }
223 223
224 void SetRootTransformsAndScales(float device_scale_factor, 224 void SetDeviceTransform(const gfx::Transform& transform,
225 float page_scale_factor_for_root, 225 gfx::PointF root_position);
226 const gfx::Transform& device_transform, 226 void SetDeviceTransformScaleFactor(const gfx::Transform& transform);
227 gfx::PointF root_position);
228
229 float device_transform_scale_factor() const { 227 float device_transform_scale_factor() const {
230 return device_transform_scale_factor_; 228 return device_transform_scale_factor_;
231 } 229 }
232 230
233 void UpdateInnerViewportContainerBoundsDelta(); 231 void UpdateInnerViewportContainerBoundsDelta();
234 232
235 void UpdateOuterViewportContainerBoundsDelta(); 233 void UpdateOuterViewportContainerBoundsDelta();
236 234
237 void AddNodeAffectedByInnerViewportBoundsDelta(int node_id); 235 void AddNodeAffectedByInnerViewportBoundsDelta(int node_id);
238 void AddNodeAffectedByOuterViewportBoundsDelta(int node_id); 236 void AddNodeAffectedByOuterViewportBoundsDelta(int node_id);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 void UpdateTargetSpaceTransform(TransformNode* node, 303 void UpdateTargetSpaceTransform(TransformNode* node,
306 TransformNode* target_node); 304 TransformNode* target_node);
307 void UpdateAnimationProperties(TransformNode* node, 305 void UpdateAnimationProperties(TransformNode* node,
308 TransformNode* parent_node); 306 TransformNode* parent_node);
309 void UndoSnapping(TransformNode* node); 307 void UndoSnapping(TransformNode* node);
310 void UpdateSnapping(TransformNode* node); 308 void UpdateSnapping(TransformNode* node);
311 void UpdateNodeAndAncestorsHaveIntegerTranslations( 309 void UpdateNodeAndAncestorsHaveIntegerTranslations(
312 TransformNode* node, 310 TransformNode* node,
313 TransformNode* parent_node); 311 TransformNode* parent_node);
314 bool NeedsSourceToParentUpdate(TransformNode* node); 312 bool NeedsSourceToParentUpdate(TransformNode* node);
315 void SetContentsRootPostLocalTransform(const gfx::Transform& transform,
316 gfx::PointF root_position);
317 void SetScreenSpaceScaleOnRootNode(
318 gfx::Vector2dF screen_space_scale_components);
319 313
320 bool source_to_parent_updates_allowed_; 314 bool source_to_parent_updates_allowed_;
321 // When to_screen transform has perspective, the transform node's sublayer 315 // When to_screen transform has perspective, the transform node's sublayer
322 // scale is calculated using page scale factor, device scale factor and the 316 // scale is calculated using page scale factor, device scale factor and the
323 // scale factor of device transform. So we need to store them explicitly. 317 // scale factor of device transform. So we need to store them explicitly.
324 float page_scale_factor_; 318 float page_scale_factor_;
325 float device_scale_factor_; 319 float device_scale_factor_;
326 float device_transform_scale_factor_; 320 float device_transform_scale_factor_;
327 std::vector<int> nodes_affected_by_inner_viewport_bounds_delta_; 321 std::vector<int> nodes_affected_by_inner_viewport_bounds_delta_;
328 std::vector<int> nodes_affected_by_outer_viewport_bounds_delta_; 322 std::vector<int> nodes_affected_by_outer_viewport_bounds_delta_;
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 gfx::Vector2dF inner_viewport_container_bounds_delta_; 643 gfx::Vector2dF inner_viewport_container_bounds_delta_;
650 gfx::Vector2dF outer_viewport_container_bounds_delta_; 644 gfx::Vector2dF outer_viewport_container_bounds_delta_;
651 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; 645 gfx::Vector2dF inner_viewport_scroll_bounds_delta_;
652 646
653 PropertyTreesCachedData cached_data_; 647 PropertyTreesCachedData cached_data_;
654 }; 648 };
655 649
656 } // namespace cc 650 } // namespace cc
657 651
658 #endif // CC_TREES_PROPERTY_TREE_H_ 652 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698