| 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 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
| 9 #include "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
| 10 #include "SkOSFile.h" | 10 #include "SkOSFile.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 stream.writeText(" \"diffs\": [\n"); | 174 stream.writeText(" \"diffs\": [\n"); |
| 175 for (int diffIndex = 0; diffIndex < currentRecord->fDiffs.count(); d
iffIndex++) { | 175 for (int diffIndex = 0; diffIndex < currentRecord->fDiffs.count(); d
iffIndex++) { |
| 176 DiffData& data = currentRecord->fDiffs[diffIndex]; | 176 DiffData& data = currentRecord->fDiffs[diffIndex]; |
| 177 stream.writeText(" {\n"); | 177 stream.writeText(" {\n"); |
| 178 | 178 |
| 179 stream.writeText(" \"differName\": \""); | 179 stream.writeText(" \"differName\": \""); |
| 180 stream.writeText(data.fDiffName); | 180 stream.writeText(data.fDiffName); |
| 181 stream.writeText("\",\n"); | 181 stream.writeText("\",\n"); |
| 182 | 182 |
| 183 stream.writeText(" \"result\": "); | 183 stream.writeText(" \"result\": "); |
| 184 stream.writeScalarAsText(data.fResult); | 184 stream.writeScalarAsText((SkScalar)data.fResult); |
| 185 stream.writeText(",\n"); | 185 stream.writeText(",\n"); |
| 186 | 186 |
| 187 stream.writeText(" \"pointsOfInterest\":
[\n"); | 187 stream.writeText(" \"pointsOfInterest\":
[\n"); |
| 188 for (int poiIndex = 0; poiIndex < data.fPointsOfInterest.cou
nt(); poiIndex++) { | 188 for (int poiIndex = 0; poiIndex < data.fPointsOfInterest.cou
nt(); poiIndex++) { |
| 189 SkIPoint poi = data.fPointsOfInterest[poiIndex]; | 189 SkIPoint poi = data.fPointsOfInterest[poiIndex]; |
| 190 stream.writeText(" ["); | 190 stream.writeText(" ["); |
| 191 stream.writeDecAsText(poi.x()); | 191 stream.writeDecAsText(poi.x()); |
| 192 stream.writeText(","); | 192 stream.writeText(","); |
| 193 stream.writeDecAsText(poi.y()); | 193 stream.writeDecAsText(poi.y()); |
| 194 stream.writeText("]"); | 194 stream.writeText("]"); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 for (int i = 0; i < cntColumns; i++) { | 283 for (int i = 0; i < cntColumns; i++) { |
| 284 SkString str; | 284 SkString str; |
| 285 str.printf(", %f", values[i]); | 285 str.printf(", %f", values[i]); |
| 286 stream.writeText(str.c_str()); | 286 stream.writeText(str.c_str()); |
| 287 } | 287 } |
| 288 stream.writeText("\n"); | 288 stream.writeText("\n"); |
| 289 | 289 |
| 290 currentRecord = currentRecord->fNext; | 290 currentRecord = currentRecord->fNext; |
| 291 } | 291 } |
| 292 } | 292 } |
| OLD | NEW |