| 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 "CrashHandler.h" | 8 #include "CrashHandler.h" |
| 9 // #include "OverwriteLine.h" | 9 // #include "OverwriteLine.h" |
| 10 #include "Resources.h" | 10 #include "Resources.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 300 |
| 301 TestRunner::~TestRunner() { | 301 TestRunner::~TestRunner() { |
| 302 for (int index = 0; index < fRunnables.count(); index++) { | 302 for (int index = 0; index < fRunnables.count(); index++) { |
| 303 delete fRunnables[index]; | 303 delete fRunnables[index]; |
| 304 } | 304 } |
| 305 } | 305 } |
| 306 | 306 |
| 307 void TestRunner::render() { | 307 void TestRunner::render() { |
| 308 // TODO: this doesn't really need to use SkRunnables any more. | 308 // TODO: this doesn't really need to use SkRunnables any more. |
| 309 // We can just write the code to run in the for-loop directly. | 309 // We can just write the code to run in the for-loop directly. |
| 310 sk_parallel_for(fRunnables.count(), [&](int i) { | 310 SkTaskGroup().batch(fRunnables.count(), [&](int i) { |
| 311 fRunnables[i]->run(); | 311 fRunnables[i]->run(); |
| 312 }); | 312 }); |
| 313 } | 313 } |
| 314 | 314 |
| 315 //////////////////////////////////////////////// | 315 //////////////////////////////////////////////// |
| 316 | 316 |
| 317 | 317 |
| 318 static int similarBits(const SkBitmap& gr, const SkBitmap& sk) { | 318 static int similarBits(const SkBitmap& gr, const SkBitmap& sk) { |
| 319 const int kRowCount = 3; | 319 const int kRowCount = 3; |
| 320 const int kThreshold = 3; | 320 const int kThreshold = 3; |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 } | 1103 } |
| 1104 } | 1104 } |
| 1105 return 0; | 1105 return 0; |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 #if !defined(SK_BUILD_FOR_IOS) | 1108 #if !defined(SK_BUILD_FOR_IOS) |
| 1109 int main(int argc, char * const argv[]) { | 1109 int main(int argc, char * const argv[]) { |
| 1110 return tool_main(argc, (char**) argv); | 1110 return tool_main(argc, (char**) argv); |
| 1111 } | 1111 } |
| 1112 #endif | 1112 #endif |
| OLD | NEW |