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: dm/DMJsonWriter.cpp

Issue 1755693002: dm: gamma_correct: true/false -> "yes"/"no" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMJsonWriter.cpp
diff --git a/dm/DMJsonWriter.cpp b/dm/DMJsonWriter.cpp
index 24b8a58724a614c3370df7015df12d61f48690a0..7bd8acd6d2d989e070c0d3a380ced8303f29c2af 100644
--- a/dm/DMJsonWriter.cpp
+++ b/dm/DMJsonWriter.cpp
@@ -56,7 +56,7 @@ void JsonWriter::DumpJson() {
result["key"]["config"] = gBitmapResults[i].config.c_str();
result["key"]["source_type"] = gBitmapResults[i].sourceType.c_str();
result["options"]["ext"] = gBitmapResults[i].ext.c_str();
- result["options"]["gamma_correct"] = gBitmapResults[i].gammaCorrect;
+ result["options"]["gamma_correct"] = gBitmapResults[i].gammaCorrect ? "yes" : "no";
result["md5"] = gBitmapResults[i].md5.c_str();
// Source options only need to be part of the key if they exist.
@@ -115,7 +115,7 @@ bool JsonWriter::ReadJson(const char* path, void(*callback)(BitmapResult)) {
br.config = r["key"]["config"].asCString();
br.sourceType = r["key"]["source_type"].asCString();
br.ext = r["options"]["ext"].asCString();
- br.gammaCorrect = r["options"]["gamma_correct"].asBool();
+ br.gammaCorrect = 0 == strcmp("yes", r["options"]["gamma_correct"].asCString());
br.md5 = r["md5"].asCString();
if (!r["key"]["source_options"].isNull()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698