mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
egl: make pixmaps and pbuffers EGL_BUFFER_PRESERVED
eglSwapBuffers is no-op to these surface types anyway.
This commit is contained in:
parent
83f5d5e6aa
commit
a5ab46909e
1 changed files with 3 additions and 1 deletions
|
|
@ -269,11 +269,13 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
|
|||
{
|
||||
const char *func;
|
||||
EGLint renderBuffer = EGL_BACK_BUFFER;
|
||||
EGLint swapBehavior = EGL_BUFFER_PRESERVED;
|
||||
EGLint err;
|
||||
|
||||
switch (type) {
|
||||
case EGL_WINDOW_BIT:
|
||||
func = "eglCreateWindowSurface";
|
||||
swapBehavior = EGL_BUFFER_DESTROYED;
|
||||
break;
|
||||
case EGL_PIXMAP_BIT:
|
||||
func = "eglCreatePixmapSurface";
|
||||
|
|
@ -315,7 +317,7 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
|
|||
|
||||
surf->MipmapLevel = 0;
|
||||
surf->MultisampleResolve = EGL_MULTISAMPLE_RESOLVE_DEFAULT;
|
||||
surf->SwapBehavior = EGL_BUFFER_DESTROYED;
|
||||
surf->SwapBehavior = swapBehavior;
|
||||
|
||||
surf->HorizontalResolution = EGL_UNKNOWN;
|
||||
surf->VerticalResolution = EGL_UNKNOWN;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue