SkCanvas* canvas = targets[j]->surface.get() ? targets[j]->surface->getCanvas() : NULL;
const char* config = targets[j]->config.name;
-#ifdef SK_DEBUG
- // skia:2797 Some SKPs SkASSERT in debug mode. Skip them for now.
- if (0 == strcmp("565", config) && SkStrContains(bench->getName(), ".skp")) {
- SkDebugf("Skipping 565 %s. See skia:2797\n", bench->getName());
- continue;
- }
-#endif
-
const int loops =
#if SK_SUPPORT_GPU
Benchmark::kGPU_Backend == targets[j]->config.backend
SkPMColorAssert(sc);
if (sc) {
uint16_t dc = *dst;
- unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha);
- unsigned dr = SkMulS16(SkPacked32ToR16(sc), alpha) + SkMulS16(SkGetPackedR16(dc), dst_scale);
- unsigned dg = SkMulS16(SkPacked32ToG16(sc), alpha) + SkMulS16(SkGetPackedG16(dc), dst_scale);
- unsigned db = SkMulS16(SkPacked32ToB16(sc), alpha) + SkMulS16(SkGetPackedB16(dc), dst_scale);
- *dst = SkPackRGB16(SkDiv255Round(dr), SkDiv255Round(dg), SkDiv255Round(db));
+ SkPMColor res = SkBlendARGB32(sc, SkPixel16ToPixel32(dc), alpha);
+ *dst = SkPixel32ToPixel16(res);
}
dst += 1;
} while (--count != 0);