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" |
11 #include "SkRunnable.h" | 11 #include "SkRunnable.h" |
12 #include "SkStream.h" | 12 #include "SkStream.h" |
13 #include "SkTDict.h" | 13 #include "SkTDict.h" |
14 #include "SkThreadPool.h" | 14 #include "SkThreadPool.h" |
15 | 15 |
16 #include "SkDiffContext.h" | 16 #include "SkDiffContext.h" |
17 #include "skpdiff_util.h" | 17 #include "skpdiff_util.h" |
18 | 18 |
19 // Truncates the number of points of interests in JSON output to not freeze the
parser | |
20 static const int kMaxPOI = 100; | |
21 | |
22 SkDiffContext::SkDiffContext() { | 19 SkDiffContext::SkDiffContext() { |
23 fDiffers = NULL; | 20 fDiffers = NULL; |
24 fDifferCount = 0; | 21 fDifferCount = 0; |
25 fThreadCount = SkThreadPool::kThreadPerCore; | 22 fThreadCount = SkThreadPool::kThreadPerCore; |
26 } | 23 } |
27 | 24 |
28 SkDiffContext::~SkDiffContext() { | 25 SkDiffContext::~SkDiffContext() { |
29 if (NULL != fDiffers) { | 26 if (NULL != fDiffers) { |
30 SkDELETE_ARRAY(fDiffers); | 27 SkDELETE_ARRAY(fDiffers); |
31 } | 28 } |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 for (int i = 0; i < cntColumns; i++) { | 353 for (int i = 0; i < cntColumns; i++) { |
357 SkString str; | 354 SkString str; |
358 str.printf(", %f", values[i]); | 355 str.printf(", %f", values[i]); |
359 stream.writeText(str.c_str()); | 356 stream.writeText(str.c_str()); |
360 } | 357 } |
361 stream.writeText("\n"); | 358 stream.writeText("\n"); |
362 | 359 |
363 currentRecord = iter2.next(); | 360 currentRecord = iter2.next(); |
364 } | 361 } |
365 } | 362 } |
OLD | NEW |