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

Unified Diff: cc/resources/picture_pile.cc

Issue 1075523002: cc: Add UMA stats for record and raster time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix histograms.xml Created 5 years, 8 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/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 1b814477b427f3324d0f5b9048187d5c658e949a..f50bced37856f60a83872cd0c4b757195e74051c 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -8,6 +8,7 @@
#include <limits>
#include <vector>
+#include "cc/base/histogram_macros.h"
#include "cc/base/region.h"
#include "cc/resources/picture_pile_impl.h"
#include "skia/ext/analysis_canvas.h"
@@ -149,6 +150,11 @@ const bool kDefaultClearCanvasSetting = false;
const bool kDefaultClearCanvasSetting = true;
#endif
+DEFINE_SCOPED_UMA_HISTOGRAM_AREA_TIMER(
+ ScopedPicturePileUpdateTimer,
+ "Renderer4.PicturePileUpdateUs",
+ "Renderer4.PicturePileUpdatePixelsPerMs");
+
} // namespace
namespace cc {
@@ -181,6 +187,8 @@ bool PicturePile::UpdateAndExpandInvalidation(
const gfx::Rect& visible_layer_rect,
int frame_number,
RecordingSource::RecordingMode recording_mode) {
+ ScopedPicturePileUpdateTimer timer;
+
gfx::Rect interest_rect = visible_layer_rect;
interest_rect.Inset(-pixel_record_distance_, -pixel_record_distance_);
recorded_viewport_ = interest_rect;
@@ -197,6 +205,10 @@ bool PicturePile::UpdateAndExpandInvalidation(
if (record_rects.empty())
return updated;
+ // Count the area that is being recorded.
+ for (const auto& record_rect : record_rects)
+ timer.AddArea(record_rect.size().GetArea());
+
CreatePictures(painter, recording_mode, record_rects);
DetermineIfSolidColor();

Powered by Google App Engine
This is Rietveld 408576698