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

Side by Side Diff: experimental/skpdiff/SkDiffContext.h

Issue 18648002: add JSONP option to output of skpdiff (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | experimental/skpdiff/SkDiffContext.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 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 * "result": 1, 78 * "result": 1,
79 * "pointsOfInterest": [ 79 * "pointsOfInterest": [
80 * [285,279], 80 * [285,279],
81 * ] 81 * ]
82 * } 82 * }
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 */ 90 */
90 void outputRecords(SkWStream& stream); 91 void outputRecords(SkWStream& stream, bool useJSONP);
91 92
92 private: 93 private:
93 struct DiffData { 94 struct DiffData {
94 const char* fDiffName; 95 const char* fDiffName;
95 double fResult; 96 double fResult;
96 SkTDArray<SkIPoint> fPointsOfInterest; 97 SkTDArray<SkIPoint> fPointsOfInterest;
97 }; 98 };
98 99
99 struct DiffRecord { 100 struct DiffRecord {
100 SkString fBaselinePath; 101 SkString fBaselinePath;
101 SkString fTestPath; 102 SkString fTestPath;
102 SkTArray<DiffData> fDiffs; 103 SkTArray<DiffData> fDiffs;
103 DiffRecord* fNext; 104 DiffRecord* fNext;
104 }; 105 };
105 106
106 // We use linked list for the records so that their pointers remain stable. A resizable array 107 // We use linked list for the records so that their pointers remain stable. A resizable array
107 // might change its pointers, which would make it harder for async diffs to record their 108 // might change its pointers, which would make it harder for async diffs to record their
108 // results. 109 // results.
109 DiffRecord * fRecords; 110 DiffRecord * fRecords;
110 111
111 SkImageDiffer** fDiffers; 112 SkImageDiffer** fDiffers;
112 int fDifferCount; 113 int fDifferCount;
113 }; 114 };
114 115
115 #endif 116 #endif
OLDNEW
« no previous file with comments | « no previous file | experimental/skpdiff/SkDiffContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698