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

Unified Diff: src/gpu/effects/GrConfigConversionEffect.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/effects/GrConfigConversionEffect.cpp
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 3f68268b2017869fe0b2ee5b2a19d5cc012ab3d3..042e5f8047658e2ab1f4e42e05274cce4983c7bd 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -226,7 +226,7 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
paint1.addColorFragmentProcessor(pmToUPM1);
- GrDrawContext* readDrawContext = context->drawContext();
+ SkAutoTUnref<GrDrawContext> readDrawContext(context->drawContext());
if (!readDrawContext) {
failed = true;
break;
@@ -243,7 +243,7 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
paint2.addColorFragmentProcessor(upmToPM);
- GrDrawContext* tempDrawContext = context->drawContext();
+ SkAutoTUnref<GrDrawContext> tempDrawContext(context->drawContext());
if (!tempDrawContext) {
failed = true;
break;
@@ -257,7 +257,7 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
paint3.addColorFragmentProcessor(pmToUPM2);
- readDrawContext = context->drawContext();
+ readDrawContext.reset(context->drawContext());
if (!readDrawContext) {
failed = true;
break;
« src/gpu/GrRenderTarget.cpp ('K') | « src/gpu/SkGr.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698