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

Side by Side Diff: cc/trees/draw_property_utils.cc

Issue 2712053002: cc : Fix transform calculation bug while calculating clip rects (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | cc/trees/layer_tree_host_common_unittest.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 #include "cc/trees/draw_property_utils.h" 5 #include "cc/trees/draw_property_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 effect_tree.Node(clip_node->target_effect_id); 72 effect_tree.Node(clip_node->target_effect_id);
73 ConcatInverseSurfaceContentsScale(source_node, &clip_to_target); 73 ConcatInverseSurfaceContentsScale(source_node, &clip_to_target);
74 *clip_rect_in_target_space = 74 *clip_rect_in_target_space =
75 MathUtil::MapClippedRect(clip_to_target, clip_from_clip_node); 75 MathUtil::MapClippedRect(clip_to_target, clip_from_clip_node);
76 } else { 76 } else {
77 return false; 77 return false;
78 } 78 }
79 } else { 79 } else {
80 if (property_trees->ComputeTransformFromTarget( 80 if (property_trees->ComputeTransformFromTarget(
81 target_node_id, clip_node->target_effect_id, &clip_to_target)) { 81 target_node_id, clip_node->target_effect_id, &clip_to_target)) {
82 const EffectNode* source_node =
83 effect_tree.Node(clip_node->target_effect_id);
84 PostConcatSurfaceContentsScale(target_effect_node, &clip_to_target);
85 ConcatInverseSurfaceContentsScale(source_node, &clip_to_target);
jaydasika 2017/02/24 01:08:39 We do the same thing in ComputeClips when we calcu
82 *clip_rect_in_target_space = 86 *clip_rect_in_target_space =
83 MathUtil::ProjectClippedRect(clip_to_target, clip_from_clip_node); 87 MathUtil::ProjectClippedRect(clip_to_target, clip_from_clip_node);
84 } else { 88 } else {
85 return false; 89 return false;
86 } 90 }
87 } 91 }
88 return true; 92 return true;
89 } 93 }
90 94
91 struct ConditionalClip { 95 struct ConditionalClip {
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1513 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1510 const Layer* overscroll_elasticity_layer, 1514 const Layer* overscroll_elasticity_layer,
1511 const gfx::Vector2dF& elastic_overscroll) { 1515 const gfx::Vector2dF& elastic_overscroll) {
1512 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1516 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1513 elastic_overscroll); 1517 elastic_overscroll);
1514 } 1518 }
1515 1519
1516 } // namespace draw_property_utils 1520 } // namespace draw_property_utils
1517 1521
1518 } // namespace cc 1522 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698