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

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: rename histograms 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 2ce3e500f2ea86458054ed71b8854a096fff5328..16167f4cf50861523632688cb975d5e26ade0aa0 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -8,6 +8,7 @@
#include <limits>
#include <vector>
+#include "cc/base/histograms.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.PicturePileRecordUs",
+ "Renderer4.PicturePileRecordedAreaPerMs");
+
} // 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;
@@ -188,6 +196,11 @@ bool PicturePile::UpdateAndExpandInvalidation(
bool updated = ApplyInvalidationAndResize(interest_rect, invalidation,
layer_size, frame_number);
+
+ // Count the area that is being invalidated.
+ for (Region::Iterator it(*invalidation); it.has_rect(); it.next())
enne (OOO) 2015/04/13 21:52:27 You need to intersect these invalidations with the
jbroman 2015/04/14 16:02:17 Which rect is the right one to intersect with? I s
enne (OOO) 2015/04/14 16:55:19 Oops, sorry forgot to address this comment. You s
+ timer.AddArea(it.rect().size().GetArea());
+
std::vector<gfx::Rect> invalid_tiles;
GetInvalidTileRects(interest_rect, &invalid_tiles);
std::vector<gfx::Rect> record_rects;

Powered by Google App Engine
This is Rietveld 408576698