| Index: tools/lua/lua_pictures.cpp
|
| ===================================================================
|
| --- tools/lua/lua_pictures.cpp (revision 13856)
|
| +++ tools/lua/lua_pictures.cpp (working copy)
|
| @@ -36,6 +36,7 @@
|
| DEFINE_string2(luaFile, l, "", "File containing lua script to run");
|
| DEFINE_string2(headCode, s, "", "Optional lua code to call at beginning");
|
| DEFINE_string2(tailFunc, s, "", "Optional lua function to call at end");
|
| +DEFINE_bool2(quiet, q, false, "Silence all non-error related output");
|
|
|
| static SkPicture* load_picture(const char path[]) {
|
| SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path));
|
| @@ -97,7 +98,9 @@
|
|
|
| for (int i = 0; i < FLAGS_luaFile.count(); ++i) {
|
| SkAutoDataUnref data(read_into_data(FLAGS_luaFile[i]));
|
| - SkDebugf("loading %s...\n", FLAGS_luaFile[i]);
|
| + if (!FLAGS_quiet) {
|
| + SkDebugf("loading %s...\n", FLAGS_luaFile[i]);
|
| + }
|
| if (!L.runCode(data->data(), data->size())) {
|
| SkDebugf("failed to load luaFile %s\n", FLAGS_luaFile[i]);
|
| exit(-1);
|
| @@ -144,7 +147,9 @@
|
| moduloStr.printf("[%d.%d] ", i, moduloDivisor);
|
| }
|
| const char* path = paths[i].c_str();
|
| - SkDebugf("scraping %s %s\n", path, moduloStr.c_str());
|
| + if (!FLAGS_quiet) {
|
| + SkDebugf("scraping %s %s\n", path, moduloStr.c_str());
|
| + }
|
|
|
| SkAutoTUnref<SkPicture> pic(load_picture(path));
|
| if (pic.get()) {
|
|
|