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

Side by Side Diff: cc/debug/debug_rect_history.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/cc_tests.gyp ('k') | cc/debug/micro_benchmark_controller.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/debug/debug_rect_history.h" 5 #include "cc/debug/debug_rect_history.h"
6 6
7 #include "cc/base/math_util.h" 7 #include "cc/base/math_util.h"
8 #include "cc/layers/layer_impl.h" 8 #include "cc/layers/layer_impl.h"
9 #include "cc/layers/layer_iterator.h" 9 #include "cc/layers/layer_iterator.h"
10 #include "cc/layers/layer_utils.h" 10 #include "cc/layers/layer_utils.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 Region invalidation_region = layer->GetInvalidationRegion(); 71 Region invalidation_region = layer->GetInvalidationRegion();
72 if (!invalidation_region.IsEmpty() && layer->DrawsContent()) { 72 if (!invalidation_region.IsEmpty() && layer->DrawsContent()) {
73 for (Region::Iterator it(invalidation_region); it.has_rect(); it.next()) { 73 for (Region::Iterator it(invalidation_region); it.has_rect(); it.next()) {
74 debug_rects_.push_back(DebugRect( 74 debug_rects_.push_back(DebugRect(
75 PAINT_RECT_TYPE, MathUtil::MapEnclosingClippedRect( 75 PAINT_RECT_TYPE, MathUtil::MapEnclosingClippedRect(
76 layer->screen_space_transform(), it.rect()))); 76 layer->screen_space_transform(), it.rect())));
77 } 77 }
78 } 78 }
79 79
80 for (unsigned i = 0; i < layer->children().size(); ++i) 80 for (unsigned i = 0; i < layer->children().size(); ++i)
81 SavePaintRects(layer->children()[i]); 81 SavePaintRects(layer->children()[i].get());
82 } 82 }
83 83
84 void DebugRectHistory::SavePropertyChangedRects( 84 void DebugRectHistory::SavePropertyChangedRects(
85 const LayerImplList& render_surface_layer_list, 85 const LayerImplList& render_surface_layer_list,
86 LayerImpl* hud_layer) { 86 LayerImpl* hud_layer) {
87 for (size_t i = 0; i < render_surface_layer_list.size(); ++i) { 87 for (size_t i = 0; i < render_surface_layer_list.size(); ++i) {
88 size_t surface_index = render_surface_layer_list.size() - 1 - i; 88 size_t surface_index = render_surface_layer_list.size() - 1 - i;
89 LayerImpl* render_surface_layer = render_surface_layer_list[surface_index]; 89 LayerImpl* render_surface_layer = render_surface_layer_list[surface_index];
90 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); 90 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface();
91 DCHECK(render_surface); 91 DCHECK(render_surface);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 debug_rects_.push_back( 237 debug_rects_.push_back(
238 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, 238 DebugRect(ANIMATION_BOUNDS_RECT_TYPE,
239 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), 239 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(),
240 inflated_bounds.y(), 240 inflated_bounds.y(),
241 inflated_bounds.width(), 241 inflated_bounds.width(),
242 inflated_bounds.height())))); 242 inflated_bounds.height()))));
243 } 243 }
244 } 244 }
245 245
246 } // namespace cc 246 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/debug/micro_benchmark_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698