aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gm/arithmode.cpp4
-rw-r--r--src/effects/SkArithmeticMode.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/gm/arithmode.cpp b/gm/arithmode.cpp
index f5e1091eff..2a97eca957 100644
--- a/gm/arithmode.cpp
+++ b/gm/arithmode.cpp
@@ -29,8 +29,8 @@ static SkBitmap make_src() {
SkPaint paint;
SkPoint pts[] = { {0, 0}, {SkIntToScalar(WW), SkIntToScalar(HH)} };
SkColor colors[] = {
- SK_ColorBLACK, SK_ColorGREEN, SK_ColorCYAN,
- SK_ColorRED, SK_ColorMAGENTA, SK_ColorWHITE
+ SK_ColorTRANSPARENT, SK_ColorGREEN, SK_ColorCYAN,
+ SK_ColorRED, SK_ColorMAGENTA, SK_ColorWHITE,
};
SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, SK_ARRAY_COUNT(colors),
SkShader::kClamp_TileMode);
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);