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

Unified Diff: cc/bitmap_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
« no previous file with comments | « no previous file | cc/bitmap_skpicture_canvas_layer_updater.cc » ('j') | cc/rendering_stats.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/bitmap_canvas_layer_updater.cc
diff --git a/cc/bitmap_canvas_layer_updater.cc b/cc/bitmap_canvas_layer_updater.cc
index eca5e761e12c86b02f0dc197cd885a81ba092983..57ed380970d25ef703dbbf47812609e4b9d27c27 100644
--- a/cc/bitmap_canvas_layer_updater.cc
+++ b/cc/bitmap_canvas_layer_updater.cc
@@ -7,6 +7,7 @@
#include "cc/bitmap_canvas_layer_updater.h"
#include "cc/layer_painter.h"
+#include "cc/rendering_stats.h"
#include "cc/resource_update.h"
#include "cc/texture_update_queue.h"
#include "skia/ext/platform_canvas.h"
@@ -55,6 +56,8 @@ void BitmapCanvasLayerUpdater::prepareToUpdate(const IntRect& contentRect, const
m_canvas = make_scoped_ptr(skia::CreateBitmapCanvas(m_canvasSize.width(), m_canvasSize.height(), m_opaque));
}
+ stats.totalPixelsRasterized += contentRect.width() * contentRect.height();
+
paintContents(m_canvas.get(), contentRect, contentsWidthScale, contentsHeightScale, resultingOpaqueRect, stats);
}
« no previous file with comments | « no previous file | cc/bitmap_skpicture_canvas_layer_updater.cc » ('j') | cc/rendering_stats.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698