Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: tests/BlendTest.cpp

Issue 1552093002: If we swap its arguments, SkTaskGroup::batch() _is_ sk_parallel_for. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkTaskGroup.cpp ('k') | tests/OncePtrTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "Test.h" 8 #include "Test.h"
9 #include "SkColor.h" 9 #include "SkColor.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 SkPMColor src = SkPackARGB32(sa, s, s, s), 91 SkPMColor src = SkPackARGB32(sa, s, s, s),
92 dst = SkPackARGB32(da, d, d, d); 92 dst = SkPackARGB32(da, d, d, d);
93 xfermode->xfer32(&dst, &src, 1, nullptr); // To keep it simple, no AA. 93 xfermode->xfer32(&dst, &src, 1, nullptr); // To keep it simple, no AA.
94 if (!SkPMColorValid(dst)) { 94 if (!SkPMColorValid(dst)) {
95 ERRORF(r, "%08x is not premul using %s", dst, SkXfermode::ModeNa me(mode)); 95 ERRORF(r, "%08x is not premul using %s", dst, SkXfermode::ModeNa me(mode));
96 } 96 }
97 }}}} 97 }}}}
98 }; 98 };
99 99
100 // Parallelism helps speed things up on my desktop from ~725s to ~50s. 100 // Parallelism helps speed things up on my desktop from ~725s to ~50s.
101 sk_parallel_for(SkXfermode::kLastMode, test_mode); 101 SkTaskGroup().batch(SkXfermode::kLastMode, test_mode);
102 } 102 }
OLDNEW
« no previous file with comments | « src/core/SkTaskGroup.cpp ('k') | tests/OncePtrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698