Loading include/ui/sdl2.h +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ int sdl2_gl_make_context_current(DisplayChangeListener *dcl, QEMUGLContext ctx); QEMUGLContext sdl2_gl_get_current_context(DisplayChangeListener *dcl); void sdl2_gl_scanout_disable(DisplayChangeListener *dcl); void sdl2_gl_scanout_texture(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, Loading ui/sdl2-gl.c +11 −5 Original line number Diff line number Diff line Loading @@ -184,6 +184,17 @@ QEMUGLContext sdl2_gl_get_current_context(DisplayChangeListener *dcl) return (QEMUGLContext)sdlctx; } void sdl2_gl_scanout_disable(DisplayChangeListener *dcl) { struct sdl2_console *scon = container_of(dcl, struct sdl2_console, dcl); assert(scon->opengl); scon->w = 0; scon->h = 0; scon->tex_id = 0; sdl2_set_scanout_mode(scon, false); } void sdl2_gl_scanout_texture(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, Loading @@ -204,11 +215,6 @@ void sdl2_gl_scanout_texture(DisplayChangeListener *dcl, SDL_GL_MakeCurrent(scon->real_window, scon->winctx); if (scon->tex_id == 0 || scon->w == 0 || scon->h == 0) { sdl2_set_scanout_mode(scon, false); return; } sdl2_set_scanout_mode(scon, true); if (!scon->fbo_id) { glGenFramebuffers(1, &scon->fbo_id); Loading ui/sdl2.c +1 −0 Original line number Diff line number Diff line Loading @@ -733,6 +733,7 @@ static const DisplayChangeListenerOps dcl_gl_ops = { .dpy_gl_ctx_destroy = sdl2_gl_destroy_context, .dpy_gl_ctx_make_current = sdl2_gl_make_context_current, .dpy_gl_ctx_get_current = sdl2_gl_get_current_context, .dpy_gl_scanout_disable = sdl2_gl_scanout_disable, .dpy_gl_scanout_texture = sdl2_gl_scanout_texture, .dpy_gl_update = sdl2_gl_scanout_flush, }; Loading Loading
include/ui/sdl2.h +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ int sdl2_gl_make_context_current(DisplayChangeListener *dcl, QEMUGLContext ctx); QEMUGLContext sdl2_gl_get_current_context(DisplayChangeListener *dcl); void sdl2_gl_scanout_disable(DisplayChangeListener *dcl); void sdl2_gl_scanout_texture(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, Loading
ui/sdl2-gl.c +11 −5 Original line number Diff line number Diff line Loading @@ -184,6 +184,17 @@ QEMUGLContext sdl2_gl_get_current_context(DisplayChangeListener *dcl) return (QEMUGLContext)sdlctx; } void sdl2_gl_scanout_disable(DisplayChangeListener *dcl) { struct sdl2_console *scon = container_of(dcl, struct sdl2_console, dcl); assert(scon->opengl); scon->w = 0; scon->h = 0; scon->tex_id = 0; sdl2_set_scanout_mode(scon, false); } void sdl2_gl_scanout_texture(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, Loading @@ -204,11 +215,6 @@ void sdl2_gl_scanout_texture(DisplayChangeListener *dcl, SDL_GL_MakeCurrent(scon->real_window, scon->winctx); if (scon->tex_id == 0 || scon->w == 0 || scon->h == 0) { sdl2_set_scanout_mode(scon, false); return; } sdl2_set_scanout_mode(scon, true); if (!scon->fbo_id) { glGenFramebuffers(1, &scon->fbo_id); Loading
ui/sdl2.c +1 −0 Original line number Diff line number Diff line Loading @@ -733,6 +733,7 @@ static const DisplayChangeListenerOps dcl_gl_ops = { .dpy_gl_ctx_destroy = sdl2_gl_destroy_context, .dpy_gl_ctx_make_current = sdl2_gl_make_context_current, .dpy_gl_ctx_get_current = sdl2_gl_get_current_context, .dpy_gl_scanout_disable = sdl2_gl_scanout_disable, .dpy_gl_scanout_texture = sdl2_gl_scanout_texture, .dpy_gl_update = sdl2_gl_scanout_flush, }; Loading