OLD | NEW |
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 #if DCHECK_IS_ON() | 123 #if DCHECK_IS_ON() |
124 TransformTree tree; | 124 TransformTree tree; |
125 // TODO(jaydasika) : Move tests that expect source_to_parent_updates_allowed | 125 // TODO(jaydasika) : Move tests that expect source_to_parent_updates_allowed |
126 // to be true on impl thread to main thread and set it to is_main_thread here. | 126 // to be true on impl thread to main thread and set it to is_main_thread here. |
127 tree.source_to_parent_updates_allowed_ = source_to_parent_updates_allowed_; | 127 tree.source_to_parent_updates_allowed_ = source_to_parent_updates_allowed_; |
128 DCHECK(tree == *this); | 128 DCHECK(tree == *this); |
129 #endif | 129 #endif |
130 } | 130 } |
131 | 131 |
132 void TransformTree::set_needs_update(bool needs_update) { | 132 void TransformTree::set_needs_update(bool needs_update) { |
133 if (needs_update && !needs_update_) | 133 if (needs_update && !PropertyTree<TransformNode>::needs_update()) |
134 property_trees()->UpdateTransformTreeUpdateNumber(); | 134 property_trees()->UpdateTransformTreeUpdateNumber(); |
135 needs_update_ = needs_update; | 135 PropertyTree<TransformNode>::set_needs_update(needs_update); |
136 } | 136 } |
137 | 137 |
138 bool TransformTree::ComputeTranslation(int source_id, | 138 bool TransformTree::ComputeTranslation(int source_id, |
139 int dest_id, | 139 int dest_id, |
140 gfx::Transform* transform) const { | 140 gfx::Transform* transform) const { |
141 transform->MakeIdentity(); | 141 transform->MakeIdentity(); |
142 if (source_id == dest_id) | 142 if (source_id == dest_id) |
143 return true; | 143 return true; |
144 | 144 |
145 const TransformNode* dest = Node(dest_id); | 145 const TransformNode* dest = Node(dest_id); |
(...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2114 const EffectNode* effect_node = effect_tree.Node(effect_id); | 2114 const EffectNode* effect_node = effect_tree.Node(effect_id); |
2115 | 2115 |
2116 if (effect_node->surface_contents_scale.x() != 0.0 && | 2116 if (effect_node->surface_contents_scale.x() != 0.0 && |
2117 effect_node->surface_contents_scale.y() != 0.0) | 2117 effect_node->surface_contents_scale.y() != 0.0) |
2118 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), | 2118 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), |
2119 1.0 / effect_node->surface_contents_scale.y()); | 2119 1.0 / effect_node->surface_contents_scale.y()); |
2120 return screen_space_transform; | 2120 return screen_space_transform; |
2121 } | 2121 } |
2122 | 2122 |
2123 } // namespace cc | 2123 } // namespace cc |
OLD | NEW |