diff options
author | fmalita@google.com <fmalita@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-26 21:46:34 +0000 |
---|---|---|
committer | fmalita@google.com <fmalita@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-26 21:46:34 +0000 |
commit | 3b3ce3bff59daba75c875fc9d25d5dc9d823e8a0 (patch) | |
tree | 4045c1067c9d47dcdf6e7099c7796dcb423a0fb6 | |
parent | f272e3554aec86b5d6f7ba44f81f37e5a2070bdc (diff) |
Update SkLumaMaskXfermode partial coverage handling.
Use lerp-to-dst instead of straight coverage scaling to align the behavior with
the other transfer modes.
R=reed@google.com
Review URL: https://codereview.chromium.org/23453004
git-svn-id: http://skia.googlecode.com/svn/trunk@10927 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/effects/SkLumaXfermode.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/effects/SkLumaXfermode.cpp b/src/effects/SkLumaXfermode.cpp index df0a663c3b..88b0ddfbc3 100644 --- a/src/effects/SkLumaXfermode.cpp +++ b/src/effects/SkLumaXfermode.cpp @@ -76,7 +76,8 @@ void SkLumaMaskXfermode::xfer32(SkPMColor dst[], const SkPMColor src[], if (cov) { unsigned resC = luma_proc(a[i], b[i]); if (cov < 255) { - resC = SkAlphaMulQ(resC, SkAlpha255To256(cov)); + resC = SkFastFourByteInterp256(resC, dst[i], + SkAlpha255To256(cov)); } dst[i] = resC; } |