static void egl_cursor_dmabuf(DisplayChangeListener *dcl, QemuDmaBuf *dmabuf, bool have_hot, uint32_t hot_x, uint32_t hot_y) { egl_dpy *edpy = container_of(dcl, egl_dpy, dcl); if (dmabuf) { egl_dmabuf_import_texture(dmabuf); if (!dmabuf->texture) { return; } egl_fb_setup_for_tex(&edpy->cursor_fb, dmabuf->width, dmabuf->height, dmabuf->texture, false); } else { egl_fb_destroy(&edpy->cursor_fb); } }
void gd_egl_cursor_dmabuf(DisplayChangeListener *dcl, QemuDmaBuf *dmabuf, bool have_hot, uint32_t hot_x, uint32_t hot_y) { #ifdef CONFIG_OPENGL_DMABUF VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl); if (dmabuf) { egl_dmabuf_import_texture(dmabuf); if (!dmabuf->texture) { return; } egl_fb_setup_for_tex(&vc->gfx.cursor_fb, dmabuf->width, dmabuf->height, dmabuf->texture, false); } else { egl_fb_destroy(&vc->gfx.cursor_fb); } #endif }
static void egl_scanout_texture(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h) { egl_dpy *edpy = container_of(dcl, egl_dpy, dcl); edpy->y_0_top = backing_y_0_top; /* source framebuffer */ egl_fb_setup_for_tex(&edpy->guest_fb, backing_width, backing_height, backing_id, false); /* dest framebuffer */ if (edpy->blit_fb.width != backing_width || edpy->blit_fb.height != backing_height) { egl_fb_destroy(&edpy->blit_fb); egl_fb_setup_new_tex(&edpy->blit_fb, backing_width, backing_height); } }