| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 * ] | 83 * ] |
| 84 * } | 84 * } |
| 85 * ] | 85 * ] |
| 86 * } | 86 * } |
| 87 * | 87 * |
| 88 * @param stream The stream to output the diff to | 88 * @param stream The stream to output the diff to |
| 89 * @param useJSONP True to adding padding to the JSON output to make it cros
s-site requestable. | 89 * @param useJSONP True to adding padding to the JSON output to make it cros
s-site requestable. |
| 90 */ | 90 */ |
| 91 void outputRecords(SkWStream& stream, bool useJSONP); | 91 void outputRecords(SkWStream& stream, bool useJSONP); |
| 92 | 92 |
| 93 /** |
| 94 * Output the records score in csv format. |
| 95 */ |
| 96 void outputCsv(SkWStream& stream); |
| 97 |
| 98 |
| 93 private: | 99 private: |
| 94 struct DiffData { | 100 struct DiffData { |
| 95 const char* fDiffName; | 101 const char* fDiffName; |
| 96 double fResult; | 102 double fResult; |
| 97 SkTDArray<SkIPoint> fPointsOfInterest; | 103 SkTDArray<SkIPoint> fPointsOfInterest; |
| 98 }; | 104 }; |
| 99 | 105 |
| 100 struct DiffRecord { | 106 struct DiffRecord { |
| 101 SkString fBaselinePath; | 107 SkString fBaselinePath; |
| 102 SkString fTestPath; | 108 SkString fTestPath; |
| 103 SkTArray<DiffData> fDiffs; | 109 SkTArray<DiffData> fDiffs; |
| 104 DiffRecord* fNext; | 110 DiffRecord* fNext; |
| 105 }; | 111 }; |
| 106 | 112 |
| 107 // We use linked list for the records so that their pointers remain stable.
A resizable array | 113 // We use linked list for the records so that their pointers remain stable.
A resizable array |
| 108 // might change its pointers, which would make it harder for async diffs to
record their | 114 // might change its pointers, which would make it harder for async diffs to
record their |
| 109 // results. | 115 // results. |
| 110 DiffRecord * fRecords; | 116 DiffRecord * fRecords; |
| 111 | 117 |
| 112 SkImageDiffer** fDiffers; | 118 SkImageDiffer** fDiffers; |
| 113 int fDifferCount; | 119 int fDifferCount; |
| 114 }; | 120 }; |
| 115 | 121 |
| 116 #endif | 122 #endif |
| OLD | NEW |