Skip to content
Commits on Source (3)
......@@ -1022,10 +1022,20 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
#endif
uint32_t format;
if (drmmode->scrn->depth == 30)
switch (drmmode->scrn->depth) {
case 15:
format = GBM_FORMAT_ARGB1555;
break;
case 16:
format = GBM_FORMAT_RGB565;
break;
case 30:
format = GBM_FORMAT_ARGB2101010;
else
break;
default:
format = GBM_FORMAT_ARGB8888;
break;
}
#ifdef GBM_BO_WITH_MODIFIERS
num_modifiers = get_modifiers_set(drmmode->scrn, format, &modifiers,
......
......@@ -524,14 +524,8 @@ xwl_present_flips_stop(WindowPtr window)
}
void
xwl_present_unrealize_window(WindowPtr window)
xwl_present_unrealize_window(struct xwl_present_window *xwl_present_window)
{
struct xwl_present_window *xwl_present_window = xwl_present_window_priv(window);
if (!xwl_present_window ||
xorg_list_is_empty(&xwl_present_window->frame_callback_list))
return;
/* The pending frame callback may never be called, so drop it and shorten
* the frame timer interval.
*/
......
......@@ -67,7 +67,7 @@ struct xwl_present_event {
void xwl_present_frame_callback(struct xwl_present_window *xwl_present_window);
Bool xwl_present_init(ScreenPtr screen);
void xwl_present_cleanup(WindowPtr window);
void xwl_present_unrealize_window(WindowPtr window);
void xwl_present_unrealize_window(struct xwl_present_window *xwl_present_window);
#endif /* GLAMOR_HAS_GBM */
......
......@@ -607,8 +607,15 @@ xwl_unrealize_window(WindowPtr window)
wl_callback_destroy(xwl_window->frame_callback);
#ifdef GLAMOR_HAS_GBM
if (xwl_screen->present)
xwl_present_unrealize_window(window);
if (xwl_screen->present) {
struct xwl_present_window *xwl_present_window, *tmp;
xorg_list_for_each_entry_safe(xwl_present_window, tmp,
&xwl_window->frame_callback_list,
frame_callback_list) {
xwl_present_unrealize_window(xwl_present_window);
}
}
#endif
free(xwl_window);
......