diff options
author | bungeman <bungeman@google.com> | 2016-06-03 17:43:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-03 17:43:24 -0700 |
commit | 7062d01a338d28e878c3c28469f84d2af1389796 (patch) | |
tree | a4dd70945da3fd4752f029d009e3a12b6f486030 /src | |
parent | 862dae548a8ef40804bc9146d5c7b9f360efa960 (diff) |
More Unref GrXPFactory.
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
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrClipMaskManager.cpp | 4 | ||||
-rw-r--r-- | src/gpu/batches/GrDefaultPathRenderer.cpp | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrMSAAPathRenderer.cpp | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index ff95eeaac3..fd741b9a2b 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -683,7 +683,7 @@ bool GrClipMaskManager::CreateStencilClipMask(GrContext* context, if (!clipPath.isEmpty()) { if (canRenderDirectToStencil) { GrPaint paint; - paint.setXPFactory(GrDisableColorXPFactory::Create()); + SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create())); paint.setAntiAlias(element->isAA()); GrPathRenderer::DrawPathArgs args; @@ -724,7 +724,7 @@ bool GrClipMaskManager::CreateStencilClipMask(GrContext* context, 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; diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp index 9077d92f4e..1bcfc2d8b6 100644 --- a/src/gpu/batches/GrDefaultPathRenderer.cpp +++ b/src/gpu/batches/GrDefaultPathRenderer.cpp @@ -629,7 +629,7 @@ void GrDefaultPathRenderer::onStencilPath(const StencilPathArgs& 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, diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp index 887c527364..2983f58055 100644 --- a/src/gpu/batches/GrMSAAPathRenderer.cpp +++ b/src/gpu/batches/GrMSAAPathRenderer.cpp @@ -751,7 +751,7 @@ void GrMSAAPathRenderer::onStencilPath(const StencilPathArgs& 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, diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp index e43d05c098..314e6c2649 100644 --- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp +++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp @@ -71,7 +71,7 @@ void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) { "GrStencilAndCoverPathRenderer::onStencilPath"); GrPaint paint; - paint.setXPFactory(GrDisableColorXPFactory::Create()); + SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create())); paint.setAntiAlias(args.fIsAA); GrPipelineBuilder pipelineBuilder(paint, args.fDrawContext->isUnifiedMultisampled()); |