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

Unified Diff: src/gpu/gl/iOS/SkNativeGLContext_iOS.mm

Issue 500153002: Remove reliance on linked in GL functions for assembling GLES interfaces (Closed) Base URL: https://skia.googlesource.com/skia.git@gmcfg
Patch Set: cleanup Created 6 years, 4 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
Index: src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
diff --git a/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm b/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
index 1e11c0deb7be8afd32fdbf83314f6b9b6d4717c0..f04229f16e752f061c707ec069f95240028b610b 100644
--- a/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
+++ b/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
@@ -36,10 +36,13 @@ SkNativeGLContext::~SkNativeGLContext() {
}
void SkNativeGLContext::destroyGLContext() {
- if ([EAGLContext currentContext] == EAGLCTX) {
- [EAGLContext setCurrentContext:nil];
+ if (NULL != fEAGLContext) {
+ if ([EAGLContext currentContext] == EAGLCTX) {
+ [EAGLContext setCurrentContext:nil];
+ }
+ [EAGLCTX release];
+ fEAGLContext = NULL;
}
- [EAGLCTX release];
}
const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAPI) {

Powered by Google App Engine
This is Rietveld 408576698