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

Unified Diff: gm/deferredtextureimagedata.cpp

Issue 2069443004: Fix leak of GrContextThreadSafeProxy in deferred_texture_image_data (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/deferredtextureimagedata.cpp
diff --git a/gm/deferredtextureimagedata.cpp b/gm/deferredtextureimagedata.cpp
index 951e8dbe2bcf900938ec4edcc9745c11e523356a..3cb1f24a77ef0d094d1b59e5e68414cf3e0dff6c 100644
--- a/gm/deferredtextureimagedata.cpp
+++ b/gm/deferredtextureimagedata.cpp
@@ -27,7 +27,8 @@ static bool DrawDeferredTextureImageData(GrContext* context, SkCanvas* canvas, S
std::vector<uint8_t> memory;
memory.resize(deferredSize);
- image->getDeferredTextureImageData(*context->threadSafeProxy(), params, 1, memory.data());
+ SkAutoTUnref<GrContextThreadSafeProxy> proxy(context->threadSafeProxy());
+ image->getDeferredTextureImageData(*proxy, params, 1, memory.data());
sk_sp<SkImage> uploadedImage =
SkImage::MakeFromDeferredTextureImageData(context, memory.data(), SkBudgeted::kNo);
canvas->drawImage(uploadedImage, x, y);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698