| Index: src/core/SkBlitRow_D16.cpp
|
| diff --git a/src/core/SkBlitRow_D16.cpp b/src/core/SkBlitRow_D16.cpp
|
| index 6bf4cea9974f5d4488a65bd6aec532ccbe8096e5..544234d064261aa45104ed4d25df475218339c86 100644
|
| --- a/src/core/SkBlitRow_D16.cpp
|
| +++ b/src/core/SkBlitRow_D16.cpp
|
| @@ -204,27 +204,12 @@ static void S32A_D565_Blend_Dither(uint16_t* SK_RESTRICT dst,
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -static uint32_t pmcolor_to_expand16(SkPMColor c) {
|
| - unsigned r = SkGetPackedR32(c);
|
| - unsigned g = SkGetPackedG32(c);
|
| - unsigned b = SkGetPackedB32(c);
|
| - return (g << 24) | (r << 13) | (b << 2);
|
| -}
|
| -
|
| static void Color32A_D565(uint16_t dst[], SkPMColor src, int count, int x, int y) {
|
| - SkASSERT(count > 0);
|
| - uint32_t src_expand = pmcolor_to_expand16(src);
|
| - unsigned scale = SkAlpha255To256(0xFF - SkGetPackedA32(src)) >> 3;
|
| - do {
|
| - uint32_t dst_expand = SkExpand_rgb_16(*dst) * scale;
|
| - *dst = SkCompact_rgb_16((src_expand + dst_expand) >> 5);
|
| - dst += 1;
|
| - } while (--count != 0);
|
| + for (int i = 0; i < count; i++) {
|
| + dst[i] = SkSrcOver32To16(src, dst[i]);
|
| + }
|
| }
|
|
|
| -///////////////////////////////////////////////////////////////////////////////
|
| -///////////////////////////////////////////////////////////////////////////////
|
| -
|
| static const SkBlitRow::Proc16 gDefault_565_Procs[] = {
|
| // no dither
|
| S32_D565_Opaque,
|
|
|