summaryrefslogtreecommitdiffstats
path: root/cc/debug/rendering_stats.cc
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-18 06:54:27 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-18 06:54:27 +0000
commit6e84de2e71a4d6c9652ba3dd4471ff4f45ac8b27 (patch)
tree2d9eaa933544f87303d9cfb552c72fd96eb2a1a3 /cc/debug/rendering_stats.cc
parent0fc818ec6e012243303de3e013037c8c0221c83f (diff)
downloadchromium_src-6e84de2e71a4d6c9652ba3dd4471ff4f45ac8b27.zip
chromium_src-6e84de2e71a4d6c9652ba3dd4471ff4f45ac8b27.tar.gz
chromium_src-6e84de2e71a4d6c9652ba3dd4471ff4f45ac8b27.tar.bz2
Part 2 of cc/ directory shuffles: debug
Continuation of https://src.chromium.org/viewvc/chrome?view=rev&revision=188681 BUG=190824 TBR=enne@chromium.org Review URL: https://codereview.chromium.org/12648008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188685 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug/rendering_stats.cc')
-rw-r--r--cc/debug/rendering_stats.cc78
1 files changed, 78 insertions, 0 deletions
diff --git a/cc/debug/rendering_stats.cc b/cc/debug/rendering_stats.cc
new file mode 100644
index 0000000..28e7089
--- /dev/null
+++ b/cc/debug/rendering_stats.cc
@@ -0,0 +1,78 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/debug/rendering_stats.h"
+
+namespace cc {
+
+RenderingStats::RenderingStats()
+ : numAnimationFrames(0),
+ numFramesSentToScreen(0),
+ droppedFrameCount(0),
+ totalCommitCount(0),
+ totalPixelsPainted(0),
+ totalPixelsRasterized(0),
+ numImplThreadScrolls(0),
+ numMainThreadScrolls(0),
+ numLayersDrawn(0),
+ numMissingTiles(0),
+ totalDeferredImageDecodeCount(0),
+ totalDeferredImageCacheHitCount(0),
+ totalImageGatheringCount(0) {
+}
+
+void RenderingStats::EnumerateFields(Enumerator* enumerator) const {
+ enumerator->AddInt64("numAnimationFrames", numAnimationFrames);
+ enumerator->AddInt64("numFramesSentToScreen", numFramesSentToScreen);
+ enumerator->AddInt64("droppedFrameCount", droppedFrameCount);
+ enumerator->AddDouble("totalPaintTimeInSeconds",
+ totalPaintTime.InSecondsF());
+ enumerator->AddDouble("totalRasterizeTimeInSeconds",
+ totalRasterizeTime.InSecondsF());
+ enumerator->AddDouble("totalRasterizeTimeForNowBinsOnPendingTree",
+ totalRasterizeTimeForNowBinsOnPendingTree.InSecondsF());
+ enumerator->AddDouble("totalCommitTimeInSeconds",
+ totalCommitTime.InSecondsF());
+ enumerator->AddInt64("totalCommitCount", totalCommitCount);
+ enumerator->AddInt64("totalPixelsPainted", totalPixelsPainted);
+ enumerator->AddInt64("totalPixelsRasterized", totalPixelsRasterized);
+ enumerator->AddInt64("numImplThreadScrolls", numImplThreadScrolls);
+ enumerator->AddInt64("numMainThreadScrolls", numMainThreadScrolls);
+ enumerator->AddInt64("numLayersDrawn", numLayersDrawn);
+ enumerator->AddInt64("numMissingTiles", numMissingTiles);
+ enumerator->AddInt64("totalDeferredImageDecodeCount",
+ totalDeferredImageDecodeCount);
+ enumerator->AddInt64("totalDeferredImageCacheHitCount",
+ totalDeferredImageCacheHitCount);
+ enumerator->AddInt64("totalImageGatheringCount", totalImageGatheringCount);
+ enumerator->AddDouble("totalDeferredImageDecodeTimeInSeconds",
+ totalDeferredImageDecodeTime.InSecondsF());
+ enumerator->AddDouble("totalImageGatheringTimeInSeconds",
+ totalImageGatheringTime.InSecondsF());
+}
+
+void RenderingStats::Add(const RenderingStats& other) {
+ numAnimationFrames += other.numAnimationFrames;
+ numFramesSentToScreen += other.numFramesSentToScreen;
+ droppedFrameCount += other.droppedFrameCount;
+ totalPaintTime += other.totalPaintTime;
+ totalRasterizeTime += other.totalRasterizeTime;
+ totalRasterizeTimeForNowBinsOnPendingTree +=
+ other.totalRasterizeTimeForNowBinsOnPendingTree;
+ totalCommitTime += other.totalCommitTime;
+ totalCommitCount += other.totalCommitCount;
+ totalPixelsPainted += other.totalPixelsPainted;
+ totalPixelsRasterized += other.totalPixelsRasterized;
+ numImplThreadScrolls += other.numImplThreadScrolls;
+ numMainThreadScrolls += other.numMainThreadScrolls;
+ numLayersDrawn += other.numLayersDrawn;
+ numMissingTiles += other.numMissingTiles;
+ totalDeferredImageDecodeCount += other.totalDeferredImageDecodeCount;
+ totalDeferredImageCacheHitCount += other.totalDeferredImageCacheHitCount;
+ totalImageGatheringCount += other.totalImageGatheringCount;
+ totalDeferredImageDecodeTime += other.totalDeferredImageDecodeTime;
+ totalImageGatheringTime += other.totalImageGatheringTime;
+}
+
+} // namespace cc