Not releasing the reference was caught by the Skia asan bot.
All remaining occurences of this pattern have been updated.
This fixes "Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack".
TBR=herb
Review-Url: https://codereview.chromium.org/
2037243002
if (!clipPath.isEmpty()) {
if (canRenderDirectToStencil) {
GrPaint paint;
- paint.setXPFactory(GrDisableColorXPFactory::Create());
+ SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create()));
paint.setAntiAlias(element->isAA());
GrPathRenderer::DrawPathArgs args;
viewMatrix, element->getRect(), element->isAA(), *pass);
} else {
GrPaint paint;
- paint.setXPFactory(GrDisableColorXPFactory::Create());
+ SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create()));
paint.setAntiAlias(element->isAA());
GrPathRenderer::DrawPathArgs args;
SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType());
GrPaint paint;
- paint.setXPFactory(GrDisableColorXPFactory::Create());
+ SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create()));
paint.setAntiAlias(args.fIsAA);
this->internalDrawPath(args.fDrawContext,
SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType());
GrPaint paint;
- paint.setXPFactory(GrDisableColorXPFactory::Create());
+ SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create()));
paint.setAntiAlias(args.fIsAA);
this->internalDrawPath(args.fDrawContext,
"GrStencilAndCoverPathRenderer::onStencilPath");
GrPaint paint;
- paint.setXPFactory(GrDisableColorXPFactory::Create());
+ SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create()));
paint.setAntiAlias(args.fIsAA);
GrPipelineBuilder pipelineBuilder(paint, args.fDrawContext->isUnifiedMultisampled());