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

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

Issue 2271273003: cc : Remove DCHECK in TransformTree::ComputeTranslation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setDouble again Created 4 years, 4 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
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 gfx::Transform to_screen = ToScreen(dest_id); 206 gfx::Transform to_screen = ToScreen(dest_id);
207 to_screen.FlattenTo2d(); 207 to_screen.FlattenTo2d();
208 gfx::Transform from_screen; 208 gfx::Transform from_screen;
209 bool success = to_screen.GetInverse(&from_screen); 209 bool success = to_screen.GetInverse(&from_screen);
210 if (!success) 210 if (!success)
211 return false; 211 return false;
212 transform->ConcatTransform(from_screen); 212 transform->ConcatTransform(from_screen);
213 } 213 }
214 } 214 }
215 215
216 DCHECK(
217 transform->IsApproximatelyIdentityOrTranslation(SkDoubleToMScalar(1e-4)));
218 return true; 216 return true;
219 } 217 }
220 218
221 bool TransformTree::NeedsSourceToParentUpdate(TransformNode* node) { 219 bool TransformTree::NeedsSourceToParentUpdate(TransformNode* node) {
222 return (source_to_parent_updates_allowed() && 220 return (source_to_parent_updates_allowed() &&
223 node->parent_id != node->source_node_id); 221 node->parent_id != node->source_node_id);
224 } 222 }
225 223
226 void TransformTree::ResetChangeTracking() { 224 void TransformTree::ResetChangeTracking() {
227 for (int id = 1; id < static_cast<int>(size()); ++id) { 225 for (int id = 1; id < static_cast<int>(size()); ++id) {
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 from_target.ConcatTransform(draw_transforms.from_target); 2201 from_target.ConcatTransform(draw_transforms.from_target);
2204 from_target.Scale(effect_node->surface_contents_scale.x(), 2202 from_target.Scale(effect_node->surface_contents_scale.x(),
2205 effect_node->surface_contents_scale.y()); 2203 effect_node->surface_contents_scale.y());
2206 DCHECK(from_target.ApproximatelyEqual(*transform) || 2204 DCHECK(from_target.ApproximatelyEqual(*transform) ||
2207 !draw_transforms.invertible); 2205 !draw_transforms.invertible);
2208 } 2206 }
2209 return success; 2207 return success;
2210 } 2208 }
2211 2209
2212 } // namespace cc 2210 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host_common_unittest.cc ('K') | « cc/trees/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698