Unref GrXPFactory.
authorbungeman <bungeman@google.com>
Fri, 3 Jun 2016 21:25:05 +0000 (14:25 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 3 Jun 2016 21:25:05 +0000 (14:25 -0700)
Not releasing the reference was caught by asan in the Chromium roll.

This fixes "Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack".

Review-Url: https://codereview.chromium.org/2037193002

src/gpu/GrDrawContext.cpp

index 581bf08..280e632 100644 (file)
@@ -409,7 +409,7 @@ void GrDrawContextPriv::stencilRect(const GrFixedClip& clip,
 
     GrPaint paint;
     paint.setAntiAlias(doAA);
-    paint.setXPFactory(GrDisableColorXPFactory::Create());
+    SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create()));
 
     SkAutoTUnref<GrDrawBatch> batch(fDrawContext->getFillRectBatch(paint, viewMatrix, rect));
     SkASSERT(batch);