}
void SkNativeGLContext::destroyGLContext() {
- if ([EAGLContext currentContext] == EAGLCTX) {
- [EAGLContext setCurrentContext:nil];
+ if (fEAGLContext) {
+ if ([EAGLContext currentContext] == EAGLCTX) {
+ [EAGLContext setCurrentContext:nil];
+ }
+ [EAGLCTX release];
+ fEAGLContext = NULL;
}
- [EAGLCTX release];
}
const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAPI) {