correctly copy constant coverage from GrPaint to GrDrawState
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 2 Aug 2013 19:54:28 +0000 (19:54 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 2 Aug 2013 19:54:28 +0000 (19:54 +0000)
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/21924006

git-svn-id: http://skia.googlecode.com/svn/trunk@10522 2bbb7eff-a529-9590-31e7-b0007b416f81

src/gpu/GrDrawState.cpp

index ab800d2..0a56757 100644 (file)
@@ -46,7 +46,6 @@ void GrDrawState::setFromPaint(const GrPaint& paint, const SkMatrix& vm, GrRende
 
     // These have no equivalent in GrPaint, set them to defaults
     fCommon.fBlendConstant = 0x0;
-    fCommon.fCoverage = 0xffffffff;
     fCommon.fDrawFace = kBoth_DrawFace;
     fCommon.fStencilSettings.setDisabled();
     this->resetStateFlags();
@@ -55,6 +54,7 @@ void GrDrawState::setFromPaint(const GrPaint& paint, const SkMatrix& vm, GrRende
     this->enableState(GrDrawState::kClip_StateBit);
 
     this->setColor(paint.getColor());
+    this->setCoverage4(paint.getCoverage());
     this->setState(GrDrawState::kDither_StateBit, paint.isDither());
     this->setState(GrDrawState::kHWAntialias_StateBit, paint.isAntiAlias());