Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: src/gpu/GrPathRenderingDrawContext.cpp

Issue 1706773002: Fix memory leak (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPathRenderingDrawContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathRenderingDrawContext.cpp
diff --git a/src/gpu/GrPathRenderingDrawContext.cpp b/src/gpu/GrPathRenderingDrawContext.cpp
index a29af843b7cd184db083493099a9e14caf5e98fe..3ca742c873659eced8dec4c4e4c6c2a1797e68ea 100644
--- a/src/gpu/GrPathRenderingDrawContext.cpp
+++ b/src/gpu/GrPathRenderingDrawContext.cpp
@@ -26,7 +26,7 @@ void GrPathRenderingDrawContext::drawText(const GrClip& clip, const GrPaint& gr
GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawText");
if (!fStencilAndCoverTextContext) {
- fStencilAndCoverTextContext = GrStencilAndCoverTextContext::Create();
+ fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create());
}
fStencilAndCoverTextContext->drawText(this->drawingManager()->getContext(), this, clip, grPaint,
@@ -46,7 +46,7 @@ void GrPathRenderingDrawContext::drawPosText(const GrClip& clip, const GrPaint&
GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawPosText");
if (!fStencilAndCoverTextContext) {
- fStencilAndCoverTextContext = GrStencilAndCoverTextContext::Create();
+ fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create());
}
fStencilAndCoverTextContext->drawPosText(this->drawingManager()->getContext(), this, clip,
@@ -65,7 +65,7 @@ void GrPathRenderingDrawContext::drawTextBlob(const GrClip& clip, const SkPaint&
GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawTextBlob");
if (!fStencilAndCoverTextContext) {
- fStencilAndCoverTextContext = GrStencilAndCoverTextContext::Create();
+ fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create());
}
fStencilAndCoverTextContext->drawTextBlob(this->drawingManager()->getContext(), this, clip,
« no previous file with comments | « src/gpu/GrPathRenderingDrawContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698