forked from joejulian/gio
app/internal/window: re-create EGL surface on resizing
This is effectively a revert of 60e4cca934, which
seems to have caused flickering problems on some versions of Windows.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -142,8 +142,6 @@ func (c *context) MakeCurrent() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
c.width, c.height = width, height
|
c.width, c.height = width, height
|
||||||
// Do not re-create surfaces when only resizing. This prevents flickering when resizing on X11.
|
|
||||||
if c.eglWin != win {
|
|
||||||
if win == nilEGLNativeWindowType && c.srgbFBO != nil {
|
if win == nilEGLNativeWindowType && c.srgbFBO != nil {
|
||||||
c.srgbFBO.Release()
|
c.srgbFBO.Release()
|
||||||
c.srgbFBO = nil
|
c.srgbFBO = nil
|
||||||
@@ -167,9 +165,6 @@ func (c *context) MakeCurrent() error {
|
|||||||
} else {
|
} else {
|
||||||
eglSwapInterval(c.eglCtx.disp, 0)
|
eglSwapInterval(c.eglCtx.disp, 0)
|
||||||
}
|
}
|
||||||
} else if c.eglWin == nilEGLNativeWindowType {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if c.eglCtx.srgb {
|
if c.eglCtx.srgb {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user