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

Unified Diff: tools/json/SkJSONCanvas.h

Issue 1662063003: Improved support for images/bitmaps in SkJSONCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | tools/json/SkJSONCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json/SkJSONCanvas.h
diff --git a/tools/json/SkJSONCanvas.h b/tools/json/SkJSONCanvas.h
index 76d1be0ac5ff83aab6eda33fe8963cee39a0fea5..86420ae7bb3677649f32fe82b50dd7522c43dbd1 100644
--- a/tools/json/SkJSONCanvas.h
+++ b/tools/json/SkJSONCanvas.h
@@ -58,6 +58,7 @@
#define SKJSONCANVAS_ATTRIBUTE_PATH "path"
#define SKJSONCANVAS_ATTRIBUTE_TEXT "text"
#define SKJSONCANVAS_ATTRIBUTE_COLOR "color"
+#define SKJSONCANVAS_ATTRIBUTE_ALPHA "alpha"
#define SKJSONCANVAS_ATTRIBUTE_STYLE "style"
#define SKJSONCANVAS_ATTRIBUTE_STROKEWIDTH "strokeWidth"
#define SKJSONCANVAS_ATTRIBUTE_STROKEMITER "strokeMiter"
@@ -86,6 +87,7 @@
#define SKJSONCANVAS_ATTRIBUTE_MASKFILTER "maskFilter"
#define SKJSONCANVAS_ATTRIBUTE_XFERMODE "xfermode"
#define SKJSONCANVAS_ATTRIBUTE_BACKDROP "backdrop"
+#define SKJSONCANVAS_ATTRIBUTE_IMAGEFILTER "imagefilter"
#define SKJSONCANVAS_ATTRIBUTE_IMAGE "image"
#define SKJSONCANVAS_ATTRIBUTE_BITMAP "bitmap"
#define SKJSONCANVAS_ATTRIBUTE_SRC "src"
@@ -136,6 +138,18 @@
#define SKJSONCANVAS_CAP_ROUND "round"
#define SKJSONCANVAS_CAP_SQUARE "square"
+#define SKJSONCANVAS_COLORTYPE_ARGB4444 "ARGB4444"
+#define SKJSONCANVAS_COLORTYPE_RGBA8888 "RGBA8888"
+#define SKJSONCANVAS_COLORTYPE_BGRA8888 "BGRA8888"
+#define SKJSONCANVAS_COLORTYPE_565 "565"
+#define SKJSONCANVAS_COLORTYPE_GRAY8 "Gray8"
+#define SKJSONCANVAS_COLORTYPE_INDEX8 "Index8"
+#define SKJSONCANVAS_COLORTYPE_ALPHA8 "Alpha8"
+
+#define SKJSONCANVAS_ALPHATYPE_OPAQUE "opaque"
+#define SKJSONCANVAS_ALPHATYPE_PREMUL "premul"
+#define SKJSONCANVAS_ALPHATYPE_UNPREMUL "unpremul"
+
/*
* Implementation of SkCanvas which writes JSON when drawn to. The JSON describes all of the draw
* commands issued to the canvas, and can later be turned back into draw commands using
« no previous file with comments | « no previous file | tools/json/SkJSONCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698