aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-08 15:45:30 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-08 15:45:30 +0000
commit2e87ba0c7c0dfe57e39e6e030db59b69275966cd (patch)
tree9179ef73630bd89dd1f6647a7d83d077520d5fd4 /tools
parentae6f47e55dd9df8a302b7703e07d69147c336704 (diff)
Add before and after command count to filter tool
Diffstat (limited to 'tools')
-rw-r--r--tools/filtermain.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/filtermain.cpp b/tools/filtermain.cpp
index cbebb49d10..0bbcf8f876 100644
--- a/tools/filtermain.cpp
+++ b/tools/filtermain.cpp
@@ -21,7 +21,7 @@
static void usage() {
SkDebugf("Usage: filter -i inFile [-o outFile] [--input-dir path] [--output-dir path]\n");
SkDebugf(" [-h|--help]\n\n");
- SkDebugf(" -i inFile : file to file.\n");
+ SkDebugf(" -i inFile : file to filter.\n");
SkDebugf(" -o outFile : result of filtering.\n");
SkDebugf(" --input-dir : process all files in dir with .skp extension.\n");
SkDebugf(" --output-dir : results of filtering the input dir.\n");
@@ -654,6 +654,7 @@ static int filter_picture(const SkString& inFile, const SkString& outFile) {
}
bool changed = true;
+ int numBefore = debugCanvas.getSize();
while (changed) {
changed = false;
@@ -677,6 +678,8 @@ static int filter_picture(const SkString& inFile, const SkString& outFile) {
}
}
+ int numAfter = debugCanvas.getSize();
+
if (!outFile.isEmpty()) {
SkPicture outPicture;
@@ -700,7 +703,8 @@ static int filter_picture(const SkString& inFile, const SkString& outFile) {
if (!someOptFired) {
SkDebugf("No opts fired\n");
} else {
- SkDebugf("\n");
+ SkDebugf("\t before: %d after: %d delta: %d\n",
+ numBefore, numAfter, numBefore-numAfter);
}
return 0;