Index: tools/render_pictures_main.cpp |
=================================================================== |
--- tools/render_pictures_main.cpp (revision 13812) |
+++ tools/render_pictures_main.cpp (working copy) |
@@ -44,6 +44,8 @@ |
DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recording the picture."); |
+DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing before rendering."); |
+ |
static void make_output_filepath(SkString* path, const SkString& dir, |
const SkString& name) { |
sk_tools::make_filepath(path, dir, name); |
@@ -188,6 +190,13 @@ |
inputPath.c_str()); |
renderer.init(picture); |
+ |
+ if (FLAGS_preprocess) { |
+ if (NULL != renderer.getCanvas()) { |
+ renderer.getCanvas()->EXPERIMENTAL_optimize(picture); |
+ } |
+ } |
+ |
renderer.setup(); |
SkString* outputPath = NULL; |