Add an option to render_pictures to rerecord the pictures with PNG encoded bitmaps.

Review URL: https://codereview.appspot.com/6821092

git-svn-id: http://skia.googlecode.com/svn/trunk@6332 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
index 521bbf8..7d6275d 100644
--- a/tools/render_pictures_main.cpp
+++ b/tools/render_pictures_main.cpp
@@ -42,7 +42,7 @@
     SkDebugf(
 "     outputDir: directory to write the rendered images.\n\n");
     SkDebugf(
-"     --mode pow2tile minWidth height[%] | simple\n"
+"     --mode pow2tile minWidth height[%] | simple | rerecord\n"
 "          | tile width[%] height[%]: Run in the corresponding mode.\n"
 "                                     Default is simple.\n");
     SkDebugf(
@@ -55,7 +55,9 @@
 "                                                  power of two. A simple render\n"
 "                                                  is done with these tiles.\n");
     SkDebugf(
-"                     simple, Render using the default rendering method.\n");
+"                     simple, Render using the default rendering method.\n"
+"                     rerecord, Record the picture as a new skp, with the bitmaps PNG encoded.\n"
+             );
     SkDebugf(
 "                     tile width[%] height[%], Do a simple render using tiles\n"
 "                                              with the given dimensions.\n");
@@ -213,6 +215,8 @@
                     exit(-1);
                 }
                 heightString = *argv;
+            } else if (0 == strcmp(*argv, "rerecord")) {
+                renderer = SkNEW(sk_tools::RecordPictureRenderer);
             } else {
                 SkDebugf("%s is not a valid mode for --mode\n", *argv);
                 usage(argv0);