fiddle: Fix JSON output logic.

BUG=skia:

Change-Id: Ia17b8328f692881282be15afa5e7f661ddc83318
Reviewed-on: https://skia-review.googlesource.com/8388
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This commit is contained in:
Joe Gregorio 2017-02-13 13:55:17 -05:00 committed by Skia Commit-Bot
parent c8f918004a
commit 0236cba8ba

View File

@ -192,14 +192,16 @@ int main() {
picture->serialize(&skpStream);
skpData = skpStream.detachAsData();
}
bool textOnly = options.textOnly;
printf("{\n");
dump_output(rasterData, "Raster", !gpuData && !pdfData && !skpData && !textOnly);
dump_output(gpuData, "Gpu", !pdfData && !skpData && !textOnly);
dump_output(pdfData, "Pdf", !skpData && !textOnly);
dump_output(skpData, "Skp", !textOnly);
dump_text(textoutput, "Text");
if (!options.textOnly) {
dump_output(rasterData, "Raster", !gpuData && !pdfData && !skpData);
dump_output(gpuData, "Gpu", !pdfData && !skpData);
dump_output(pdfData, "Pdf", !skpData);
dump_output(skpData, "Skp");
} else {
dump_text(textoutput, "Text");
}
printf("}\n");
return 0;