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

Side by Side Diff: dm/DMJsonWriter.h

Issue 853883004: Revert of Sketch DM refactor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/DMImageTask.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
11 #include "SkString.h" 11 #include "SkString.h"
12 #include "Test.h" 12 #include "Test.h"
13 13
14 namespace DM { 14 namespace DM {
15 15
16 /** 16 /**
17 * Class for collecting results from DM and writing to a json file. 17 * Class for collecting results from DM and writing to a json file.
18 * All methods are thread-safe. 18 * All methods are thread-safe.
19 */ 19 */
20 class JsonWriter { 20 class JsonWriter {
21 public: 21 public:
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"
28 SkString sourceType; // "gm", "skp", "image" 28 SkString mode; // "direct", "default-tilegrid", "pipe"
29 SkString sourceType; // "GM", "SKP"
29 SkString md5; // In ASCII, so 32 bytes long. 30 SkString md5; // In ASCII, so 32 bytes long.
30 SkString ext; // Extension of file we wrote: "png", "pdf", . ..
31 }; 31 };
32 32
33 /** 33 /**
34 * Add a result to the end of the list of results. 34 * Add a result to the end of the list of results.
35 */ 35 */
36 static void AddBitmapResult(const BitmapResult&); 36 static void AddBitmapResult(const BitmapResult&);
37 37
38 /** 38 /**
39 * Add a Failure from a Test. 39 * Add a Failure from a Test.
40 */ 40 */
41 static void AddTestFailure(const skiatest::Failure&); 41 static void AddTestFailure(const skiatest::Failure&);
42 42
43 /** 43 /**
44 * Write all collected results to the file FLAGS_writePath[0]/dm.json. 44 * Write all collected results to the file FLAGS_writePath[0]/dm.json.
45 */ 45 */
46 static void DumpJson(); 46 static void DumpJson();
47 }; 47 };
48 48
49 } // namespace DM 49 } // namespace DM
50 #endif // DMJsonWriter_DEFINED 50 #endif // DMJsonWriter_DEFINED
OLDNEW
« no previous file with comments | « dm/DMImageTask.cpp ('k') | dm/DMJsonWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698