Add dual source blending support for proper blending with coverage.
Review URL: http://codereview.appspot.com/4535088/
git-svn-id: http://skia.googlecode.com/svn/trunk@1390 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGpuGLFixed.cpp b/gpu/src/GrGpuGLFixed.cpp
index e197a82..65229dc 100644
--- a/gpu/src/GrGpuGLFixed.cpp
+++ b/gpu/src/GrGpuGLFixed.cpp
@@ -57,6 +57,7 @@
GrGpuGLFixed::GrGpuGLFixed() {
f4X4DownsampleFilterSupport = false;
+ fDualSourceBlendingSupport = false;
}
GrGpuGLFixed::~GrGpuGLFixed() {
@@ -136,8 +137,8 @@
}
if (GR_GL_SUPPORT_ES1) {
- if (BlendCoefReferencesConstant(fCurrDrawState.fSrcBlend) ||
- BlendCoefReferencesConstant(fCurrDrawState.fDstBlend)) {
+ if (BlendCoeffReferencesConstant(fCurrDrawState.fSrcBlend) ||
+ BlendCoeffReferencesConstant(fCurrDrawState.fDstBlend)) {
unimpl("ES1 doesn't support blend constant");
return false;
}
@@ -147,6 +148,8 @@
return false;
}
+ this->flushBlend(type, fCurrDrawState.fSrcBlend, fCurrDrawState.fDstBlend);
+
if (fDirtyFlags.fRenderTargetChanged) {
flushProjectionMatrix();
}