Stop incorrectly setting the clip bit in GrCMM

Review URL: https://codereview.chromium.org/866403005
This commit is contained in:
bsalomon 2015-01-26 11:19:16 -08:00 committed by Commit bot
parent c12b74dc41
commit 356be2ed89

View File

@ -568,7 +568,6 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
bool invert = element->isInverseFilled(); bool invert = element->isInverseFilled();
if (invert || SkRegion::kIntersect_Op == op || SkRegion::kReverseDifference_Op == op) { if (invert || SkRegion::kIntersect_Op == op || SkRegion::kReverseDifference_Op == op) {
GrPipelineBuilder pipelineBuilder; GrPipelineBuilder pipelineBuilder;
pipelineBuilder.enableState(GrPipelineBuilder::kClip_StateBit);
GrPathRenderer* pr = NULL; GrPathRenderer* pr = NULL;
bool useTemp = !this->canStencilAndDrawElement(&pipelineBuilder, result, &pr, element); bool useTemp = !this->canStencilAndDrawElement(&pipelineBuilder, result, &pr, element);
@ -625,7 +624,6 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
if (useTemp) { if (useTemp) {
GrPipelineBuilder backgroundPipelineBuilder; GrPipelineBuilder backgroundPipelineBuilder;
backgroundPipelineBuilder.enableState(GrPipelineBuilder::kClip_StateBit);
backgroundPipelineBuilder.setRenderTarget(result->asRenderTarget()); backgroundPipelineBuilder.setRenderTarget(result->asRenderTarget());
// Now draw into the accumulator using the real operation and the temp buffer as a // Now draw into the accumulator using the real operation and the temp buffer as a
@ -638,7 +636,6 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
maskSpaceElementIBounds); maskSpaceElementIBounds);
} else { } else {
GrPipelineBuilder backgroundPipelineBuilder; GrPipelineBuilder backgroundPipelineBuilder;
backgroundPipelineBuilder.enableState(GrPipelineBuilder::kClip_StateBit);
backgroundPipelineBuilder.setRenderTarget(result->asRenderTarget()); backgroundPipelineBuilder.setRenderTarget(result->asRenderTarget());
set_coverage_drawing_xpf(op, !invert, &backgroundPipelineBuilder); set_coverage_drawing_xpf(op, !invert, &backgroundPipelineBuilder);
@ -657,7 +654,6 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
} }
} else { } else {
GrPipelineBuilder pipelineBuilder; GrPipelineBuilder pipelineBuilder;
pipelineBuilder.enableState(GrPipelineBuilder::kClip_StateBit);
// all the remaining ops can just be directly draw into the accumulation buffer // all the remaining ops can just be directly draw into the accumulation buffer
set_coverage_drawing_xpf(op, false, &pipelineBuilder); set_coverage_drawing_xpf(op, false, &pipelineBuilder);
@ -718,7 +714,6 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
GrPipelineBuilder pipelineBuilder; GrPipelineBuilder pipelineBuilder;
pipelineBuilder.setRenderTarget(rt); pipelineBuilder.setRenderTarget(rt);
pipelineBuilder.enableState(GrPipelineBuilder::kClip_StateBit);
pipelineBuilder.setDisableColorXPFactory(); pipelineBuilder.setDisableColorXPFactory();