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 #ifndef CC_DEBUG_DEBUG_RECT_HISTORY_H_ | 5 #ifndef CC_DEBUG_DEBUG_RECT_HISTORY_H_ |
6 #define CC_DEBUG_DEBUG_RECT_HISTORY_H_ | 6 #define CC_DEBUG_DEBUG_RECT_HISTORY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 REPLICA_SCREEN_SPACE_RECT_TYPE, | 50 REPLICA_SCREEN_SPACE_RECT_TYPE, |
51 OCCLUDING_RECT_TYPE, | 51 OCCLUDING_RECT_TYPE, |
52 NONOCCLUDING_RECT_TYPE, | 52 NONOCCLUDING_RECT_TYPE, |
53 TOUCH_EVENT_HANDLER_RECT_TYPE, | 53 TOUCH_EVENT_HANDLER_RECT_TYPE, |
54 WHEEL_EVENT_HANDLER_RECT_TYPE, | 54 WHEEL_EVENT_HANDLER_RECT_TYPE, |
55 NON_FAST_SCROLLABLE_RECT_TYPE, | 55 NON_FAST_SCROLLABLE_RECT_TYPE, |
56 ANIMATION_BOUNDS_RECT_TYPE, | 56 ANIMATION_BOUNDS_RECT_TYPE, |
57 }; | 57 }; |
58 | 58 |
59 struct DebugRect { | 59 struct DebugRect { |
60 DebugRect(DebugRectType new_type, gfx::RectF new_rect) | 60 DebugRect(DebugRectType new_type, const gfx::RectF& new_rect) |
61 : type(new_type), rect(new_rect) {} | 61 : type(new_type), rect(new_rect) {} |
62 | 62 |
63 DebugRectType type; | 63 DebugRectType type; |
64 gfx::RectF rect; | 64 gfx::RectF rect; |
65 }; | 65 }; |
66 | 66 |
67 // This class maintains a history of rects of various types that can be used | 67 // This class maintains a history of rects of various types that can be used |
68 // for debugging purposes. The overhead of collecting rects is performed only if | 68 // for debugging purposes. The overhead of collecting rects is performed only if |
69 // the appropriate LayerTreeSettings are enabled. | 69 // the appropriate LayerTreeSettings are enabled. |
70 class DebugRectHistory { | 70 class DebugRectHistory { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 const LayerImplList& render_surface_layer_list); | 108 const LayerImplList& render_surface_layer_list); |
109 | 109 |
110 std::vector<DebugRect> debug_rects_; | 110 std::vector<DebugRect> debug_rects_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(DebugRectHistory); | 112 DISALLOW_COPY_AND_ASSIGN(DebugRectHistory); |
113 }; | 113 }; |
114 | 114 |
115 } // namespace cc | 115 } // namespace cc |
116 | 116 |
117 #endif // CC_DEBUG_DEBUG_RECT_HISTORY_H_ | 117 #endif // CC_DEBUG_DEBUG_RECT_HISTORY_H_ |
OLD | NEW |