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

Unified Diff: cc/picture_pile_impl.cc

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use WebSettings 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
Index: cc/picture_pile_impl.cc
diff --git a/cc/picture_pile_impl.cc b/cc/picture_pile_impl.cc
index 02fabb53baa3cbcb4ebc9212b0cecf3ce708d4ef..c0d2b83fa9be44842c76f8dc75dd0d956a49f2da 100644
--- a/cc/picture_pile_impl.cc
+++ b/cc/picture_pile_impl.cc
@@ -65,7 +65,9 @@ void PicturePileImpl::Raster(
DCHECK(contents_scale >= min_contents_scale_);
- base::TimeTicks rasterizeBeginTime = base::TimeTicks::Now();
+ base::TimeTicks rasterize_begin_time;
+ if (stats)
+ rasterize_begin_time = base::TimeTicks::Now();
canvas->save();
canvas->translate(-content_rect.x(), -content_rect.y());
@@ -118,7 +120,8 @@ void PicturePileImpl::Raster(
}
canvas->restore();
- stats->totalRasterizeTime += base::TimeTicks::Now() - rasterizeBeginTime;
+ if (stats)
+ stats->totalRasterizeTime += base::TimeTicks::Now() - rasterize_begin_time;
}
void PicturePileImpl::GatherPixelRefs(

Powered by Google App Engine
This is Rietveld 408576698