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

Unified Diff: cc/canvas_layer_texture_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: 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_texture_updater.cc
diff --git a/cc/canvas_layer_texture_updater.cc b/cc/canvas_layer_texture_updater.cc
index 29d4a2b69630074562345c6c8f2f012457eba7e1..a9f32798efcde436fbca699df43677554f66c601 100644
--- a/cc/canvas_layer_texture_updater.cc
+++ b/cc/canvas_layer_texture_updater.cc
@@ -57,6 +57,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