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 "GrContext.h" | 8 #include "GrContext.h" |
9 #include "GrContextFactory.h" | 9 #include "GrContextFactory.h" |
10 #include "GrRenderTarget.h" | 10 #include "GrRenderTarget.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 SkpSkGrThreadedTestRunner::~SkpSkGrThreadedTestRunner() { | 165 SkpSkGrThreadedTestRunner::~SkpSkGrThreadedTestRunner() { |
166 for (int index = 0; index < fRunnables.count(); index++) { | 166 for (int index = 0; index < fRunnables.count(); index++) { |
167 delete fRunnables[index]; | 167 delete fRunnables[index]; |
168 } | 168 } |
169 } | 169 } |
170 | 170 |
171 void SkpSkGrThreadedTestRunner::render() { | 171 void SkpSkGrThreadedTestRunner::render() { |
172 // TODO: we don't really need to be using SkRunnables here anymore. | 172 // TODO: we don't really need to be using SkRunnables here anymore. |
173 // We can just write the code we'd run right in the for loop. | 173 // We can just write the code we'd run right in the for loop. |
174 sk_parallel_for(fRunnables.count(), [&](int i) { | 174 SkTaskGroup().batch(fRunnables.count(), [&](int i) { |
175 fRunnables[i]->run(); | 175 fRunnables[i]->run(); |
176 }); | 176 }); |
177 } | 177 } |
178 | 178 |
179 //////////////////////////////////////////////// | 179 //////////////////////////////////////////////// |
180 | 180 |
181 static const char outGrDir[] = OUT_DIR "grTest"; | 181 static const char outGrDir[] = OUT_DIR "grTest"; |
182 static const char outSkDir[] = OUT_DIR "skTest"; | 182 static const char outSkDir[] = OUT_DIR "skTest"; |
183 static const char outSkpDir[] = OUT_DIR "skpTest"; | 183 static const char outSkpDir[] = OUT_DIR "skpTest"; |
184 static const char outDiffDir[] = OUT_DIR "outTest"; | 184 static const char outDiffDir[] = OUT_DIR "outTest"; |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 int testIndex = 166; | 751 int testIndex = 166; |
752 int dirIndex = skipOverSkGr[testIndex - 166].directory; | 752 int dirIndex = skipOverSkGr[testIndex - 166].directory; |
753 SkString pictDir = make_in_dir_name(dirIndex); | 753 SkString pictDir = make_in_dir_name(dirIndex); |
754 if (pictDir.size() == 0) { | 754 if (pictDir.size() == 0) { |
755 return; | 755 return; |
756 } | 756 } |
757 SkString filename(skipOverSkGr[testIndex - 166].filename); | 757 SkString filename(skipOverSkGr[testIndex - 166].filename); |
758 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose
()); | 758 TestResult::Test(dirIndex, filename.c_str(), kCompareBits, reporter->verbose
()); |
759 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose
()); | 759 TestResult::Test(dirIndex, filename.c_str(), kEncodeFiles, reporter->verbose
()); |
760 } | 760 } |
OLD | NEW |