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

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

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rectfconvert-cc: rebase-and-sandwich-strategy Created 5 years, 3 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/picture_layer_tiling_unittest.cc ('k') | 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 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // Transform rect from the current target's space to the next. 410 // Transform rect from the current target's space to the next.
411 LayerImpl* current_target = current_state->render_target; 411 LayerImpl* current_target = current_state->render_target;
412 DCHECK(current_target->render_surface()); 412 DCHECK(current_target->render_surface());
413 const gfx::Transform& current_draw_transform = 413 const gfx::Transform& current_draw_transform =
414 current_target->render_surface()->draw_transform(); 414 current_target->render_surface()->draw_transform();
415 415
416 // If we have unclipped descendants, the draw transform is a translation. 416 // If we have unclipped descendants, the draw transform is a translation.
417 DCHECK_IMPLIES(current_target->num_unclipped_descendants(), 417 DCHECK_IMPLIES(current_target->num_unclipped_descendants(),
418 current_draw_transform.IsIdentityOrTranslation()); 418 current_draw_transform.IsIdentityOrTranslation());
419 419
420 target_rect = gfx::ToEnclosingRect( 420 target_rect =
421 MathUtil::MapClippedRect(current_draw_transform, target_rect)); 421 MathUtil::MapEnclosingClippedRect(current_draw_transform, target_rect);
422 } 422 }
423 423
424 // It is an error to not reach |render_target|. If this happens, it means that 424 // It is an error to not reach |render_target|. If this happens, it means that
425 // either the clip parent is not an ancestor of the clip child or the surface 425 // either the clip parent is not an ancestor of the clip child or the surface
426 // state vector is empty, both of which should be impossible. 426 // state vector is empty, both of which should be impossible.
427 DCHECK(found_render_target); 427 DCHECK(found_render_target);
428 } 428 }
429 429
430 template <typename LayerType> 430 template <typename LayerType>
431 static inline bool LayerIsInExisting3DRenderingContext(LayerType* layer) { 431 static inline bool LayerIsInExisting3DRenderingContext(LayerType* layer) {
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2777 2777
2778 PropertyTrees* GetPropertyTrees(Layer* layer) { 2778 PropertyTrees* GetPropertyTrees(Layer* layer) {
2779 return layer->layer_tree_host()->property_trees(); 2779 return layer->layer_tree_host()->property_trees();
2780 } 2780 }
2781 2781
2782 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 2782 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
2783 return layer->layer_tree_impl()->property_trees(); 2783 return layer->layer_tree_impl()->property_trees();
2784 } 2784 }
2785 2785
2786 } // namespace cc 2786 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698