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

Unified Diff: gm/texdata.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
« no previous file with comments | « no previous file | src/core/SkImageFilter.cpp » ('j') | src/gpu/GrRenderTarget.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texdata.cpp
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index 13a1c2a6c2275e56e91386e748956cd161f94bc5..1a807c7b9bd5a57d171af1fcd9989ff3bb2b1a45 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -39,7 +39,7 @@ protected:
void onDraw(SkCanvas* canvas) override {
GrRenderTarget* target = canvas->internal_private_accessTopLayerRenderTarget();
GrContext* ctx = canvas->getGrContext();
- GrDrawContext* drawContext = ctx ? ctx->drawContext() : nullptr;
+ SkAutoTUnref<GrDrawContext> drawContext(ctx ? ctx->drawContext() : nullptr);
if (drawContext && target) {
SkAutoTArray<SkPMColor> gTextureData((2 * S) * (2 * S));
static const int stride = 2 * S;
« no previous file with comments | « no previous file | src/core/SkImageFilter.cpp » ('j') | src/gpu/GrRenderTarget.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698