Require the callback, drop the fallback path.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20210204105232.834642-8-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
uint32_t backing_height,
uint32_t x, uint32_t y,
uint32_t w, uint32_t h);
+void gd_gl_area_scanout_disable(DisplayChangeListener *dcl);
void gd_gl_area_scanout_flush(DisplayChangeListener *dcl,
uint32_t x, uint32_t y, uint32_t w, uint32_t h);
void gtk_gl_area_init(void);
void dpy_gl_scanout_disable(QemuConsole *con)
{
assert(con->gl);
- if (con->gl->ops->dpy_gl_scanout_disable) {
- con->gl->ops->dpy_gl_scanout_disable(con->gl);
- } else {
- con->gl->ops->dpy_gl_scanout_texture(con->gl, 0, false, 0, 0,
- 0, 0, 0, 0);
- }
+ con->gl->ops->dpy_gl_scanout_disable(con->gl);
}
void dpy_gl_scanout_texture(QemuConsole *con,
backing_id, false);
}
+void gd_gl_area_scanout_disable(DisplayChangeListener *dcl)
+{
+ VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
+
+ gtk_gl_area_set_scanout_mode(vc, false);
+}
+
void gd_gl_area_scanout_flush(DisplayChangeListener *dcl,
uint32_t x, uint32_t y, uint32_t w, uint32_t h)
{
.dpy_gl_ctx_destroy = gd_gl_area_destroy_context,
.dpy_gl_ctx_make_current = gd_gl_area_make_current,
.dpy_gl_scanout_texture = gd_gl_area_scanout_texture,
+ .dpy_gl_scanout_disable = gd_gl_area_scanout_disable,
.dpy_gl_update = gd_gl_area_scanout_flush,
};