gtk-gl-area.c (6779a3076f295fafe52d43049fa954426c1d594a) gtk-gl-area.c (fa6426805b124400cfb700b75e8fe4a89dd2ed7a)
1/*
2 * GTK UI -- glarea opengl code.
3 *
4 * Requires 3.16+ (GtkGLArea widget).
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */

--- 49 unchanged lines hidden (view full) ---

58 return;
59 }
60
61#ifdef CONFIG_GBM
62 if (dmabuf) {
63 if (!qemu_dmabuf_get_draw_submitted(dmabuf)) {
64 return;
65 } else {
1/*
2 * GTK UI -- glarea opengl code.
3 *
4 * Requires 3.16+ (GtkGLArea widget).
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */

--- 49 unchanged lines hidden (view full) ---

58 return;
59 }
60
61#ifdef CONFIG_GBM
62 if (dmabuf) {
63 if (!qemu_dmabuf_get_draw_submitted(dmabuf)) {
64 return;
65 } else {
66 dmabuf->draw_submitted = false;
66 qemu_dmabuf_set_draw_submitted(dmabuf, false);
67 }
68 }
69#endif
70
71 glBindFramebuffer(GL_READ_FRAMEBUFFER, vc->gfx.guest_fb.framebuffer);
72 /* GtkGLArea sets GL_DRAW_FRAMEBUFFER for us */
73
74 glViewport(0, 0, ww, wh);

--- 212 unchanged lines hidden (view full) ---

287void gd_gl_area_scanout_flush(DisplayChangeListener *dcl,
288 uint32_t x, uint32_t y, uint32_t w, uint32_t h)
289{
290 VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
291
292 if (vc->gfx.guest_fb.dmabuf &&
293 !qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
294 graphic_hw_gl_block(vc->gfx.dcl.con, true);
67 }
68 }
69#endif
70
71 glBindFramebuffer(GL_READ_FRAMEBUFFER, vc->gfx.guest_fb.framebuffer);
72 /* GtkGLArea sets GL_DRAW_FRAMEBUFFER for us */
73
74 glViewport(0, 0, ww, wh);

--- 212 unchanged lines hidden (view full) ---

287void gd_gl_area_scanout_flush(DisplayChangeListener *dcl,
288 uint32_t x, uint32_t y, uint32_t w, uint32_t h)
289{
290 VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
291
292 if (vc->gfx.guest_fb.dmabuf &&
293 !qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
294 graphic_hw_gl_block(vc->gfx.dcl.con, true);
295 vc->gfx.guest_fb.dmabuf->draw_submitted = true;
295 qemu_dmabuf_set_draw_submitted(vc->gfx.guest_fb.dmabuf, true);
296 gtk_gl_area_set_scanout_mode(vc, true);
297 }
298 gtk_gl_area_queue_render(GTK_GL_AREA(vc->gfx.drawing_area));
299}
300
301void gd_gl_area_scanout_dmabuf(DisplayChangeListener *dcl,
302 QemuDmaBuf *dmabuf)
303{

--- 41 unchanged lines hidden ---
296 gtk_gl_area_set_scanout_mode(vc, true);
297 }
298 gtk_gl_area_queue_render(GTK_GL_AREA(vc->gfx.drawing_area));
299}
300
301void gd_gl_area_scanout_dmabuf(DisplayChangeListener *dcl,
302 QemuDmaBuf *dmabuf)
303{

--- 41 unchanged lines hidden ---