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

Unified Diff: cc/CanvasLayerTextureUpdater.cpp

Issue 10982078: Adding hooks for gathering total pixels painted and rasterized stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: cc/CanvasLayerTextureUpdater.cpp
diff --git a/cc/CanvasLayerTextureUpdater.cpp b/cc/CanvasLayerTextureUpdater.cpp
index eae5d16a6b00457360ab642e005f7af1e760f030..aefd2aaf45e2387249dce63c9f0f88187793cfc2 100644
--- a/cc/CanvasLayerTextureUpdater.cpp
+++ b/cc/CanvasLayerTextureUpdater.cpp
@@ -59,6 +59,8 @@ void CanvasLayerTextureUpdater::paintContents(SkCanvas* canvas, const IntRect& c
stats.totalPaintTimeInSeconds += monotonicallyIncreasingTime() - paintBeginTime;
canvas->restore();
+ stats.totalPixelsPainted += contentRect.width() * contentRect.height();
+
FloatRect opaqueContentRect = opaqueLayerRect;
opaqueContentRect.scale(contentsWidthScale, contentsHeightScale);
resultingOpaqueRect = enclosedIntRect(opaqueContentRect);

Powered by Google App Engine
This is Rietveld 408576698