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

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 2334123003: Add SkColor4f serialization (Closed)
Patch Set: Fix stack overflow in test 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
Index: tools/debugger/SkDrawCommand.cpp
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index 0f8101306ba5e00227c3f8e1ef85fc13ccd8b1a8..690373450892cbd5e07196eecd941e535eded4b8 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()));

Powered by Google App Engine
This is Rietveld 408576698