aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBlitter_RGB16.cpp
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-07-10 15:58:53 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-07-10 15:58:53 +0000
commitb602b8e5334edc0bfcdf086c2ea58e2b5d5f1f3b (patch)
treeb3d71dc22a3354a7f634c6b028c7ca313300ae7f /src/core/SkBlitter_RGB16.cpp
parent32a4249cbd3ebcb448fb0824afe875cdf9036686 (diff)
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
Diffstat (limited to 'src/core/SkBlitter_RGB16.cpp')
-rw-r--r--src/core/SkBlitter_RGB16.cpp9
1 files changed, 1 insertions, 8 deletions
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 {