Chromium Code Reviews| Index: tools/skpdiff/SkDiffContext.cpp |
| diff --git a/tools/skpdiff/SkDiffContext.cpp b/tools/skpdiff/SkDiffContext.cpp |
| index a75450b65b23fb1e02ac70ac1bb8070bc86bd949..7dda139713ff8997d91d7feddca98f0e01f58219 100644 |
| --- a/tools/skpdiff/SkDiffContext.cpp |
| +++ b/tools/skpdiff/SkDiffContext.cpp |
| @@ -15,6 +15,8 @@ |
| #include "SkImageDiffer.h" |
| #include "skpdiff_util.h" |
| +static const int kMaxPOI = 100; |
|
djsollen
2013/07/23 12:28:29
document that this value truncates the output as t
|
| + |
| SkDiffContext::SkDiffContext() { |
| fRecords = NULL; |
| fDiffers = NULL; |
| @@ -185,7 +187,8 @@ void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) { |
| stream.writeText(",\n"); |
| stream.writeText(" \"pointsOfInterest\": [\n"); |
| - for (int poiIndex = 0; poiIndex < data.fPointsOfInterest.count(); poiIndex++) { |
| + for (int poiIndex = 0; poiIndex < data.fPointsOfInterest.count() && |
| + poiIndex < kMaxPOI; poiIndex++) { |
| SkIPoint poi = data.fPointsOfInterest[poiIndex]; |
| stream.writeText(" ["); |
| stream.writeDecAsText(poi.x()); |