commit | 56b785ea58b286fc6c055da6155916719832a3a2 | [log] [tgz] |
---|---|---|
author | Dmitri Shuralyov <dmitshur@golang.org> | Mon Apr 08 22:37:09 2019 -0400 |
committer | Dmitri Shuralyov <dmitshur@golang.org> | Tue Apr 09 04:48:07 2019 +0000 |
tree | 0da0125174a66b37f2c5d33fa1db89c50a81404a | |
parent | eba85a11b6d6892332b9970bde11383a7b512559 [diff] |
shiny/driver/gldriver: fix 2 warnings on macOS 10.14 This CL iterates upon CL 171033 and resolves two remaining C compiler warnings when building on macOS 10.14: # golang.org/x/exp/shiny/driver/gldriver cocoa.m:63:39: warning: 'NSOpenGLCPSwapInterval' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations] /Applications/Xcode.app/.../NSOpenGL.h:281:39: note: 'NSOpenGLCPSwapInterval' has been explicitly marked deprecated here cocoa.m:72:1: warning: method possibly missing a [super prepareOpenGL] call [-Wobjc-missing-super-calls] NSOpenGLContextParameterSwapInterval is the less-deprecated version of NSOpenGLCPSwapInterval and respects the GL_SILENCE_DEPRECATION define. However, we can't use it because it's available only in macOS 10.12+, but Go currently supports older macOS versions (e.g., Go 1.12 requires macOS 10.10+). Use a targeted #pragma clang diagnostic ignored instead. Add a [super prepareOpenGL] call to ScreenGLView.prepareOpenGL method. I can't quite tell if it was omitted intentionally, but based on its documentation¹, it seems reasonable to have it. I didn't notice problems in local testing. If it turns out it shouldn't be there, then it can be removed in a way that doesn't generate a compiler warning. ¹ https://developer.apple.com/documentation/appkit/nsopenglview/1414940-prepareopengl Updates golang/go#11811 Change-Id: I10b6522a7af64eadeb6586fad44ef4c1ece40ab2 Reviewed-on: https://go-review.googlesource.com/c/exp/+/171034 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This subrepository holds experimental and deprecated (in the old
directory) packages.
The idea for this subrepository originated as the pkg/exp
directory of the main repository, but its presence there made it unavailable to users of the binary downloads of the Go installation. The subrepository has therefore been created to make it possible to go get
these packages.
Warning: Packages here are experimental and unreliable. Some may one day be promoted to the main repository or other subrepository, or they may be modified arbitrarily or even disappear altogether.
In short, code in this subrepository is not subject to the Go 1 compatibility promise. (No subrepo is, but the promise is even more likely to be violated by go.exp than the others.)
Caveat emptor.