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

Unified Diff: samplecode/SampleApp.cpp

Issue 692803003: tell our grcontext to abandon its backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: call unref Created 6 years, 2 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/views/mac/SkNSView.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 1b4a55e5dd0a88d93d6fc730e9223d20e9c6528d..3d2aa7c57399cb0a570a11650d8072b067e4df6e 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -259,8 +259,12 @@ public:
virtual void tearDownBackend(SampleWindow *win) {
#if SK_SUPPORT_GPU
- SkSafeUnref(fCurContext);
- fCurContext = NULL;
+ if (fCurContext) {
+ // in case we have outstanding refs to this guy (lua?)
+ fCurContext->abandonContext();
+ fCurContext->unref();
+ fCurContext = NULL;
+ }
SkSafeUnref(fCurIntf);
fCurIntf = NULL;
« no previous file with comments | « no previous file | src/views/mac/SkNSView.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698