OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkDiffContext_DEFINED | 8 #ifndef SkDiffContext_DEFINED |
9 #define SkDiffContext_DEFINED | 9 #define SkDiffContext_DEFINED |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 | 45 |
46 /** | 46 /** |
47 * Sets the directory within which to store whiteDiffs (images showing white | 47 * Sets the directory within which to store whiteDiffs (images showing white |
48 * for each pixel that differs between baseline and test). | 48 * for each pixel that differs between baseline and test). |
49 * | 49 * |
50 * If the directory does not exist yet, it will be created. | 50 * If the directory does not exist yet, it will be created. |
51 */ | 51 */ |
52 void setWhiteDiffDir(const SkString& directory); | 52 void setWhiteDiffDir(const SkString& directory); |
53 | 53 |
54 /** | 54 /** |
55 * Sets a flag wether to generate file names that a combination | |
epoger
2014/08/12 19:52:24
I find the description confusing... maybe somethin
stephana
2014/08/12 21:36:49
Ok. Will do.
On 2014/08/12 19:52:24, epoger wrot
| |
56 * of the baseline and test input files. | |
57 * | |
58 * If false the output file names are the common prefix of the | |
59 * two inputs. | |
60 */ | |
61 void setLongNames(const bool useLongNames); | |
62 | |
63 /** | |
55 * Sets the differs to be used in each diff. Already started diffs will not retroactively use | 64 * Sets the differs to be used in each diff. Already started diffs will not retroactively use |
56 * these. | 65 * these. |
57 * @param differs An array of differs to use. The array is copied, but not t he differs | 66 * @param differs An array of differs to use. The array is copied, but not t he differs |
58 * themselves. | 67 * themselves. |
59 */ | 68 */ |
60 void setDiffers(const SkTDArray<SkImageDiffer*>& differs); | 69 void setDiffers(const SkTDArray<SkImageDiffer*>& differs); |
61 | 70 |
62 /** | 71 /** |
63 * Compares two directories of images with the given differ | 72 * Compares two directories of images with the given differ |
64 * @param baselinePath The baseline directory's path | 73 * @param baselinePath The baseline directory's path |
(...skipping 13 matching lines...) Expand all Loading... | |
78 * @param baselinePath The baseline file path | 87 * @param baselinePath The baseline file path |
79 * @param testPath The matching test file path | 88 * @param testPath The matching test file path |
80 */ | 89 */ |
81 void addDiff(const char* baselinePath, const char* testPath); | 90 void addDiff(const char* baselinePath, const char* testPath); |
82 | 91 |
83 /** | 92 /** |
84 * Output the records of each diff in JSON. | 93 * Output the records of each diff in JSON. |
85 * | 94 * |
86 * The format of the JSON document is one top level array named "records". | 95 * The format of the JSON document is one top level array named "records". |
87 * Each record in the array is an object with the following values: | 96 * Each record in the array is an object with the following values: |
88 * "commonName" : string containing the common prefix of the baseline Path | 97 * "commonName" : string containing the common prefix of the baseline Path |
epoger
2014/08/12 19:52:24
Please update this docstring to indicate different
stephana
2014/08/12 21:36:49
Acknowledged.
| |
89 * and testPath filenames | 98 * and testPath filenames |
90 * "baselinePath" : string containing the path to the baseline image | 99 * "baselinePath" : string containing the path to the baseline image |
91 * "testPath" : string containing the path to the test image | 100 * "testPath" : string containing the path to the test image |
92 * "differencePath" : (optional) string containing the path to an alpha | 101 * "differencePath" : (optional) string containing the path to an alpha |
93 * mask of the pixel difference between the baseline | 102 * mask of the pixel difference between the baseline |
94 * and test images | 103 * and test images |
95 * TODO(epoger): consider renaming this "alphaMaskPath " | 104 * TODO(epoger): consider renaming this "alphaMaskPath " |
96 * to distinguish from other difference types? | 105 * to distinguish from other difference types? |
97 * "rgbDiffPath" : (optional) string containing the path to a bitmap | 106 * "rgbDiffPath" : (optional) string containing the path to a bitmap |
98 * showing per-channel differences between the | 107 * showing per-channel differences between the |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 // results. | 179 // results. |
171 SkTLList<DiffRecord> fRecords; | 180 SkTLList<DiffRecord> fRecords; |
172 | 181 |
173 SkImageDiffer** fDiffers; | 182 SkImageDiffer** fDiffers; |
174 int fDifferCount; | 183 int fDifferCount; |
175 int fThreadCount; | 184 int fThreadCount; |
176 | 185 |
177 SkString fAlphaMaskDir; | 186 SkString fAlphaMaskDir; |
178 SkString fRgbDiffDir; | 187 SkString fRgbDiffDir; |
179 SkString fWhiteDiffDir; | 188 SkString fWhiteDiffDir; |
189 bool longNames; | |
180 }; | 190 }; |
181 | 191 |
182 #endif | 192 #endif |
OLD | NEW |