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

Unified Diff: tools/debugger/SkDrawCommand.h

Issue 1920423002: Prototype code that turns any/every flattenable into JSON (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix copyright dates in new files Created 4 years, 7 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 | « tests/SerializationTest.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDrawCommand.h
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index ac9e476a9aefb6decf481b47ba21115c4d6efd7b..9b81adad3fa6be4eda1e0d7b8130364fcaa9bc76 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -116,8 +116,22 @@ public:
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;
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698