diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 23:48:21 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 23:48:21 +0000 |
commit | 600b6e8ac2f7f755bf0a618513a1c9d303715fe9 (patch) | |
tree | 36df33b1f4903d8236f7f74d1e822081f02b47b9 /cc/test/fake_content_layer_client.cc | |
parent | be6dedf67bfdaf94c64e3a853e8491582905dd19 (diff) | |
download | chromium_src-600b6e8ac2f7f755bf0a618513a1c9d303715fe9.zip chromium_src-600b6e8ac2f7f755bf0a618513a1c9d303715fe9.tar.gz chromium_src-600b6e8ac2f7f755bf0a618513a1c9d303715fe9.tar.bz2 |
Revert 261914 "Revert 261906 "cc: Add picture recording modes fo..."
Shouldn't have been reverted, apologies for the noise.
> Revert 261906 "cc: Add picture recording modes for benchmarking"
>
> Suspected of causing gcm_unit_tests failures
>
> http://build.chromium.org/p/chromium.mac/buildstatus?builder=Mac10.7%20Tests%20%282%29&number=25118
>
> Will file a bug that gcm_unit_tests isn't in default tryjob set if this is actually the cause.
>
> > cc: Add picture recording modes for benchmarking
> >
> > This patch adds three different picture recording modes for benchmarking
> > purposes:
> >
> > 1. RECORD_NORMALLY. This is the default and produces a normal recording
> > as before.
> >
> > 2. RECORD_WITH_NULL_CANVAS. This mode uses SkNullCanvas to avoid (most
> > of) the Skia processing that happen during recording. Can be used to
> > estimate the recording workload inside Blink.
> >
> > 3. RECORD_WITH_PAINTING_DISABLED. Passes a NULL canvas to Blink, which
> > causes the GraphicsContext object to disable painting. This mode
> > gives an estimate of the recording workload of Blink excluding the
> > processing inside GraphicsContext.
> >
> > This patch also modifies the rasterize_and_record_micro benchmark to
> > report the recording time for each mode (record_time_ms,
> > record_time_null_canvas_ms and record_time_painting_disabled_ms
> > respectively).
> >
> > Anecdotally on a z600 and the key_silk_cases page set, SkNullCanvas cuts
> > recording time to 50% and disabling painting down to 19%.
> >
> > BUG=357572
> > TEST=PictureTest.RecordingModes
> > TEST=tools/perf/run_benchmark rasterize_and_record_micro.key_silk_cases --browser=release
> >
> > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261543
> >
> > Review URL: https://codereview.chromium.org/216933002
>
> TBR=skyostil@chromium.org
>
> Review URL: https://codereview.chromium.org/226083007
TBR=skyostil@chromium.org
Review URL: https://codereview.chromium.org/226293003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261915 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_content_layer_client.cc')
-rw-r--r-- | cc/test/fake_content_layer_client.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc index 2d1c304..3996654 100644 --- a/cc/test/fake_content_layer_client.cc +++ b/cc/test/fake_content_layer_client.cc @@ -10,14 +10,17 @@ namespace cc { FakeContentLayerClient::FakeContentLayerClient() - : paint_all_opaque_(false) { -} + : paint_all_opaque_(false), last_canvas_(NULL) {} FakeContentLayerClient::~FakeContentLayerClient() { } void FakeContentLayerClient::PaintContents(SkCanvas* canvas, const gfx::Rect& paint_rect, gfx::RectF* opaque_rect) { + last_canvas_ = canvas; + if (!canvas) + return; + if (paint_all_opaque_) *opaque_rect = paint_rect; |