diff options
author | Mike Reed <reed@google.com> | 2009-11-10 14:01:59 -0500 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2009-11-10 14:01:59 -0500 |
commit | 24fb8c7cc7b76134a25914d8f6346c89c359c621 (patch) | |
tree | 563507c03fbcfc0ff4862324c28b656217da6da7 /src/effects/SkAvoidXfermode.cpp | |
parent | 27b953159488bb519b49751497a62eb837b9a881 (diff) | |
download | external_skia-24fb8c7cc7b76134a25914d8f6346c89c359c621.zip external_skia-24fb8c7cc7b76134a25914d8f6346c89c359c621.tar.gz external_skia-24fb8c7cc7b76134a25914d8f6346c89c359c621.tar.bz2 |
refresh from skia/trunk
support for SSE2 blitrow optimizations
fix flattening in 2-point gradient
fix rotation in colormatrix
Diffstat (limited to 'src/effects/SkAvoidXfermode.cpp')
-rw-r--r-- | src/effects/SkAvoidXfermode.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/effects/SkAvoidXfermode.cpp b/src/effects/SkAvoidXfermode.cpp index eed4012..d26039c 100644 --- a/src/effects/SkAvoidXfermode.cpp +++ b/src/effects/SkAvoidXfermode.cpp @@ -174,7 +174,7 @@ void SkAvoidXfermode::xfer16(uint16_t dst[], const SkPMColor src[], int count, unsigned opG = SkColorGetG(fOpColor) >> (8 - SK_G16_BITS); unsigned opB = SkColorGetB(fOpColor) >> (8 - SK_R16_BITS); uint32_t mul = fDistMul; - uint32_t sub = (fDistMul - (1 << 14)) << 8; + uint32_t sub = (fDistMul - (1 << 14)) << SK_R16_BITS; int MAX, mask; @@ -193,7 +193,6 @@ void SkAvoidXfermode::xfer16(uint16_t dst[], const SkPMColor src[], int count, SkASSERT((unsigned)d <= 31); // convert from 0..31 to 0..32 d += d >> 4; - d = scale_dist_14(d, mul, sub); SkASSERT(d <= 32); @@ -216,7 +215,7 @@ void SkAvoidXfermode::xfer4444(uint16_t dst[], const SkPMColor src[], int count, unsigned opG = SkColorGetG(fOpColor) >> 4; unsigned opB = SkColorGetB(fOpColor) >> 4; uint32_t mul = fDistMul; - uint32_t sub = (fDistMul - (1 << 14)) << 8; + uint32_t sub = (fDistMul - (1 << 14)) << 4; int MAX, mask; @@ -233,8 +232,8 @@ void SkAvoidXfermode::xfer4444(uint16_t dst[], const SkPMColor src[], int count, // now reverse d if we need to d = MAX + (d ^ mask) - mask; SkASSERT((unsigned)d <= 15); - d = SkAlpha255To256(d); - + // convert from 0..15 to 0..16 + d += d >> 3; d = scale_dist_14(d, mul, sub); SkASSERT(d <= 16); |