output: always use hardware cursors if available

This changes the `wlr_output_impl.set_cursor` function to take a
`wlr_texture` instead of a byte buffer. This simplifies the
DRM and Wayland backends since they were creating textures from
the byte buffer anyway.

With this commit, performance should be improved when moving the
cursor since outputs don't need to be re-rendered anymore.
This commit is contained in:
emersion 2018-05-01 21:38:04 +01:00
parent 509d38425c
commit 225d182765
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
6 changed files with 113 additions and 140 deletions

View file

@ -164,8 +164,16 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
goto error_registry;
}
static EGLint config_attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RED_SIZE, 1,
EGL_GREEN_SIZE, 1,
EGL_BLUE_SIZE, 1,
EGL_ALPHA_SIZE, 1,
EGL_NONE,
};
if (!wlr_egl_init(&backend->egl, EGL_PLATFORM_WAYLAND_EXT,
backend->remote_display, NULL, WL_SHM_FORMAT_ARGB8888)) {
backend->remote_display, config_attribs, WL_SHM_FORMAT_ARGB8888)) {
wlr_log(L_ERROR, "Could not initialize EGL");
goto error_egl;
}