[gtk/wip/baedert/for-master] gl texture: Flip on download



commit 6139a0d18807cd02e5b90b50f9ca0fa655ae14f3
Author: Timm Bäder <mail baedert org>
Date:   Mon Sep 28 18:40:35 2020 +0200

    gl texture: Flip on download

 gdk/gdkgltexture.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gdk/gdkgltexture.c b/gdk/gdkgltexture.c
index 5688513528..bd1426e119 100644
--- a/gdk/gdkgltexture.c
+++ b/gdk/gdkgltexture.c
@@ -94,7 +94,10 @@ gdk_gl_texture_download (GdkTexture         *texture,
       GdkSurface *gl_surface;
 
       gl_surface = gdk_gl_context_get_surface (self->context);
-      gdk_cairo_draw_from_gl (cr, gl_surface, self->id, GL_TEXTURE, 1, 
+
+      cairo_scale (cr, 1, -1);
+      cairo_translate (cr, 0, - area->height);
+      gdk_cairo_draw_from_gl (cr, gl_surface, self->id, GL_TEXTURE, 1,
                               area->x, area->y,
                               area->width, area->height);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]