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

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

Issue 2715243008: cc : Fix transform calculation bug while calculating clip rects (Closed)
Patch Set: Created 3 years, 9 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.h ('k') | no next file » | 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 gfx::Transform screen_space_transform = transform_tree.ToScreen(transform_id); 2080 gfx::Transform screen_space_transform = transform_tree.ToScreen(transform_id);
2081 const EffectNode* effect_node = effect_tree.Node(effect_id); 2081 const EffectNode* effect_node = effect_tree.Node(effect_id);
2082 2082
2083 if (effect_node->surface_contents_scale.x() != 0.0 && 2083 if (effect_node->surface_contents_scale.x() != 0.0 &&
2084 effect_node->surface_contents_scale.y() != 0.0) 2084 effect_node->surface_contents_scale.y() != 0.0)
2085 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), 2085 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(),
2086 1.0 / effect_node->surface_contents_scale.y()); 2086 1.0 / effect_node->surface_contents_scale.y());
2087 return screen_space_transform; 2087 return screen_space_transform;
2088 } 2088 }
2089 2089
2090 bool PropertyTrees::ComputeTransformFromTarget(
2091 int transform_id,
2092 int effect_id,
2093 gfx::Transform* transform) const {
2094 transform->MakeIdentity();
2095 if (transform_id == TransformTree::kInvalidNodeId)
2096 return true;
2097
2098 const EffectNode* effect_node = effect_tree.Node(effect_id);
2099
2100 bool success = GetFromTarget(transform_id, effect_id, transform);
2101 transform->Scale(effect_node->surface_contents_scale.x(),
2102 effect_node->surface_contents_scale.y());
2103 return success;
2104 }
2105
2106 } // namespace cc 2090 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/property_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698