diff options
author | reed <reed@google.com> | 2014-10-30 11:29:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-30 11:29:08 -0700 |
commit | 789e327ad9c9f7d25b2368b4f3f9812bf9f0a3a2 (patch) | |
tree | 61dbf1f8f79d198f9febe4503eb518b8e8b48862 /samplecode | |
parent | 902d4d18dec27b6991516a235fc04a7af7290287 (diff) |
tell our grcontext to abandon its backend
BUG=skia:
Review URL: https://codereview.chromium.org/692803003
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleApp.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 1b4a55e5dd..3d2aa7c573 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; |