Trivial cleanup of copying GrPipelineBuilder

TBR=robertphillips@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1229983003
This commit is contained in:
joshualitt 2015-07-09 12:17:44 -07:00 committed by Commit bot
parent 1c84634454
commit 4f6dc521f5
2 changed files with 5 additions and 7 deletions

View File

@ -842,24 +842,23 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
// element directly or a bounding rect of the entire clip.
fClipMode = kModifyClip_StencilClipMode;
for (int p = 0; p < passes; ++p) {
GrPipelineBuilder pipelineBuilderCopy(pipelineBuilder);
*pipelineBuilderCopy.stencil() = stencilSettings[p];
*pipelineBuilder.stencil() = stencilSettings[p];
if (canDrawDirectToClip) {
if (Element::kRect_Type == element->getType()) {
// We need this AGP until everything is in GrBatch
fClipTarget->drawSimpleRect(&pipelineBuilderCopy,
fClipTarget->drawSimpleRect(&pipelineBuilder,
GrColor_WHITE,
viewMatrix,
element->getRect());
} else {
pr->drawPath(fClipTarget, &pipelineBuilderCopy, GrColor_WHITE,
pr->drawPath(fClipTarget, &pipelineBuilder, GrColor_WHITE,
viewMatrix, clipPath, stroke, false);
}
} else {
// The view matrix is setup to do clip space -> stencil space translation, so
// draw rect in clip space.
fClipTarget->drawSimpleRect(&pipelineBuilderCopy,
fClipTarget->drawSimpleRect(&pipelineBuilder,
GrColor_WHITE,
viewMatrix,
SkRect::Make(clipSpaceIBounds));

View File

@ -146,8 +146,7 @@ bool GrSoftwarePathRenderer::onDrawPath(GrDrawTarget* target,
return false;
}
GrPipelineBuilder copy = *pipelineBuilder;
GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, &copy, color, viewMatrix,
GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, pipelineBuilder, color, viewMatrix,
devPathBounds);
if (path.isInverseFillType()) {