| 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();
|
|
|