Prototype code that turns any/every flattenable into JSON

This makes inspecting things in SkDebugger far more useful - any filter
or other complex object on the paint is ultimately visible. You still
have to do some guess work to figure out what the fields actually mean,
but you can at least cross-reference with the code in flatten().

Screenshots:
Before: https://screenshot.googleplex.com/a6JM5HBBe6G.png
After : https://screenshot.googleplex.com/XQfr4YJ6mnH.png

Changes to public API are just removals and changes to make
some functions virtual.

TBR=reed@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1920423002

Review-Url: https://codereview.chromium.org/1920423002
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index ac9e476..9b81ada 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -116,8 +116,22 @@
     static const char* GetCommandString(OpType type);
 
     // Helper methods for converting things to JSON
+    static Json::Value MakeJsonColor(const SkColor color);
+    static Json::Value MakeJsonPoint(const SkPoint& point);
+    static Json::Value MakeJsonPoint(SkScalar x, SkScalar y);
+    static Json::Value MakeJsonRect(const SkRect& rect);
     static Json::Value MakeJsonIRect(const SkIRect&);
     static Json::Value MakeJsonMatrix(const SkMatrix&);
+    static Json::Value MakeJsonPath(const SkPath& path);
+    static Json::Value MakeJsonRegion(const SkRegion& region);
+    static Json::Value MakeJsonPaint(const SkPaint& paint, UrlDataManager& urlDataManager);
+
+    static void flatten(const SkFlattenable* flattenable, Json::Value* target,
+                        UrlDataManager& urlDataManager);
+    static bool flatten(const SkImage& image, Json::Value* target,
+                        UrlDataManager& urlDataManager);
+    static bool flatten(const SkBitmap& bitmap, Json::Value* target,
+                        UrlDataManager& urlDataManager);
 
 protected:
     SkTDArray<SkString*> fInfo;