Index: src/gpu/gl/GrGLBlend.cpp |
diff --git a/src/gpu/gl/GrGLBlend.cpp b/src/gpu/gl/GrGLBlend.cpp |
index 0f73fbdbdbfb4c704aa65a5186bf1d9894a8bff2..4179ec0b535565c0ae5de57c76f4ef3006c26959 100644 |
--- a/src/gpu/gl/GrGLBlend.cpp |
+++ b/src/gpu/gl/GrGLBlend.cpp |
@@ -58,12 +58,13 @@ void GrGLBlend::AppendPorterDuffBlend(GrGLFragmentBuilder* fsBuilder, const char |
SkXfermode::Coeff srcCoeff, dstCoeff; |
SkXfermode::ModeAsCoeff(mode, &srcCoeff, &dstCoeff); |
- fsBuilder->codeAppendf("%s =", outColor); |
+ fsBuilder->codeAppendf("%s = ", outColor); |
// append src blend |
bool didAppend = append_porterduff_term(fsBuilder, srcCoeff, srcColor, srcColor, dstColor, |
false); |
// append dst blend |
- SkAssertResult(append_porterduff_term(fsBuilder, dstCoeff, dstColor, srcColor, dstColor, |
- didAppend)); |
+ if(!append_porterduff_term(fsBuilder, dstCoeff, dstColor, srcColor, dstColor, didAppend)) { |
+ fsBuilder->codeAppend("vec4(0, 0, 0, 0)"); |
+ } |
fsBuilder->codeAppend(";"); |
} |