mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
console/opengl: split up dpy_gl_cursor ops
Split the cursor callback into two, one for setting the dmabuf, one for setting the position. Also add hotspot information. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180220110433.20353-2-kraxel@redhat.com
This commit is contained in:
parent
afb92eb985
commit
6e1f2cb560
3 changed files with 34 additions and 14 deletions
|
@ -84,14 +84,11 @@ static void egl_scanout_dmabuf(DisplayChangeListener *dcl,
|
|||
}
|
||||
|
||||
static void egl_cursor_dmabuf(DisplayChangeListener *dcl,
|
||||
QemuDmaBuf *dmabuf,
|
||||
uint32_t pos_x, uint32_t pos_y)
|
||||
QemuDmaBuf *dmabuf, bool have_hot,
|
||||
uint32_t hot_x, uint32_t hot_y)
|
||||
{
|
||||
egl_dpy *edpy = container_of(dcl, egl_dpy, dcl);
|
||||
|
||||
edpy->pos_x = pos_x;
|
||||
edpy->pos_y = pos_y;
|
||||
|
||||
egl_dmabuf_import_texture(dmabuf);
|
||||
if (!dmabuf->texture) {
|
||||
return;
|
||||
|
@ -101,6 +98,15 @@ static void egl_cursor_dmabuf(DisplayChangeListener *dcl,
|
|||
dmabuf->texture, false);
|
||||
}
|
||||
|
||||
static void egl_cursor_position(DisplayChangeListener *dcl,
|
||||
uint32_t pos_x, uint32_t pos_y)
|
||||
{
|
||||
egl_dpy *edpy = container_of(dcl, egl_dpy, dcl);
|
||||
|
||||
edpy->pos_x = pos_x;
|
||||
edpy->pos_y = pos_y;
|
||||
}
|
||||
|
||||
static void egl_release_dmabuf(DisplayChangeListener *dcl,
|
||||
QemuDmaBuf *dmabuf)
|
||||
{
|
||||
|
@ -150,6 +156,7 @@ static const DisplayChangeListenerOps egl_ops = {
|
|||
.dpy_gl_scanout_texture = egl_scanout_texture,
|
||||
.dpy_gl_scanout_dmabuf = egl_scanout_dmabuf,
|
||||
.dpy_gl_cursor_dmabuf = egl_cursor_dmabuf,
|
||||
.dpy_gl_cursor_position = egl_cursor_position,
|
||||
.dpy_gl_release_dmabuf = egl_release_dmabuf,
|
||||
.dpy_gl_update = egl_scanout_flush,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue