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

Unified Diff: tools/bench_record.cpp

Issue 195793010: Add a means of extracting active operations from SkPicture (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix bug & add unit test Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_record.cpp
===================================================================
--- tools/bench_record.cpp (revision 13850)
+++ tools/bench_record.cpp (working copy)
@@ -77,8 +77,12 @@
int recordingFlags = FLAGS_flags;
SkAutoTUnref<SkPicture> dst(pictureFactory(width, height, &recordingFlags));
SkCanvas* canvas = dst->beginRecording(width, height, recordingFlags);
- if (src) src->draw(canvas);
- if (FLAGS_endRecording) dst->endRecording();
+ if (NULL != src) {
+ src->draw(canvas);
+ }
+ if (FLAGS_endRecording) {
+ dst->endRecording();
+ }
}
const SkMSec elapsed = SkTime::GetMSecs() - start;
@@ -96,7 +100,9 @@
return 1;
}
bench_record(NULL, "NULL", pictureFactory);
- if (FLAGS_skps.isEmpty()) return 0;
+ if (FLAGS_skps.isEmpty()) {
+ return 0;
+ }
SkOSFile::Iter it(FLAGS_skps[0], ".skp");
SkString filename;
« no previous file with comments | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698