Make skpinfo more human friendly
authorrobertphillips <robertphillips@google.com>
Tue, 19 Apr 2016 16:29:01 +0000 (09:29 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 19 Apr 2016 16:29:01 +0000 (09:29 -0700)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1901713004

Review URL: https://codereview.chromium.org/1901713004

tools/skpinfo.cpp

index 4b65cb8a8c692aacc9fa6f2dbb04a9223925dedb..dd5fd75f192a3448b9d515f43144c45b168f25eb 100644 (file)
@@ -65,7 +65,26 @@ int tool_main(int argc, char** argv) {
                  info.fCullRect.fRight, info.fCullRect.fBottom);
     }
     if (FLAGS_flags && !FLAGS_quiet) {
-        SkDebugf("Flags: 0x%x\n", info.fFlags);
+        SkDebugf("Flags: ");
+        bool needsSeparator = false;
+        if (info.fFlags & SkPictInfo::kCrossProcess_Flag) {
+            SkDebugf("kCrossProcess");
+            needsSeparator = true;
+        }
+        if (info.fFlags & SkPictInfo::kScalarIsFloat_Flag) {
+            if (needsSeparator) {
+                SkDebugf("|");
+            }
+            SkDebugf("kScalarIsFloat");
+            needsSeparator = true;
+        }
+        if (info.fFlags & SkPictInfo::kPtrIs64Bit_Flag) {
+            if (needsSeparator) {
+                SkDebugf("|");
+            }
+            SkDebugf("kPtrIs64Bit");
+        }
+        SkDebugf("\n");
     }
 
     if (!stream.readBool()) {