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

Unified Diff: cc/canvas_layer_updater.cc

Issue 10982078: Adding hooks for gathering total pixels painted and rasterized stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/canvas_layer_updater.cc
diff --git a/cc/canvas_layer_updater.cc b/cc/canvas_layer_updater.cc
index 96f6b7fe41c2d0e97662ccb84d2d448bcff6cefd..72559d8075fe18a7ee093071593f58b560826a51 100644
--- a/cc/canvas_layer_updater.cc
+++ b/cc/canvas_layer_updater.cc
@@ -56,6 +56,8 @@ void CanvasLayerUpdater::paintContents(SkCanvas* canvas, const IntRect& contentR
stats.totalPaintTimeInSeconds += (base::TimeTicks::Now() - paintBeginTime).InSecondsF();
canvas->restore();
+ stats.totalPixelsPainted += contentRect.width() * contentRect.height();
+
FloatRect opaqueContentRect = opaqueLayerRect;
opaqueContentRect.scale(contentsWidthScale, contentsHeightScale);
resultingOpaqueRect = enclosedIntRect(opaqueContentRect);
« no previous file with comments | « cc/bitmap_skpicture_canvas_layer_updater.cc ('k') | cc/cc.gyp » ('j') | cc/rendering_stats.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698