aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-12 18:50:34 +0000
committerGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-12 18:50:34 +0000
commitd51ea26ea17e88e2ab1bd6eb5672d59b63892346 (patch)
tree68b3825c74705e9573f098e4d8658eee2f7e8ca3
parented02c4d05e3f2ed86dbf4276a69827ab23810598 (diff)
use premul macro to pack components
git-svn-id: http://skia.googlecode.com/svn/trunk@5043 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/effects/SkArithmeticMode.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index c999ce08c9..cd3c31d9a7 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -107,14 +107,7 @@ void SkArithmeticMode_scalar::xfer32(SkPMColor dst[], const SkPMColor src[],
b = blend(b, SkGetPackedB32(sc), scale);
}
- // turn the result back into premul
- if (0xFF != a) {
- int scale = a + (a >> 7);
- r = SkAlphaMul(r, scale);
- g = SkAlphaMul(g, scale);
- b = SkAlphaMul(b, scale);
- }
- dst[i] = SkPackARGB32(a, r, g, b);
+ dst[i] = SkPremultiplyARGBInline(a, r, g, b);
}
}
}