Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index ec471ecc681188041ee0fc13d69efaa256020b23..431238b9db27f2350334fb879e1be650e849ac92 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -1649,8 +1649,13 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode, |
if (NULL != colors) { |
// need to convert byte order and from non-PM to PM |
convertedColors.reset(vertexCount); |
+ SkColor color; |
for (int i = 0; i < vertexCount; ++i) { |
- convertedColors[i] = SkColor2GrColor(colors[i]); |
+ color = colors[i]; |
+ if (paint.getAlpha() != 255) { |
+ color = SkColorSetA(color, SkMulDiv255Round(SkColorGetA(color), paint.getAlpha())); |
+ } |
+ convertedColors[i] = SkColor2GrColor(color); |
} |
colors = convertedColors.get(); |
} |