mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
internal/egl: replace glFinish with eglWaitClient
glFinish depends on package gl which is about to require a function pointer loader. eglWaitClient is in the EGL API and always available. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -40,6 +40,7 @@ var (
|
||||
_eglSwapBuffers = libEGL.NewProc("eglSwapBuffers")
|
||||
_eglTerminate = libEGL.NewProc("eglTerminate")
|
||||
_eglQueryString = libEGL.NewProc("eglQueryString")
|
||||
_eglWaitClient = libEGL.NewProc("eglWaitClient")
|
||||
)
|
||||
|
||||
var loadOnce sync.Once
|
||||
@@ -156,6 +157,11 @@ func eglQueryString(disp _EGLDisplay, name _EGLint) string {
|
||||
return syscall.BytePtrToString((*byte)(unsafe.Pointer(r)))
|
||||
}
|
||||
|
||||
func eglWaitClient() bool {
|
||||
r, _, _ := _eglWaitClient.Call()
|
||||
return r != 0
|
||||
}
|
||||
|
||||
// issue34474KeepAlive calls runtime.KeepAlive as a
|
||||
// workaround for golang.org/issue/34474.
|
||||
func issue34474KeepAlive(v interface{}) {
|
||||
|
||||
Reference in New Issue
Block a user