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

Side by Side Diff: tools/skpdiff/SkDiffContext.cpp

Issue 19671002: migrate skpdiff to tools (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: i shake my fist at Visual Studio's default use of tabs 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 | « tools/skpdiff/SkDiffContext.h ('k') | tools/skpdiff/SkDifferentPixelsMetric.h » ('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 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkOSFile.h" 10 #include "SkOSFile.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 stream.writeText(" \"diffs\": [\n"); 173 stream.writeText(" \"diffs\": [\n");
174 for (int diffIndex = 0; diffIndex < currentRecord->fDiffs.count(); d iffIndex++) { 174 for (int diffIndex = 0; diffIndex < currentRecord->fDiffs.count(); d iffIndex++) {
175 DiffData& data = currentRecord->fDiffs[diffIndex]; 175 DiffData& data = currentRecord->fDiffs[diffIndex];
176 stream.writeText(" {\n"); 176 stream.writeText(" {\n");
177 177
178 stream.writeText(" \"differName\": \""); 178 stream.writeText(" \"differName\": \"");
179 stream.writeText(data.fDiffName); 179 stream.writeText(data.fDiffName);
180 stream.writeText("\",\n"); 180 stream.writeText("\",\n");
181 181
182 stream.writeText(" \"result\": "); 182 stream.writeText(" \"result\": ");
183 stream.writeScalarAsText(data.fResult); 183 stream.writeScalarAsText((SkScalar)data.fResult);
184 stream.writeText(",\n"); 184 stream.writeText(",\n");
185 185
186 stream.writeText(" \"pointsOfInterest\": [\n"); 186 stream.writeText(" \"pointsOfInterest\": [\n");
187 for (int poiIndex = 0; poiIndex < data.fPointsOfInterest.cou nt(); poiIndex++) { 187 for (int poiIndex = 0; poiIndex < data.fPointsOfInterest.cou nt(); poiIndex++) {
188 SkIPoint poi = data.fPointsOfInterest[poiIndex]; 188 SkIPoint poi = data.fPointsOfInterest[poiIndex];
189 stream.writeText(" ["); 189 stream.writeText(" [");
190 stream.writeDecAsText(poi.x()); 190 stream.writeDecAsText(poi.x());
191 stream.writeText(","); 191 stream.writeText(",");
192 stream.writeDecAsText(poi.y()); 192 stream.writeDecAsText(poi.y());
193 stream.writeText("]"); 193 stream.writeText("]");
(...skipping 29 matching lines...) Expand all
223 } 223 }
224 stream.writeText(" ]\n"); 224 stream.writeText(" ]\n");
225 if (useJSONP) { 225 if (useJSONP) {
226 stream.writeText("};\n"); 226 stream.writeText("};\n");
227 } 227 }
228 else 228 else
229 { 229 {
230 stream.writeText("}\n"); 230 stream.writeText("}\n");
231 } 231 }
232 } 232 }
OLDNEW
« no previous file with comments | « tools/skpdiff/SkDiffContext.h ('k') | tools/skpdiff/SkDifferentPixelsMetric.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698