tell our grcontext to abandon its backend
BUG=skia: Review URL: https://codereview.chromium.org/692803003
This commit is contained in:
parent
902d4d18de
commit
789e327ad9
@ -259,8 +259,12 @@ public:
|
||||
|
||||
virtual void tearDownBackend(SampleWindow *win) {
|
||||
#if SK_SUPPORT_GPU
|
||||
SkSafeUnref(fCurContext);
|
||||
if (fCurContext) {
|
||||
// in case we have outstanding refs to this guy (lua?)
|
||||
fCurContext->abandonContext();
|
||||
fCurContext->unref();
|
||||
fCurContext = NULL;
|
||||
}
|
||||
|
||||
SkSafeUnref(fCurIntf);
|
||||
fCurIntf = NULL;
|
||||
|
@ -386,6 +386,7 @@ CGLContextObj createGLContext(int msaaSampleCount) {
|
||||
andGetInfo:(SkOSWindow::AttachmentInfo*) info {
|
||||
if (nil == fGLContext) {
|
||||
CGLContextObj ctx = createGLContext(sampleCount);
|
||||
SkASSERT(ctx);
|
||||
fGLContext = [[NSOpenGLContext alloc] initWithCGLContextObj:ctx];
|
||||
CGLReleaseContext(ctx);
|
||||
if (NULL == fGLContext) {
|
||||
|
Loading…
Reference in New Issue
Block a user