Chromium Code Reviews| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 } | 277 } |
| 278 | 278 |
| 279 if (baselineEntries.count() != testEntries.count()) { | 279 if (baselineEntries.count() != testEntries.count()) { |
| 280 SkDebugf("Baseline and test patterns do not yield corresponding number o f files\n"); | 280 SkDebugf("Baseline and test patterns do not yield corresponding number o f files\n"); |
| 281 return; | 281 return; |
| 282 } | 282 } |
| 283 | 283 |
| 284 SkTaskGroup tg; | 284 SkTaskGroup tg; |
| 285 SkTArray<SkThreadedDiff> runnableDiffs; | 285 SkTArray<SkThreadedDiff> runnableDiffs; |
| 286 runnableDiffs.reset(baselineEntries.count()); | 286 runnableDiffs.reset(baselineEntries.count()); |
| 287 | 287 |
|
mtklein
2014/09/05 18:46:43
Ooh, I see. Try moving "SkTaskGroup tg;" down to
| |
| 288 for (int x = 0; x < baselineEntries.count(); x++) { | 288 for (int x = 0; x < baselineEntries.count(); x++) { |
| 289 runnableDiffs[x].setup(this, baselineEntries[x], testEntries[x]); | 289 runnableDiffs[x].setup(this, baselineEntries[x], testEntries[x]); |
| 290 tg.add(&runnableDiffs[x]); | 290 tg.add(&runnableDiffs[x]); |
| 291 } | 291 } |
| 292 tg.wait(); | |
| 292 } | 293 } |
| 293 | 294 |
| 294 void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) { | 295 void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) { |
| 295 SkTLList<DiffRecord>::Iter iter(fRecords, SkTLList<DiffRecord>::Iter::kHead_ IterStart); | 296 SkTLList<DiffRecord>::Iter iter(fRecords, SkTLList<DiffRecord>::Iter::kHead_ IterStart); |
| 296 DiffRecord* currentRecord = iter.get(); | 297 DiffRecord* currentRecord = iter.get(); |
| 297 | 298 |
| 298 if (useJSONP) { | 299 if (useJSONP) { |
| 299 stream.writeText("var SkPDiffRecords = {\n"); | 300 stream.writeText("var SkPDiffRecords = {\n"); |
| 300 } else { | 301 } else { |
| 301 stream.writeText("{\n"); | 302 stream.writeText("{\n"); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 451 for (int i = 0; i < cntColumns; i++) { | 452 for (int i = 0; i < cntColumns; i++) { |
| 452 SkString str; | 453 SkString str; |
| 453 str.printf(", %f", values[i]); | 454 str.printf(", %f", values[i]); |
| 454 stream.writeText(str.c_str()); | 455 stream.writeText(str.c_str()); |
| 455 } | 456 } |
| 456 stream.writeText("\n"); | 457 stream.writeText("\n"); |
| 457 | 458 |
| 458 currentRecord = iter2.next(); | 459 currentRecord = iter2.next(); |
| 459 } | 460 } |
| 460 } | 461 } |
| OLD | NEW |