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

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

Issue 2408243002: cc : Move screen space scale factor to root transform node (Closed)
Patch Set: comments 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 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 SetDeviceTransform(const gfx::Transform& transform, 227 void SetRootTransformsAndScales(float device_scale_factor,
228 gfx::PointF root_position); 228 float page_scale_factor_for_root,
229 void SetDeviceTransformScaleFactor(const gfx::Transform& transform); 229 const gfx::Transform& device_transform,
230 gfx::PointF root_position);
231
230 float device_transform_scale_factor() const { 232 float device_transform_scale_factor() const {
231 return device_transform_scale_factor_; 233 return device_transform_scale_factor_;
232 } 234 }
233 235
234 void UpdateInnerViewportContainerBoundsDelta(); 236 void UpdateInnerViewportContainerBoundsDelta();
235 237
236 void UpdateOuterViewportContainerBoundsDelta(); 238 void UpdateOuterViewportContainerBoundsDelta();
237 239
238 void AddNodeAffectedByInnerViewportBoundsDelta(int node_id); 240 void AddNodeAffectedByInnerViewportBoundsDelta(int node_id);
239 void AddNodeAffectedByOuterViewportBoundsDelta(int node_id); 241 void AddNodeAffectedByOuterViewportBoundsDelta(int node_id);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 void UpdateTargetSpaceTransform(TransformNode* node, 308 void UpdateTargetSpaceTransform(TransformNode* node,
307 TransformNode* target_node); 309 TransformNode* target_node);
308 void UpdateAnimationProperties(TransformNode* node, 310 void UpdateAnimationProperties(TransformNode* node,
309 TransformNode* parent_node); 311 TransformNode* parent_node);
310 void UndoSnapping(TransformNode* node); 312 void UndoSnapping(TransformNode* node);
311 void UpdateSnapping(TransformNode* node); 313 void UpdateSnapping(TransformNode* node);
312 void UpdateNodeAndAncestorsHaveIntegerTranslations( 314 void UpdateNodeAndAncestorsHaveIntegerTranslations(
313 TransformNode* node, 315 TransformNode* node,
314 TransformNode* parent_node); 316 TransformNode* parent_node);
315 bool NeedsSourceToParentUpdate(TransformNode* node); 317 bool NeedsSourceToParentUpdate(TransformNode* node);
318 void SetContentsRootPostLocalTransform(const gfx::Transform& transform,
319 gfx::PointF root_position);
320 void SetScreenSpaceScaleOnRootNode(
321 gfx::Vector2dF screen_space_scale_components);
316 322
317 bool source_to_parent_updates_allowed_; 323 bool source_to_parent_updates_allowed_;
318 // When to_screen transform has perspective, the transform node's sublayer 324 // When to_screen transform has perspective, the transform node's sublayer
319 // scale is calculated using page scale factor, device scale factor and the 325 // scale is calculated using page scale factor, device scale factor and the
320 // scale factor of device transform. So we need to store them explicitly. 326 // scale factor of device transform. So we need to store them explicitly.
321 float page_scale_factor_; 327 float page_scale_factor_;
322 float device_scale_factor_; 328 float device_scale_factor_;
323 float device_transform_scale_factor_; 329 float device_transform_scale_factor_;
324 std::vector<int> nodes_affected_by_inner_viewport_bounds_delta_; 330 std::vector<int> nodes_affected_by_inner_viewport_bounds_delta_;
325 std::vector<int> nodes_affected_by_outer_viewport_bounds_delta_; 331 std::vector<int> nodes_affected_by_outer_viewport_bounds_delta_;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; 674 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const;
669 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, 675 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id,
670 int effect_id) const; 676 int effect_id) const;
671 677
672 PropertyTreesCachedData cached_data_; 678 PropertyTreesCachedData cached_data_;
673 }; 679 };
674 680
675 } // namespace cc 681 } // namespace cc
676 682
677 #endif // CC_TREES_PROPERTY_TREE_H_ 683 #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