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;
}