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

Side by Side Diff: dm/DMJsonWriter.h

Issue 1741973002: Add gamma_correct option field to dm.json (Closed) Base URL: https://skia.googlesource.com/skia@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 unified diff | Download patch
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMJsonWriter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef DMJsonWriter_DEFINED 8 #ifndef DMJsonWriter_DEFINED
9 #define DMJsonWriter_DEFINED 9 #define DMJsonWriter_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 /** 22 /**
23 * Info describing a single run. 23 * Info describing a single run.
24 */ 24 */
25 struct BitmapResult { 25 struct BitmapResult {
26 SkString name; // E.g. "ninepatch-stretch", "desk_gws.skp" 26 SkString name; // E.g. "ninepatch-stretch", "desk_gws.skp"
27 SkString config; // "gpu", "8888", "serialize", "pipe" 27 SkString config; // "gpu", "8888", "serialize", "pipe"
28 SkString sourceType; // "gm", "skp", "image" 28 SkString sourceType; // "gm", "skp", "image"
29 SkString sourceOptions; // "image", "codec", "subset", "scanline" 29 SkString sourceOptions; // "image", "codec", "subset", "scanline"
30 SkString md5; // In ASCII, so 32 bytes long. 30 SkString md5; // In ASCII, so 32 bytes long.
31 SkString ext; // Extension of file we wrote: "png", "pdf", . .. 31 SkString ext; // Extension of file we wrote: "png", "pdf", . ..
32 bool gammaCorrect; // Old configs are not gamma correct, some new ones are.
32 }; 33 };
33 34
34 /** 35 /**
35 * Add a result to the end of the list of results. 36 * Add a result to the end of the list of results.
36 */ 37 */
37 static void AddBitmapResult(const BitmapResult&); 38 static void AddBitmapResult(const BitmapResult&);
38 39
39 /** 40 /**
40 * Add a Failure from a Test. 41 * Add a Failure from a Test.
41 */ 42 */
42 static void AddTestFailure(const skiatest::Failure&); 43 static void AddTestFailure(const skiatest::Failure&);
43 44
44 /** 45 /**
45 * Write all collected results to the file FLAGS_writePath[0]/dm.json. 46 * Write all collected results to the file FLAGS_writePath[0]/dm.json.
46 */ 47 */
47 static void DumpJson(); 48 static void DumpJson();
48 49
49 /** 50 /**
50 * Read JSON file at path written by DumpJson, calling callback for each 51 * Read JSON file at path written by DumpJson, calling callback for each
51 * BitmapResult recorded in the file. Return success. 52 * BitmapResult recorded in the file. Return success.
52 */ 53 */
53 static bool ReadJson(const char* path, void(*callback)(BitmapResult)); 54 static bool ReadJson(const char* path, void(*callback)(BitmapResult));
54 }; 55 };
55 56
56 57
57 } // namespace DM 58 } // namespace DM
58 #endif // DMJsonWriter_DEFINED 59 #endif // DMJsonWriter_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMJsonWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698