OLD | NEW |
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/layer_tree_debug_state.h" | 5 #include "cc/layer_tree_debug_state.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
11 // IMPORTANT: new fields must be added to equal() and unite() | 11 // IMPORTANT: new fields must be added to equal() and unite() |
12 LayerTreeDebugState::LayerTreeDebugState() | 12 LayerTreeDebugState::LayerTreeDebugState() |
13 : showFPSCounter(false) | 13 : showFPSCounter(false) |
14 , showPlatformLayerTree(false) | 14 , showPlatformLayerTree(false) |
15 , showDebugBorders(false) | 15 , showDebugBorders(false) |
16 , continuousPainting(false) | 16 , continuousPainting(false) |
17 , showPaintRects(false) | 17 , showPaintRects(false) |
18 , showPropertyChangedRects(false) | 18 , showPropertyChangedRects(false) |
19 , showSurfaceDamageRects(false) | 19 , showSurfaceDamageRects(false) |
20 , showScreenSpaceRects(false) | 20 , showScreenSpaceRects(false) |
21 , showReplicaScreenSpaceRects(false) | 21 , showReplicaScreenSpaceRects(false) |
22 , showOccludingRects(false) | 22 , showOccludingRects(false) |
23 , showNonOccludingRects(false) | 23 , showNonOccludingRects(false) |
24 , slowDownRasterScaleFactor(0) | 24 , slowDownRasterScaleFactor(0) |
25 , m_recordRenderingStats(false) { } | 25 , m_recordRenderingStats(false) |
| 26 , traceAllRenderedFrames(false) { } |
26 | 27 |
27 LayerTreeDebugState::~LayerTreeDebugState() { | 28 LayerTreeDebugState::~LayerTreeDebugState() { |
28 } | 29 } |
29 | 30 |
30 void LayerTreeDebugState::setRecordRenderingStats(bool enabled) { | 31 void LayerTreeDebugState::setRecordRenderingStats(bool enabled) { |
31 m_recordRenderingStats = enabled; | 32 m_recordRenderingStats = enabled; |
32 } | 33 } |
33 | 34 |
34 bool LayerTreeDebugState::recordRenderingStats() const { | 35 bool LayerTreeDebugState::recordRenderingStats() const { |
35 return m_recordRenderingStats || continuousPainting; | 36 return m_recordRenderingStats || continuousPainting; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 r.showSurfaceDamageRects |= b.showSurfaceDamageRects; | 77 r.showSurfaceDamageRects |= b.showSurfaceDamageRects; |
77 r.showScreenSpaceRects |= b.showScreenSpaceRects; | 78 r.showScreenSpaceRects |= b.showScreenSpaceRects; |
78 r.showReplicaScreenSpaceRects |= b.showReplicaScreenSpaceRects; | 79 r.showReplicaScreenSpaceRects |= b.showReplicaScreenSpaceRects; |
79 r.showOccludingRects |= b.showOccludingRects; | 80 r.showOccludingRects |= b.showOccludingRects; |
80 r.showNonOccludingRects |= b.showNonOccludingRects; | 81 r.showNonOccludingRects |= b.showNonOccludingRects; |
81 | 82 |
82 if (b.slowDownRasterScaleFactor) | 83 if (b.slowDownRasterScaleFactor) |
83 r.slowDownRasterScaleFactor = b.slowDownRasterScaleFactor; | 84 r.slowDownRasterScaleFactor = b.slowDownRasterScaleFactor; |
84 | 85 |
85 r.m_recordRenderingStats |= b.m_recordRenderingStats; | 86 r.m_recordRenderingStats |= b.m_recordRenderingStats; |
| 87 r.traceAllRenderedFrames |= b.traceAllRenderedFrames; |
86 | 88 |
87 return r; | 89 return r; |
88 } | 90 } |
89 | 91 |
90 } // namespace cc | 92 } // namespace cc |
OLD | NEW |