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

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 2334123003: Add SkColor4f serialization (Closed)
Patch Set: Switched to memcpy, rebased Created 4 years, 3 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 | « tools/debugger/SkDrawCommand.h ('k') | tools/debugger/SkJsonWriteBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDrawCommand.cpp
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index 35e9201b401f6fed71cb19878843d4ec69c00824..ba6302ca3adcb1529b05a9e9a5598fa8b6375959 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -428,6 +428,15 @@ Json::Value SkDrawCommand::MakeJsonColor(const SkColor color) {
return result;
}
+Json::Value SkDrawCommand::MakeJsonColor4f(const SkColor4f& color) {
+ Json::Value result(Json::arrayValue);
+ result.append(Json::Value(color.fA));
+ result.append(Json::Value(color.fR));
+ result.append(Json::Value(color.fG));
+ result.append(Json::Value(color.fB));
+ return result;
+}
+
Json::Value SkDrawCommand::MakeJsonPoint(const SkPoint& point) {
Json::Value result(Json::arrayValue);
result.append(Json::Value(point.x()));
« no previous file with comments | « tools/debugger/SkDrawCommand.h ('k') | tools/debugger/SkJsonWriteBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698