Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: tools/bench_playback.cpp

Issue 316143003: Remove SkPicture::kUsePathBoundsForClip_RecordingFlag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add suppression for fixed GM Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | tools/bench_record.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "BenchTimer.h" 8 #include "BenchTimer.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkForceLinking.h" 10 #include "SkForceLinking.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 static SkPicture* rerecord_with_tilegrid(SkPicture& src) { 34 static SkPicture* rerecord_with_tilegrid(SkPicture& src) {
35 SkTileGridFactory::TileGridInfo info; 35 SkTileGridFactory::TileGridInfo info;
36 info.fTileInterval.set(FLAGS_tile, FLAGS_tile); 36 info.fTileInterval.set(FLAGS_tile, FLAGS_tile);
37 info.fMargin.setEmpty(); 37 info.fMargin.setEmpty();
38 info.fOffset.setZero(); 38 info.fOffset.setZero();
39 SkTileGridFactory factory(info); 39 SkTileGridFactory factory(info);
40 40
41 SkPictureRecorder recorder; 41 SkPictureRecorder recorder;
42 src.draw(recorder.beginRecording(src.width(), src.height(), &factory, 42 src.draw(recorder.beginRecording(src.width(), src.height(), &factory));
43 SkPicture::kUsePathBoundsForClip_RecordingF lag));
44 return recorder.endRecording(); 43 return recorder.endRecording();
45 } 44 }
46 45
47 static EXPERIMENTAL::SkPlayback* rerecord_with_skr(SkPicture& src) { 46 static EXPERIMENTAL::SkPlayback* rerecord_with_skr(SkPicture& src) {
48 EXPERIMENTAL::SkRecording recording(src.width(), src.height()); 47 EXPERIMENTAL::SkRecording recording(src.width(), src.height());
49 src.draw(recording.canvas()); 48 src.draw(recording.canvas());
50 return recording.releasePlayback(); 49 return recording.releasePlayback();
51 } 50 }
52 51
53 static void bench(SkPMColor* scratch, SkPicture& src, const char* name) { 52 static void bench(SkPMColor* scratch, SkPicture& src, const char* name) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bench(scratch.get(), *src, filename.c_str()); 116 bench(scratch.get(), *src, filename.c_str());
118 } 117 }
119 return failed ? 1 : 0; 118 return failed ? 1 : 0;
120 } 119 }
121 120
122 #if !defined SK_BUILD_FOR_IOS 121 #if !defined SK_BUILD_FOR_IOS
123 int main(int argc, char * const argv[]) { 122 int main(int argc, char * const argv[]) {
124 return tool_main(argc, (char**) argv); 123 return tool_main(argc, (char**) argv);
125 } 124 }
126 #endif 125 #endif
OLDNEW
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | tools/bench_record.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698