Index: tools/render_pictures_main.cpp |
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp |
index a2dff67d10971d05514337ff286cc6fb728c946e..bf828316f711422b681d0433563c3aa6d5bc4b3b 100644 |
--- a/tools/render_pictures_main.cpp |
+++ b/tools/render_pictures_main.cpp |
@@ -39,6 +39,8 @@ DEFINE_bool(validate, false, "Verify that the rendered image contains the same p |
"the picture rendered in simple mode. When used in conjunction with --bbh, results " |
"are validated against the picture rendered in the same mode, but without the bbh."); |
+DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recording the picture."); |
+ |
static void make_output_filepath(SkString* path, const SkString& dir, |
const SkString& name) { |
sk_tools::make_filepath(path, dir, name); |
@@ -163,6 +165,13 @@ static bool render_picture(const SkString& inputPath, const SkString* outputDir, |
return false; |
} |
+ while (FLAGS_bench_record) { |
+ const int kRecordFlags = 0; |
+ SkPicture other; |
+ picture->draw(other.beginRecording(picture->width(), picture->height(), kRecordFlags)); |
+ other.endRecording(); |
+ } |
+ |
for (int i = 0; i < FLAGS_clone; ++i) { |
SkPicture* clone = picture->clone(); |
SkDELETE(picture); |