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

Unified Diff: tools/lua/lua_pictures.cpp

Issue 197793007: Add quiet mode to lua_pictures (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698