Turn on MPD threading in nanobench.
Seems okay after this small patch to skip lockPixels() / unlockPixels(). BUG=skia:3149 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot Review URL: https://codereview.chromium.org/773203003
This commit is contained in:
parent
4de8a4dcf7
commit
4f10844149
@ -600,8 +600,7 @@ int nanobench_main();
|
||||
int nanobench_main() {
|
||||
SetupCrashHandler();
|
||||
SkAutoGraphics ag;
|
||||
// Multithreading is disabled pending resolution of skia:3149
|
||||
//SkTaskGroup::Enabler enabled;
|
||||
SkTaskGroup::Enabler enabled;
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
GrContext::Options grContextOpts;
|
||||
|
@ -92,9 +92,9 @@ static bool valid_for_drawing(const SkBitmap& bm) {
|
||||
return false; // no pixels to read
|
||||
}
|
||||
if (kIndex_8_SkColorType == bm.colorType()) {
|
||||
// ugh, I have to lock-pixels to inspect the colortable
|
||||
SkAutoLockPixels alp(bm);
|
||||
if (!bm.getColorTable()) {
|
||||
SkBitmap copy(bm); // Locking and unlocking pixels is not thread safe,
|
||||
SkAutoLockPixels alp(copy); // but we need to call it before getColorTable() is safe.
|
||||
if (!copy.getColorTable()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user