diff options
author | skyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-03 22:05:48 +0000 |
---|---|---|
committer | skyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-03 22:05:48 +0000 |
commit | a70c063804a0057112eecde6b7c65c346f1a9d49 (patch) | |
tree | e8e7d39a4c5c0a069e4f46bcbf3a54671353a8f1 /cc/test/fake_picture_pile_impl.cc | |
parent | 97e46d3d0a26421f2c445431e5493645940086fc (diff) | |
download | chromium_src-a70c063804a0057112eecde6b7c65c346f1a9d49.zip chromium_src-a70c063804a0057112eecde6b7c65c346f1a9d49.tar.gz chromium_src-a70c063804a0057112eecde6b7c65c346f1a9d49.tar.bz2 |
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
Review URL: https://codereview.chromium.org/216933002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261543 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_picture_pile_impl.cc')
-rw-r--r-- | cc/test/fake_picture_pile_impl.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc index 4bcf4b0..f2af98b 100644 --- a/cc/test/fake_picture_pile_impl.cc +++ b/cc/test/fake_picture_pile_impl.cc @@ -84,8 +84,8 @@ void FakePicturePileImpl::AddRecordingAt(int x, int y) { gfx::Rect bounds(tiling().TileBounds(x, y)); bounds.Inset(-buffer_pixels(), -buffer_pixels()); - scoped_refptr<Picture> picture( - Picture::Create(bounds, &client_, tile_grid_info_, true, 0)); + scoped_refptr<Picture> picture(Picture::Create( + bounds, &client_, tile_grid_info_, true, 0, Picture::RECORD_NORMALLY)); picture_map_[std::pair<int, int>(x, y)].SetPicture(picture); EXPECT_TRUE(HasRecordingAt(x, y)); |