From d2329237af197429492ec27d22a4ba4f121dbc10 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 9 Sep 2019 09:39:11 +0200 Subject: ui/egl: fix framebuffer reads Fix egl_fb_read() to use the (destination) surface size instead of the (source) framebuffer source for glReadPixels. Pass the DisplaySurface instead of the pixeldata pointer to egl_fb_read() to make this possible. With that in place framebuffer reads work fine even if the surface and framebuffer sizes don't match, so we can remove the guest-triggerable asserts in egl_scanout_flush(). Buglink: https://bugzilla.redhat.com//show_bug.cgi?id=1749659 Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20190909073911.24787-1-kraxel@redhat.com --- include/ui/egl-helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index dad19e9873..94a4b3e6f3 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -25,7 +25,7 @@ void egl_fb_setup_for_tex(egl_fb *fb, int width, int height, GLuint texture, bool delete); void egl_fb_setup_new_tex(egl_fb *fb, int width, int height); void egl_fb_blit(egl_fb *dst, egl_fb *src, bool flip); -void egl_fb_read(void *dst, egl_fb *src); +void egl_fb_read(DisplaySurface *dst, egl_fb *src); void egl_texture_blit(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip); void egl_texture_blend(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip, -- cgit v1.2.3-55-g7522