Add a state bit to GrDrawState that forces coverage to be blended.

Use this mode in GrClipMaskManager.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6945048

git-svn-id: http://skia.googlecode.com/svn/trunk@6790 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 11b301d..0a64dd1 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -89,7 +89,6 @@
     // TODO: generalize this function so that when
     // a clip gets complex enough it can just be done in SW regardless
     // of whether it would invoke the GrSoftwarePathRenderer.
-    bool useSW = false;
     SkStroke stroke;
     stroke.setDoFill(true);
 
@@ -305,7 +304,10 @@
             // TODO: Do rects directly to the accumulator using a aa-rect GrEffect that covers the
             // entire mask bounds and writes 0 outside the rect.
             if (element->isAA()) {
-                getContext()->getAARectRenderer()->fillAARect(fGpu, fGpu, element->getRect(), true);
+                getContext()->getAARectRenderer()->fillAARect(fGpu,
+                                                              fGpu,
+                                                              element->getRect(),
+                                                              false);
             } else {
                 fGpu->drawSimpleRect(element->getRect(), NULL);
             }
@@ -444,6 +446,9 @@
     // we populate with a rasterization of the clip.
     SkIRect maskSpaceIBounds = SkIRect::MakeWH(clipSpaceIBounds.width(), clipSpaceIBounds.height());
 
+    // We're drawing a coverage mask and want coverage to be run through the blend function.
+    drawState->enableState(GrDrawState::kCoverageDrawing_StateBit);
+
     // Set the matrix so that rendered clip elements are transformed to mask space from clip space.
     drawState->viewMatrix()->setTranslate(clipToMaskOffset);