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

Unified Diff: src/gpu/GrLayerCache.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/gpu/GrLayerCache.cpp
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp
index f33384c3e994db64a27604b5149c1b73c2d4db08..27cb55b9ee7358bdffcdba9ae2e49b6f73902cab 100644
--- a/src/gpu/GrLayerCache.cpp
+++ b/src/gpu/GrLayerCache.cpp
@@ -467,7 +467,7 @@ void GrLayerCache::purgeAll() {
SkASSERT(0 == fPictureHash.count());
- GrDrawContext* drawContext = fContext->drawContext();
+ SkAutoTUnref<GrDrawContext> drawContext(fContext->drawContext());
if (drawContext) {
drawContext->discard(fAtlas->getTexture()->asRenderTarget());
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrRenderTarget.cpp » ('j') | src/gpu/GrRenderTarget.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698