From b602b8e5334edc0bfcdf086c2ea58e2b5d5f1f3b Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Fri, 10 Jul 2009 15:58:53 +0000 Subject: tweaks to 16bit shaders fix typo-bug in 4444 blend case git-svn-id: http://skia.googlecode.com/svn/trunk@265 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkBlitter_RGB16.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/core/SkBlitter_RGB16.cpp') diff --git a/src/core/SkBlitter_RGB16.cpp b/src/core/SkBlitter_RGB16.cpp index 3b8075fad3..3111655feb 100644 --- a/src/core/SkBlitter_RGB16.cpp +++ b/src/core/SkBlitter_RGB16.cpp @@ -351,20 +351,13 @@ static uint32_t pmcolor_to_expand16(SkPMColor c) { static inline void blend32_16_row(SkPMColor src, uint16_t dst[], int count) { SkASSERT(count > 0); -#if 0 uint32_t src_expand = pmcolor_to_expand16(src); - unsigned scale = (0xFF - SkGetPackedA32(src)) >> 3; + 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); -#else - do { - *dst = SkSrcOver32To16(src, *dst); - dst += 1; - } while (--count != 0); -#endif } void SkRGB16_Blitter::blitH(int x, int y, int width) SK_RESTRICT { -- cgit v1.2.3