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

Unified Diff: src/effects/SkMorphologyImageFilter.cpp

Issue 1321353002: Limit lifetime of GrDrawContext objects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 5 years, 4 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
Index: src/effects/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 2c99af92da32ef11324746db69bf7d3b5d7ff699..440d88d5bfbe5386fe34c9f30bdaba960d529d66 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -573,7 +573,7 @@ bool apply_morphology(const SkBitmap& input,
if (nullptr == scratch) {
return false;
}
- GrDrawContext* dstDrawContext = context->drawContext();
+ SkAutoTUnref<GrDrawContext> dstDrawContext(context->drawContext());
if (!dstDrawContext) {
return false;
}
@@ -596,7 +596,7 @@ bool apply_morphology(const SkBitmap& input,
if (nullptr == scratch) {
return false;
}
- GrDrawContext* dstDrawContext = context->drawContext();
+ SkAutoTUnref<GrDrawContext> dstDrawContext(context->drawContext());
if (!dstDrawContext) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698