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

Side by Side Diff: cc/rendering_stats.cc

Issue 11896002: [cc] Use base::TimeTicks in RenderStats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renderwidget too Created 7 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « cc/rendering_stats.h ('k') | cc/single_thread_proxy.cc » ('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/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),
14 totalRasterizeTimeInSeconds(0),
15 totalCommitTimeInSeconds(0),
16 totalCommitCount(0), 13 totalCommitCount(0),
17 totalPixelsPainted(0), 14 totalPixelsPainted(0),
18 totalPixelsRasterized(0), 15 totalPixelsRasterized(0),
19 numImplThreadScrolls(0), 16 numImplThreadScrolls(0),
20 numMainThreadScrolls(0), 17 numMainThreadScrolls(0),
21 numLayersDrawn(0), 18 numLayersDrawn(0),
22 numMissingTiles(0), 19 numMissingTiles(0),
23 totalDeferredImageDecodeCount(0), 20 totalDeferredImageDecodeCount(0),
24 totalDeferredImageCacheHitCount(0), 21 totalDeferredImageCacheHitCount(0),
25 totalImageGatheringCount(0), 22 totalImageGatheringCount(0) {
26 totalDeferredImageDecodeTimeInSeconds(0),
27 totalImageGatheringTimeInSeconds(0) {
28 } 23 }
29 24
30 void RenderingStats::EnumerateFields(Enumerator* enumerator) const { 25 void RenderingStats::EnumerateFields(Enumerator* enumerator) const {
31 enumerator->AddInt64("numAnimationFrames", numAnimationFrames); 26 enumerator->AddInt64("numAnimationFrames", numAnimationFrames);
32 enumerator->AddInt64("numFramesSentToScreen", numFramesSentToScreen); 27 enumerator->AddInt64("numFramesSentToScreen", numFramesSentToScreen);
33 enumerator->AddInt64("droppedFrameCount", droppedFrameCount); 28 enumerator->AddInt64("droppedFrameCount", droppedFrameCount);
34 enumerator->AddDouble("totalPaintTimeInSeconds", totalPaintTimeInSeconds); 29 enumerator->AddDouble("totalPaintTimeInSeconds",
30 totalPaintTime.InSecondsF());
35 enumerator->AddDouble("totalRasterizeTimeInSeconds", 31 enumerator->AddDouble("totalRasterizeTimeInSeconds",
36 totalRasterizeTimeInSeconds); 32 totalRasterizeTime.InSecondsF());
37 enumerator->AddDouble("totalCommitTimeInSeconds", totalCommitTimeInSeconds); 33 enumerator->AddDouble("totalCommitTimeInSeconds",
34 totalCommitTime.InSecondsF());
38 enumerator->AddInt64("totalCommitCount", totalCommitCount); 35 enumerator->AddInt64("totalCommitCount", totalCommitCount);
39 enumerator->AddInt64("totalPixelsPainted", totalPixelsPainted); 36 enumerator->AddInt64("totalPixelsPainted", totalPixelsPainted);
40 enumerator->AddInt64("totalPixelsRasterized", totalPixelsRasterized); 37 enumerator->AddInt64("totalPixelsRasterized", totalPixelsRasterized);
41 enumerator->AddInt64("numImplThreadScrolls", numImplThreadScrolls); 38 enumerator->AddInt64("numImplThreadScrolls", numImplThreadScrolls);
42 enumerator->AddInt64("numMainThreadScrolls", numMainThreadScrolls); 39 enumerator->AddInt64("numMainThreadScrolls", numMainThreadScrolls);
43 enumerator->AddInt64("numLayersDrawn", numLayersDrawn); 40 enumerator->AddInt64("numLayersDrawn", numLayersDrawn);
44 enumerator->AddInt64("numMissingTiles", numMissingTiles); 41 enumerator->AddInt64("numMissingTiles", numMissingTiles);
45 enumerator->AddInt64("totalDeferredImageDecodeCount", 42 enumerator->AddInt64("totalDeferredImageDecodeCount",
46 totalDeferredImageDecodeCount); 43 totalDeferredImageDecodeCount);
47 enumerator->AddInt64("totalDeferredImageCacheHitCount", 44 enumerator->AddInt64("totalDeferredImageCacheHitCount",
48 totalDeferredImageCacheHitCount); 45 totalDeferredImageCacheHitCount);
49 enumerator->AddInt64("totalImageGatheringCount", totalImageGatheringCount); 46 enumerator->AddInt64("totalImageGatheringCount", totalImageGatheringCount);
50 enumerator->AddDouble("totalDeferredImageDecodeTimeInSeconds", 47 enumerator->AddDouble("totalDeferredImageDecodeTimeInSeconds",
51 totalDeferredImageDecodeTimeInSeconds); 48 totalDeferredImageDecodeTime.InSecondsF());
52 enumerator->AddDouble("totalImageGatheringTimeInSeconds", 49 enumerator->AddDouble("totalImageGatheringTimeInSeconds",
53 totalImageGatheringTimeInSeconds); 50 totalImageGatheringTime.InSecondsF());
54 } 51 }
55 52
56 } // namespace cc 53 } // namespace cc
OLDNEW
« no previous file with comments | « cc/rendering_stats.h ('k') | cc/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698