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

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

Issue 1213193003: Remove DCHECK_IMPLIES and CHECK_IMPLIES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 break; 295 break;
296 } 296 }
297 297
298 // Transform rect from the current target's space to the next. 298 // Transform rect from the current target's space to the next.
299 LayerType* current_target = current_state->render_target; 299 LayerType* current_target = current_state->render_target;
300 DCHECK(current_target->render_surface()); 300 DCHECK(current_target->render_surface());
301 const gfx::Transform& current_draw_transform = 301 const gfx::Transform& current_draw_transform =
302 current_target->render_surface()->draw_transform(); 302 current_target->render_surface()->draw_transform();
303 303
304 // If we have unclipped descendants, the draw transform is a translation. 304 // If we have unclipped descendants, the draw transform is a translation.
305 DCHECK_IMPLIES(current_target->num_unclipped_descendants(), 305 DCHECK(!current_target->num_unclipped_descendants() ||
306 current_draw_transform.IsIdentityOrTranslation()); 306 current_draw_transform.IsIdentityOrTranslation());
307 307
308 target_rect = gfx::ToEnclosingRect( 308 target_rect = gfx::ToEnclosingRect(
309 MathUtil::MapClippedRect(current_draw_transform, target_rect)); 309 MathUtil::MapClippedRect(current_draw_transform, target_rect));
310 } 310 }
311 311
312 // It is an error to not reach |render_target|. If this happens, it means that 312 // It is an error to not reach |render_target|. If this happens, it means that
313 // either the clip parent is not an ancestor of the clip child or the surface 313 // either the clip parent is not an ancestor of the clip child or the surface
314 // state vector is empty, both of which should be impossible. 314 // state vector is empty, both of which should be impossible.
315 DCHECK(found_render_target); 315 DCHECK(found_render_target);
316 } 316 }
(...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2636 2636
2637 PropertyTrees* GetPropertyTrees(Layer* layer) { 2637 PropertyTrees* GetPropertyTrees(Layer* layer) {
2638 return layer->layer_tree_host()->property_trees(); 2638 return layer->layer_tree_host()->property_trees();
2639 } 2639 }
2640 2640
2641 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 2641 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
2642 return layer->layer_tree_impl()->property_trees(); 2642 return layer->layer_tree_impl()->property_trees();
2643 } 2643 }
2644 2644
2645 } // namespace cc 2645 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698