Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: src/gpu/gl/GrGLBlend.cpp

Issue 1307393005: GrGLBlend::AppendPorterDuffBlend now supports kClear_Mode (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(";");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698