Chromium Code Reviews| Index: cc/resources/display_list_recording_source.cc |
| diff --git a/cc/resources/display_list_recording_source.cc b/cc/resources/display_list_recording_source.cc |
| index 3a47c9067ca4dc7e0634aca8269100887a91a304..f8e26dc19c5c7542e04ec991ec7b69841da44404 100644 |
| --- a/cc/resources/display_list_recording_source.cc |
| +++ b/cc/resources/display_list_recording_source.cc |
| @@ -6,6 +6,7 @@ |
| #include <algorithm> |
| +#include "cc/base/histograms.h" |
| #include "cc/base/region.h" |
| #include "cc/layers/content_layer_client.h" |
| #include "cc/resources/display_item_list.h" |
| @@ -22,6 +23,11 @@ const int kPixelDistanceToRecord = 8000; |
| // operations. |
| const int kOpCountThatIsOkToAnalyze = 10; |
| +DEFINE_SCOPED_UMA_HISTOGRAM_AREA_TIMER( |
| + ScopedDisplayListRecordingSourceUpdateTimer, |
| + "Renderer4.DisplayListRecordingSourceRecordUs", |
| + "Renderer4.DisplayListRecordingSourceRecordedAreaPerMs"); |
| + |
| } // namespace |
| namespace cc { |
| @@ -49,6 +55,7 @@ bool DisplayListRecordingSource::UpdateAndExpandInvalidation( |
| const gfx::Rect& visible_layer_rect, |
| int frame_number, |
| RecordingMode recording_mode) { |
| + ScopedDisplayListRecordingSourceUpdateTimer timer; |
| bool updated = false; |
| if (size_ != layer_size) { |
| @@ -74,6 +81,10 @@ bool DisplayListRecordingSource::UpdateAndExpandInvalidation( |
| updated = true; |
| } |
| + // Count the area that is being invalidated. |
| + for (Region::Iterator it(*invalidation); it.has_rect(); it.next()) |
|
enne (OOO)
2015/04/13 21:52:26
This is a petty nit, but it's weird to have this i
jbroman
2015/04/14 14:44:36
Prevents the work before the invalidation is avail
enne (OOO)
2015/04/14 16:54:10
Hmm, ok, this is fine. I am not sure whether it m
|
| + timer.AddArea(it.rect().size().GetArea()); |
| + |
| if (!updated && !invalidation->Intersects(recorded_viewport_)) |
| return false; |