diff options
author | 2013-05-28 19:43:05 +0000 | |
---|---|---|
committer | 2013-05-28 19:43:05 +0000 | |
commit | 35c733cc9ce71c4513dfb6f39c4d9df5905e897c (patch) | |
tree | f731e87de053fdf7d9afbc5bff6a62bc97833358 /src/effects | |
parent | 435401d38606e9b5b747890da23fd46d7c464ccd (diff) |
Fix alpha computation in SkArithmeticMode.
Note: this will require new baselines for the arithmode GM.
R=reed@google.com
Review URL: https://codereview.chromium.org/15917010
git-svn-id: http://skia.googlecode.com/svn/trunk@9302 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkArithmeticMode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp index 7492cce5ec..5bc48f1ce9 100644 --- a/src/effects/SkArithmeticMode.cpp +++ b/src/effects/SkArithmeticMode.cpp @@ -73,12 +73,12 @@ void SkArithmeticMode_scalar::xfer32(SkPMColor dst[], const SkPMColor src[], int da = SkGetPackedA32(dc); int srcNeedsUnpremul = needsUnpremul(sa); - int dstNeedsUnpremul = needsUnpremul(sa); + int dstNeedsUnpremul = needsUnpremul(da); int a, r, g, b; if (!srcNeedsUnpremul && !dstNeedsUnpremul) { - a = arith(k1, k2, k3, k4, sa, sa); + a = arith(k1, k2, k3, k4, sa, da); r = arith(k1, k2, k3, k4, SkGetPackedR32(sc), SkGetPackedR32(dc)); g = arith(k1, k2, k3, k4, SkGetPackedG32(sc), SkGetPackedG32(dc)); b = arith(k1, k2, k3, k4, SkGetPackedB32(sc), SkGetPackedB32(dc)); @@ -103,7 +103,7 @@ void SkArithmeticMode_scalar::xfer32(SkPMColor dst[], const SkPMColor src[], db = SkUnPreMultiply::ApplyScale(scale, db); } - a = arith(k1, k2, k3, k4, sa, sa); + a = arith(k1, k2, k3, k4, sa, da); r = arith(k1, k2, k3, k4, sr, dr); g = arith(k1, k2, k3, k4, sg, dg); b = arith(k1, k2, k3, k4, sb, db); |