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

Unified Diff: cc/bitmap_content_layer_updater.cc

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 11 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 | « cc/bitmap_content_layer_updater.h ('k') | cc/bitmap_skpicture_content_layer_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/bitmap_content_layer_updater.cc
diff --git a/cc/bitmap_content_layer_updater.cc b/cc/bitmap_content_layer_updater.cc
index 222ab21146240e43b0c9610aa88c2d7da21f695f..2dd4d2934e36170f54decaa22494a83af3437712 100644
--- a/cc/bitmap_content_layer_updater.cc
+++ b/cc/bitmap_content_layer_updater.cc
@@ -23,7 +23,7 @@ BitmapContentLayerUpdater::Resource::~Resource()
{
}
-void BitmapContentLayerUpdater::Resource::update(ResourceUpdateQueue& queue, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate, RenderingStats&)
+void BitmapContentLayerUpdater::Resource::update(ResourceUpdateQueue& queue, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate, RenderingStats*)
{
updater()->updateTexture(queue, texture(), sourceRect, destOffset, partialUpdate);
}
@@ -48,14 +48,15 @@ scoped_ptr<LayerUpdater::Resource> BitmapContentLayerUpdater::createResource(Pri
return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedResource::create(manager)));
}
-void BitmapContentLayerUpdater::prepareToUpdate(const gfx::Rect& contentRect, const gfx::Size& tileSize, float contentsWidthScale, float contentsHeightScale, gfx::Rect& resultingOpaqueRect, RenderingStats& stats)
+void BitmapContentLayerUpdater::prepareToUpdate(const gfx::Rect& contentRect, const gfx::Size& tileSize, float contentsWidthScale, float contentsHeightScale, gfx::Rect& resultingOpaqueRect, RenderingStats* stats)
{
if (m_canvasSize != contentRect.size()) {
m_canvasSize = contentRect.size();
m_canvas = make_scoped_ptr(skia::CreateBitmapCanvas(m_canvasSize.width(), m_canvasSize.height(), m_opaque));
}
- stats.totalPixelsRasterized += contentRect.width() * contentRect.height();
+ if (stats)
+ stats->totalPixelsRasterized += contentRect.width() * contentRect.height();
paintContents(m_canvas.get(), contentRect, contentsWidthScale, contentsHeightScale, resultingOpaqueRect, stats);
}
« no previous file with comments | « cc/bitmap_content_layer_updater.h ('k') | cc/bitmap_skpicture_content_layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698