diff options
author | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-16 18:43:36 +0000 |
---|---|---|
committer | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-16 18:43:36 +0000 |
commit | 20bd04e365ca8f5cdb37068fedd696e783d1a775 (patch) | |
tree | 86a23ba9176b9b42e819046061df071ba97039a7 /bench | |
parent | ca1b3ff63427396c01005f37255fb8c9eb17f910 (diff) |
Turn on the kUsePathBoundsForClip_RecordingFlag in bench, gm and tools that use class PictureRenderer
Chrome uses this flag for recording to skpicture in order to improve performance.
Therefore, skai benchmarks should run with this flag enabled, and we need
gm and render_pictures test coverage to validate it. In gm, the vanilla
SkPicture test step will still run without the flag to ensure that case still gets test
coverage, while the SkPicture test steps that use rtree and tileGrid will now run with
the flag enabled.
Review URL: https://codereview.appspot.com/7111043
git-svn-id: http://skia.googlecode.com/svn/trunk@7234 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r-- | bench/benchmain.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp index 2a92dfa010..cda43664d7 100644 --- a/bench/benchmain.cpp +++ b/bench/benchmain.cpp @@ -775,7 +775,8 @@ int tool_main(int argc, char** argv) { canvas = new SkDeferredCanvas(device); break; case kRecord_benchModes: - canvas = pictureRecordTo.beginRecording(dim.fX, dim.fY); + canvas = pictureRecordTo.beginRecording(dim.fX, dim.fY, + SkPicture::kUsePathBoundsForClip_RecordingFlag); canvas->ref(); break; case kPictureRecord_benchModes: { @@ -784,10 +785,12 @@ int tool_main(int argc, char** argv) { // pictureRecordFrom. As the benchmark, we will time how // long it takes to playback pictureRecordFrom into // pictureRecordTo. - SkCanvas* tempCanvas = pictureRecordFrom.beginRecording(dim.fX, dim.fY); + SkCanvas* tempCanvas = pictureRecordFrom.beginRecording(dim.fX, dim.fY, + SkPicture::kUsePathBoundsForClip_RecordingFlag); bench->draw(tempCanvas); pictureRecordFrom.endRecording(); - canvas = pictureRecordTo.beginRecording(dim.fX, dim.fY); + canvas = pictureRecordTo.beginRecording(dim.fX, dim.fY, + SkPicture::kUsePathBoundsForClip_RecordingFlag); canvas->ref(); break; } @@ -845,7 +848,8 @@ int tool_main(int argc, char** argv) { || benchMode == kPictureRecord_benchModes)) { // This will clear the recorded commands so that they do not // acculmulate. - canvas = pictureRecordTo.beginRecording(dim.fX, dim.fY); + canvas = pictureRecordTo.beginRecording(dim.fX, dim.fY, + SkPicture::kUsePathBoundsForClip_RecordingFlag); } timer.start(); |