| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" |
| 9 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| 10 #include "cc/layers/layer_impl.h" | 11 #include "cc/layers/layer_impl.h" |
| 11 #include "cc/layers/layer_iterator.h" | 12 #include "cc/layers/layer_iterator.h" |
| 12 #include "cc/layers/layer_list_iterator.h" | 13 #include "cc/layers/layer_list_iterator.h" |
| 13 #include "cc/layers/layer_utils.h" | 14 #include "cc/layers/layer_utils.h" |
| 14 #include "cc/layers/render_surface_impl.h" | 15 #include "cc/layers/render_surface_impl.h" |
| 15 #include "cc/trees/damage_tracker.h" | 16 #include "cc/trees/damage_tracker.h" |
| 16 #include "cc/trees/layer_tree_host.h" | 17 #include "cc/trees/layer_tree_host.h" |
| 17 #include "cc/trees/layer_tree_host_common.h" | 18 #include "cc/trees/layer_tree_host_common.h" |
| 18 #include "cc/trees/layer_tree_impl.h" | 19 #include "cc/trees/layer_tree_impl.h" |
| 19 #include "ui/gfx/geometry/rect_conversions.h" | 20 #include "ui/gfx/geometry/rect_conversions.h" |
| 20 | 21 |
| 21 namespace cc { | 22 namespace cc { |
| 22 | 23 |
| 23 // static | 24 // static |
| 24 scoped_ptr<DebugRectHistory> DebugRectHistory::Create() { | 25 std::unique_ptr<DebugRectHistory> DebugRectHistory::Create() { |
| 25 return make_scoped_ptr(new DebugRectHistory()); | 26 return base::WrapUnique(new DebugRectHistory()); |
| 26 } | 27 } |
| 27 | 28 |
| 28 DebugRectHistory::DebugRectHistory() {} | 29 DebugRectHistory::DebugRectHistory() {} |
| 29 | 30 |
| 30 DebugRectHistory::~DebugRectHistory() {} | 31 DebugRectHistory::~DebugRectHistory() {} |
| 31 | 32 |
| 32 void DebugRectHistory::SaveDebugRectsForCurrentFrame( | 33 void DebugRectHistory::SaveDebugRectsForCurrentFrame( |
| 33 LayerImpl* root_layer, | 34 LayerImpl* root_layer, |
| 34 LayerImpl* hud_layer, | 35 LayerImpl* hud_layer, |
| 35 const LayerImplList& render_surface_layer_list, | 36 const LayerImplList& render_surface_layer_list, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 debug_rects_.push_back( | 247 debug_rects_.push_back( |
| 247 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, | 248 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, |
| 248 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), | 249 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), |
| 249 inflated_bounds.y(), | 250 inflated_bounds.y(), |
| 250 inflated_bounds.width(), | 251 inflated_bounds.width(), |
| 251 inflated_bounds.height())))); | 252 inflated_bounds.height())))); |
| 252 } | 253 } |
| 253 } | 254 } |
| 254 | 255 |
| 255 } // namespace cc | 256 } // namespace cc |
| OLD | NEW |