mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app: [X11] don't recreate EGL surface during resize
According to #565 X11 GPU drivers don't deal well with recreation of EGL surfaces. Thanks to Walter Schneider for debugging this issue and coming up with the original patch. Fixes: https://todo.sr.ht/~eliasnaur/gio/565 Co-authored-by: Walter Werner SCHNEIDER <contact@schnwalter.eu> Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+4
-7
@@ -15,10 +15,9 @@ import (
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
disp _EGLDisplay
|
||||
eglCtx *eglContext
|
||||
eglSurf _EGLSurface
|
||||
width, height int
|
||||
disp _EGLDisplay
|
||||
eglCtx *eglContext
|
||||
eglSurf _EGLSurface
|
||||
}
|
||||
|
||||
type eglContext struct {
|
||||
@@ -121,11 +120,9 @@ func (c *Context) VisualID() int {
|
||||
return c.eglCtx.visualID
|
||||
}
|
||||
|
||||
func (c *Context) CreateSurface(win NativeWindowType, width, height int) error {
|
||||
func (c *Context) CreateSurface(win NativeWindowType) error {
|
||||
eglSurf, err := createSurface(c.disp, c.eglCtx, win)
|
||||
c.eglSurf = eglSurf
|
||||
c.width = width
|
||||
c.height = height
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user