| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |