window: make display_create_surface() shm-only
Nothing uses it to create EGL-surfaces outside of window.c. This makes refactoring the EGL-based code easier, since we do not need to support EGL-based Cairo surfaces without an associated struct window. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
32127ca86d
commit
768117f90b
+9
-11
@@ -636,13 +636,8 @@ display_create_surface(struct display *display,
|
|||||||
{
|
{
|
||||||
if (check_size(rectangle) < 0)
|
if (check_size(rectangle) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
#ifdef HAVE_CAIRO_EGL
|
|
||||||
if (display->dpy && !(flags & SURFACE_SHM))
|
assert(flags & SURFACE_SHM);
|
||||||
return display_create_egl_window_surface(display,
|
|
||||||
surface,
|
|
||||||
flags,
|
|
||||||
rectangle);
|
|
||||||
#endif
|
|
||||||
return display_create_shm_surface(display, rectangle, flags, NULL);
|
return display_create_shm_surface(display, rectangle, flags, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -940,10 +935,13 @@ window_create_surface(struct window *window)
|
|||||||
window_resize_cairo_window_surface(window);
|
window_resize_cairo_window_surface(window);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
surface = display_create_surface(window->display,
|
if (window->display->dpy) {
|
||||||
window->surface,
|
surface = display_create_egl_window_surface(
|
||||||
&window->allocation, flags);
|
window->display, window->surface,
|
||||||
break;
|
flags, &window->allocation);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* fall through */
|
||||||
#endif
|
#endif
|
||||||
case WINDOW_BUFFER_TYPE_SHM:
|
case WINDOW_BUFFER_TYPE_SHM:
|
||||||
surface = display_create_shm_surface(window->display,
|
surface = display_create_shm_surface(window->display,
|
||||||
|
|||||||
Reference in New Issue
Block a user