mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
cogl/onscreen/egl: Move pending_resize_notify to Xlib platform
It's only used in the Xlib onscreen, so move it there. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1514>
This commit is contained in:
parent
b24d5ce1dd
commit
760a07cc24
@ -169,8 +169,6 @@ typedef struct _CoglOnscreenEGL
|
|||||||
{
|
{
|
||||||
EGLSurface egl_surface;
|
EGLSurface egl_surface;
|
||||||
|
|
||||||
gboolean pending_resize_notify;
|
|
||||||
|
|
||||||
/* Platform specific data */
|
/* Platform specific data */
|
||||||
void *platform;
|
void *platform;
|
||||||
} CoglOnscreenEGL;
|
} CoglOnscreenEGL;
|
||||||
|
@ -60,6 +60,8 @@ typedef struct _CoglDisplayXlib
|
|||||||
typedef struct _CoglOnscreenXlib
|
typedef struct _CoglOnscreenXlib
|
||||||
{
|
{
|
||||||
Window xwin;
|
Window xwin;
|
||||||
|
|
||||||
|
gboolean pending_resize_notify;
|
||||||
} CoglOnscreenXlib;
|
} CoglOnscreenXlib;
|
||||||
|
|
||||||
#ifdef EGL_KHR_image_pixmap
|
#ifdef EGL_KHR_image_pixmap
|
||||||
@ -103,11 +105,12 @@ flush_pending_resize_notifications_cb (void *data,
|
|||||||
{
|
{
|
||||||
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
|
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
|
||||||
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
|
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
|
||||||
|
CoglOnscreenXlib *xlib_onscreen = egl_onscreen->platform;
|
||||||
|
|
||||||
if (egl_onscreen->pending_resize_notify)
|
if (xlib_onscreen->pending_resize_notify)
|
||||||
{
|
{
|
||||||
_cogl_onscreen_notify_resize (onscreen);
|
_cogl_onscreen_notify_resize (onscreen);
|
||||||
egl_onscreen->pending_resize_notify = FALSE;
|
xlib_onscreen->pending_resize_notify = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -140,6 +143,7 @@ notify_resize (CoglContext *context,
|
|||||||
CoglOnscreen *onscreen = find_onscreen_for_xid (context, drawable);
|
CoglOnscreen *onscreen = find_onscreen_for_xid (context, drawable);
|
||||||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||||
CoglOnscreenEGL *egl_onscreen;
|
CoglOnscreenEGL *egl_onscreen;
|
||||||
|
CoglOnscreenXlib *xlib_onscreen;
|
||||||
|
|
||||||
if (!onscreen)
|
if (!onscreen)
|
||||||
return;
|
return;
|
||||||
@ -160,7 +164,8 @@ notify_resize (CoglContext *context,
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
egl_onscreen->pending_resize_notify = TRUE;
|
xlib_onscreen = egl_onscreen->platform;
|
||||||
|
xlib_onscreen->pending_resize_notify = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglFilterReturn
|
static CoglFilterReturn
|
||||||
|
Loading…
Reference in New Issue
Block a user