commit | 3a17a32305c429d3b3c82d959aa16fa9433e620e | [log] [tgz] |
---|---|---|
author | Jim Van Verth <jvanverth@google.com> | Fri Feb 07 12:54:32 2020 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Fri Feb 07 18:20:28 2020 +0000 |
tree | 342b4406040e2b0d50c92ed07b55fc6b22424e4e | |
parent | 46b2b005840869fc57a3f5de0edf9c76dfc9a264 [diff] |
Reset current context on Mac GLContext destruction. Looks like the OS now holds on to the current GL context and doesn't release it unless explicitly told to. Bug: skia:9885 Change-Id: Ic7bc6860ec96d88e278682b7f2f67e1ac365d27b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269369 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com> Auto-Submit: Jim Van Verth <jvanverth@google.com>
diff --git a/tools/sk_app/mac/GLWindowContext_mac.mm b/tools/sk_app/mac/GLWindowContext_mac.mm index 0edcaa9..803eb23 100644 --- a/tools/sk_app/mac/GLWindowContext_mac.mm +++ b/tools/sk_app/mac/GLWindowContext_mac.mm
@@ -51,6 +51,7 @@ } GLWindowContext_mac::~GLWindowContext_mac() { + [NSOpenGLContext clearCurrentContext]; [fPixelFormat release]; fPixelFormat = nil; [fGLContext release];
diff --git a/tools/sk_app/mac/RasterWindowContext_mac.mm b/tools/sk_app/mac/RasterWindowContext_mac.mm index 337a3fe..5b8d345 100644 --- a/tools/sk_app/mac/RasterWindowContext_mac.mm +++ b/tools/sk_app/mac/RasterWindowContext_mac.mm
@@ -62,6 +62,7 @@ } RasterWindowContext_mac::~RasterWindowContext_mac() { + [NSOpenGLContext clearCurrentContext]; [fPixelFormat release]; fPixelFormat = nil; [fGLContext release];