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

Unified Diff: cc/BitmapSkPictureCanvasLayerTextureUpdater.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/BitmapSkPictureCanvasLayerTextureUpdater.cpp
diff --git a/cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp b/cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp
index adb3b0fc781c125f0c337d4e83bcce34dfbf334e..f1b78148250e00ce2d1446b7a1cf7ab7e05d5803 100644
--- a/cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp
+++ b/cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp
@@ -34,6 +34,7 @@ void BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect(const IntRec
double paintBeginTime = monotonicallyIncreasingTime();
textureUpdater()->paintContentsRect(&canvas, sourceRect, stats);
stats.totalPaintTimeInSeconds += monotonicallyIncreasingTime() - paintBeginTime;
+ stats.totalPixelsPainted += sourceRect.width() * sourceRect.height();
}
void BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect(CCResourceProvider* resourceProvider, const IntRect& sourceRect, const IntSize& destOffset)
@@ -78,6 +79,7 @@ void BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect(SkCanvas* canva
double rasterizeBeginTime = monotonicallyIncreasingTime();
drawPicture(canvas);
stats.totalRasterizeTimeInSeconds += monotonicallyIncreasingTime() - rasterizeBeginTime;
+ stats.totalPixelsRasterized += sourceRect.width() * sourceRect.height();
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698