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

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

Issue 2452303003: Revert of cc : Move screen space scale factor to root transform node (Closed)
Patch Set: resolve merge conflicts 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_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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void set_page_scale_factor(float page_scale_factor) { 217 void set_page_scale_factor(float page_scale_factor) {
218 page_scale_factor_ = page_scale_factor; 218 page_scale_factor_ = page_scale_factor;
219 } 219 }
220 float page_scale_factor() const { return page_scale_factor_; } 220 float page_scale_factor() const { return page_scale_factor_; }
221 221
222 void set_device_scale_factor(float device_scale_factor) { 222 void set_device_scale_factor(float device_scale_factor) {
223 device_scale_factor_ = device_scale_factor; 223 device_scale_factor_ = device_scale_factor;
224 } 224 }
225 float device_scale_factor() const { return device_scale_factor_; } 225 float device_scale_factor() const { return device_scale_factor_; }
226 226
227 void SetRootTransformsAndScales(float device_scale_factor, 227 void SetDeviceTransform(const gfx::Transform& transform,
228 float page_scale_factor_for_root, 228 gfx::PointF root_position);
229 const gfx::Transform& device_transform, 229 void SetDeviceTransformScaleFactor(const gfx::Transform& transform);
230 gfx::PointF root_position);
231
232 float device_transform_scale_factor() const { 230 float device_transform_scale_factor() const {
233 return device_transform_scale_factor_; 231 return device_transform_scale_factor_;
234 } 232 }
235 233
236 void UpdateInnerViewportContainerBoundsDelta(); 234 void UpdateInnerViewportContainerBoundsDelta();
237 235
238 void UpdateOuterViewportContainerBoundsDelta(); 236 void UpdateOuterViewportContainerBoundsDelta();
239 237
240 void AddNodeAffectedByInnerViewportBoundsDelta(int node_id); 238 void AddNodeAffectedByInnerViewportBoundsDelta(int node_id);
241 void AddNodeAffectedByOuterViewportBoundsDelta(int node_id); 239 void AddNodeAffectedByOuterViewportBoundsDelta(int node_id);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 TransformNode* parent_node, 295 TransformNode* parent_node,
298 TransformNode* target_node); 296 TransformNode* target_node);
299 void UpdateAnimationProperties(TransformNode* node, 297 void UpdateAnimationProperties(TransformNode* node,
300 TransformNode* parent_node); 298 TransformNode* parent_node);
301 void UndoSnapping(TransformNode* node); 299 void UndoSnapping(TransformNode* node);
302 void UpdateSnapping(TransformNode* node); 300 void UpdateSnapping(TransformNode* node);
303 void UpdateNodeAndAncestorsHaveIntegerTranslations( 301 void UpdateNodeAndAncestorsHaveIntegerTranslations(
304 TransformNode* node, 302 TransformNode* node,
305 TransformNode* parent_node); 303 TransformNode* parent_node);
306 bool NeedsSourceToParentUpdate(TransformNode* node); 304 bool NeedsSourceToParentUpdate(TransformNode* node);
307 void SetContentsRootPostLocalTransform(const gfx::Transform& transform,
308 gfx::PointF root_position);
309 void SetScreenSpaceScaleOnRootNode(
310 gfx::Vector2dF screen_space_scale_components);
311 305
312 bool source_to_parent_updates_allowed_; 306 bool source_to_parent_updates_allowed_;
313 // When to_screen transform has perspective, the transform node's sublayer 307 // When to_screen transform has perspective, the transform node's sublayer
314 // scale is calculated using page scale factor, device scale factor and the 308 // scale is calculated using page scale factor, device scale factor and the
315 // scale factor of device transform. So we need to store them explicitly. 309 // scale factor of device transform. So we need to store them explicitly.
316 float page_scale_factor_; 310 float page_scale_factor_;
317 float device_scale_factor_; 311 float device_scale_factor_;
318 float device_transform_scale_factor_; 312 float device_transform_scale_factor_;
319 std::vector<int> nodes_affected_by_inner_viewport_bounds_delta_; 313 std::vector<int> nodes_affected_by_inner_viewport_bounds_delta_;
320 std::vector<int> nodes_affected_by_outer_viewport_bounds_delta_; 314 std::vector<int> nodes_affected_by_outer_viewport_bounds_delta_;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; 654 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const;
661 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, 655 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id,
662 int effect_id) const; 656 int effect_id) const;
663 657
664 PropertyTreesCachedData cached_data_; 658 PropertyTreesCachedData cached_data_;
665 }; 659 };
666 660
667 } // namespace cc 661 } // namespace cc
668 662
669 #endif // CC_TREES_PROPERTY_TREE_H_ 663 #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