[content shell] implement testRunner.overridePreference
[chromium-blink-merge.git] / cc / rendering_stats.cc
blobcf524e43dbfa755a826b2c94f86263d2382c6c5d
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
3 // found in the LICENSE file.
5 #include "cc/rendering_stats.h"
7 namespace cc {
9 RenderingStats::RenderingStats()
10 : numAnimationFrames(0),
11 numFramesSentToScreen(0),
12 droppedFrameCount(0),
13 totalPaintTimeInSeconds(0),
14 totalRasterizeTimeInSeconds(0),
15 totalCommitTimeInSeconds(0),
16 totalCommitCount(0),
17 totalPixelsPainted(0),
18 totalPixelsRasterized(0),
19 numImplThreadScrolls(0),
20 numMainThreadScrolls(0),
21 numLayersDrawn(0),
22 numMissingTiles(0),
23 totalDeferredImageDecodeCount(0),
24 totalDeferredImageCacheHitCount(0),
25 totalImageGatheringCount(0),
26 totalDeferredImageDecodeTimeInSeconds(0),
27 totalImageGatheringTimeInSeconds(0) {
30 void RenderingStats::EnumerateFields(Enumerator* enumerator) const {
31 enumerator->AddInt64("numAnimationFrames", numAnimationFrames);
32 enumerator->AddInt64("numFramesSentToScreen", numFramesSentToScreen);
33 enumerator->AddInt64("droppedFrameCount", droppedFrameCount);
34 enumerator->AddDouble("totalPaintTimeInSeconds", totalPaintTimeInSeconds);
35 enumerator->AddDouble("totalRasterizeTimeInSeconds",
36 totalRasterizeTimeInSeconds);
37 enumerator->AddDouble("totalCommitTimeInSeconds", totalCommitTimeInSeconds);
38 enumerator->AddInt64("totalCommitCount", totalCommitCount);
39 enumerator->AddInt64("totalPixelsPainted", totalPixelsPainted);
40 enumerator->AddInt64("totalPixelsRasterized", totalPixelsRasterized);
41 enumerator->AddInt64("numImplThreadScrolls", numImplThreadScrolls);
42 enumerator->AddInt64("numMainThreadScrolls", numMainThreadScrolls);
43 enumerator->AddInt64("numLayersDrawn", numLayersDrawn);
44 enumerator->AddInt64("numMissingTiles", numMissingTiles);
45 enumerator->AddInt64("totalDeferredImageDecodeCount",
46 totalDeferredImageDecodeCount);
47 enumerator->AddInt64("totalDeferredImageCacheHitCount",
48 totalDeferredImageCacheHitCount);
49 enumerator->AddInt64("totalImageGatheringCount", totalImageGatheringCount);
50 enumerator->AddDouble("totalDeferredImageDecodeTimeInSeconds",
51 totalDeferredImageDecodeTimeInSeconds);
52 enumerator->AddDouble("totalImageGatheringTimeInSeconds",
53 totalImageGatheringTimeInSeconds);
56 } // namespace cc