Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 1391653002: Remove ClipMaskType from GrCMM (Closed) Base URL: https://skia.googlesource.com/skia.git@cfp
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 4af96ac421538a136e0dfce7c832bc22e096e3b4..882f6073cbe1ab2650c50252a67becddd1d9614e 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -68,8 +68,7 @@ static bool path_needs_SW_renderer(GrContext* context,
}
GrClipMaskManager::GrClipMaskManager(GrDrawTarget* drawTarget)
- : fCurrClipMaskType(kNone_ClipMaskType)
- , fDrawTarget(drawTarget)
+ : fDrawTarget(drawTarget)
, fClipMode(kIgnoreClip_StencilClipMode) {
}
@@ -209,7 +208,6 @@ bool GrClipMaskManager::setupClipping(const GrPipelineBuilder& pipelineBuilder,
GrScissorState* scissorState,
const SkRect* devBounds,
GrAppliedClip* out) {
- fCurrClipMaskType = kNone_ClipMaskType;
if (kRespectClip_StencilClipMode == fClipMode) {
fClipMode = kIgnoreClip_StencilClipMode;
}
@@ -535,12 +533,10 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
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 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
}
}
- fCurrClipMaskType = kAlpha_ClipMaskType;
return texture.detach();
}
@@ -691,7 +686,6 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
const GrReducedClip::ElementList& elements,
const SkIRect& clipSpaceIBounds,
const SkIPoint& clipSpaceToStencilOffset) {
- SkASSERT(kNone_ClipMaskType == fCurrClipMaskType);
SkASSERT(rt);
GrStencilAttachment* stencilAttachment =
@@ -871,9 +865,6 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
}
}
}
- // 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 @@ void GrClipMaskManager::adjustStencilParams(GrStencilSettings* settings,
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 @@ GrTexture* GrClipMaskManager::createSoftwareClipMask(int32_t elementsGenID,
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 @@ GrTexture* GrClipMaskManager::createSoftwareClipMask(int32_t elementsGenID,
}
helper.toTexture(result);
- fCurrClipMaskType = kAlpha_ClipMaskType;
return result;
}
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698