Remove ClipMaskType from GrCMM

Review URL: https://codereview.chromium.org/1391653002
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 4af96ac..882f607 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -68,8 +68,7 @@
 }
 
 GrClipMaskManager::GrClipMaskManager(GrDrawTarget* drawTarget)
-    : fCurrClipMaskType(kNone_ClipMaskType)
-    , fDrawTarget(drawTarget)
+    : fDrawTarget(drawTarget)
     , fClipMode(kIgnoreClip_StencilClipMode) {
 }
 
@@ -209,7 +208,6 @@
                                       GrScissorState* scissorState,
                                       const SkRect* devBounds,
                                       GrAppliedClip* out) {
-    fCurrClipMaskType = kNone_ClipMaskType;
     if (kRespectClip_StencilClipMode == fClipMode) {
         fClipMode = kIgnoreClip_StencilClipMode;
     }
@@ -535,12 +533,10 @@
                                                   const GrReducedClip::ElementList& elements,
                                                   const SkVector& clipToMaskOffset,
                                                   const SkIRect& clipSpaceIBounds) {
-    SkASSERT(kNone_ClipMaskType == fCurrClipMaskType);
     GrResourceProvider* resourceProvider = fDrawTarget->cmmAccess().resourceProvider();
     GrUniqueKey key;
     GetClipMaskKey(elementsGenID, clipSpaceIBounds, &key);
     if (GrTexture* texture = resourceProvider->findAndRefTextureByUniqueKey(key)) {
-        fCurrClipMaskType = kAlpha_ClipMaskType;
         return texture;
     }
 
@@ -678,7 +674,6 @@
         }
     }
 
-    fCurrClipMaskType = kAlpha_ClipMaskType;
     return texture.detach();
 }
 
@@ -691,7 +686,6 @@
                                               const GrReducedClip::ElementList& elements,
                                               const SkIRect& clipSpaceIBounds,
                                               const SkIPoint& clipSpaceToStencilOffset) {
-    SkASSERT(kNone_ClipMaskType == fCurrClipMaskType);
     SkASSERT(rt);
 
     GrStencilAttachment* stencilAttachment =
@@ -871,9 +865,6 @@
             }
         }
     }
-    // set this last because recursive draws may overwrite it back to kNone.
-    SkASSERT(kNone_ClipMaskType == fCurrClipMaskType);
-    fCurrClipMaskType = kStencil_ClipMaskType;
     fClipMode = kRespectClip_StencilClipMode;
     return true;
 }
@@ -999,8 +990,6 @@
         if (func >= kBasicStencilFuncCount) {
             int respectClip = kRespectClip_StencilClipMode == mode;
             if (respectClip) {
-                // The GrGpu class should have checked this
-                SkASSERT(this->isClipInStencil());
                 switch (func) {
                     case kAlwaysIfInClip_StencilFunc:
                         funcMask = clipBit;
@@ -1055,7 +1044,6 @@
                                                      const GrReducedClip::ElementList& elements,
                                                      const SkVector& clipToMaskOffset,
                                                      const SkIRect& clipSpaceIBounds) {
-    SkASSERT(kNone_ClipMaskType == fCurrClipMaskType);
     GrUniqueKey key;
     GetClipMaskKey(elementsGenID, clipSpaceIBounds, &key);
     GrResourceProvider* resourceProvider = fDrawTarget->cmmAccess().resourceProvider();
@@ -1118,7 +1106,6 @@
     }
     helper.toTexture(result);
 
-    fCurrClipMaskType = kAlpha_ClipMaskType;
     return result;
 }
 
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index 5c336e0..005830c 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -67,14 +67,6 @@
                        const SkRect* devBounds,
                        GrAppliedClip*);
 
-    bool isClipInStencil() const {
-        return kStencil_ClipMaskType == fCurrClipMaskType;
-    }
-
-    bool isClipInAlpha() const {
-        return kAlpha_ClipMaskType == fCurrClipMaskType;
-    }
-
     void adjustPathStencilParams(const GrStencilAttachment*, GrStencilSettings*);
 
 private:
@@ -170,17 +162,6 @@
 
     GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, bool renderTarget);
 
-    /**
-     * We may represent the clip as a mask in the stencil buffer or as an alpha
-     * texture. It may be neither because the scissor rect suffices or we
-     * haven't yet examined the clip.
-     */
-    enum ClipMaskType {
-        kNone_ClipMaskType,
-        kStencil_ClipMaskType,
-        kAlpha_ClipMaskType,
-    } fCurrClipMaskType;
-
     static const int kMaxAnalyticElements = 4;
 
     GrDrawTarget*   fDrawTarget;    // This is our owning draw target.