Enable coverage when drawing to the stencil buffer.

Currently, we set kEmitTransBlack_BlendOptFlag when drawing to the stencil buffer - but that
prevents masks from being drawn correctly as they receive full coverage and no fragments get
discarded.

R=bsalomon@google.com, robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23197003

git-svn-id: http://skia.googlecode.com/svn/trunk@10745 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2013-08-15 18:16:41 +00:00
parent fdfbb9d5f0
commit bc98ff015b

View File

@ -327,7 +327,7 @@ GrDrawState::BlendOptFlags GrDrawState::getBlendOpts(bool forceCoverage,
if ((kZero_GrBlendCoeff == *srcCoeff && dstCoeffIsOne) || covIsZero) {
if (this->getStencil().doesWrite()) {
return kDisableBlend_BlendOptFlag |
kEmitTransBlack_BlendOptFlag;
kEmitCoverage_BlendOptFlag;
} else {
return kSkipDraw_BlendOptFlag;
}