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/rendering_stats.h" | 5 #include "cc/rendering_stats.h" |
6 | 6 |
7 namespace cc { | 7 namespace cc { |
8 | 8 |
9 RenderingStats::RenderingStats() | 9 RenderingStats::RenderingStats() |
10 : numAnimationFrames(0), | 10 : numAnimationFrames(0), |
11 numFramesSentToScreen(0), | 11 numFramesSentToScreen(0), |
12 droppedFrameCount(0), | 12 droppedFrameCount(0), |
13 totalPaintTimeInSeconds(0), | 13 totalPaintTimeInSeconds(0), |
14 totalRasterizeTimeInSeconds(0), | 14 totalRasterizeTimeInSeconds(0), |
15 totalCommitTimeInSeconds(0), | 15 totalCommitTimeInSeconds(0), |
16 totalCommitCount(0), | 16 totalCommitCount(0), |
17 totalPixelsPainted(0), | 17 totalPixelsPainted(0), |
18 totalPixelsRasterized(0), | 18 totalPixelsRasterized(0), |
19 numImplThreadScrolls(0), | 19 numImplThreadScrolls(0), |
20 numMainThreadScrolls(0), | 20 numMainThreadScrolls(0), |
21 numLayersInLayerTree(0) { | 21 numLayersInLayerTree(0) { |
22 } | 22 } |
23 | 23 |
| 24 void RenderingStats::enumerateFields(Enumerator* enumerator) const { |
| 25 enumerator->addInt64("numAnimationFrames", numAnimationFrames); |
| 26 enumerator->addInt64("numFramesSentToScreen", numFramesSentToScreen); |
| 27 enumerator->addInt64("droppedFrameCount", droppedFrameCount); |
| 28 enumerator->addDouble("totalPaintTimeInSeconds", totalPaintTimeInSeconds); |
| 29 enumerator->addDouble("totalRasterizeTimeInSeconds", |
| 30 totalRasterizeTimeInSeconds); |
| 31 enumerator->addDouble("totalCommitTimeInSeconds", totalCommitTimeInSeconds); |
| 32 enumerator->addInt64("totalCommitCount", totalCommitCount); |
| 33 enumerator->addInt64("totalPixelsPainted", totalPixelsPainted); |
| 34 enumerator->addInt64("totalPixelsRasterized", totalPixelsRasterized); |
| 35 enumerator->addInt64("numImplThreadScrolls", numImplThreadScrolls); |
| 36 enumerator->addInt64("numMainThreadScrolls", numMainThreadScrolls); |
| 37 enumerator->addInt64("numLayersInLayerTree", numLayersInLayerTree); |
| 38 } |
| 39 |
24 } // namespace cc | 40 } // namespace cc |
OLD | NEW |