[gtk+/wip/gl-texture] gsk: Handle GL textures properly



commit fc7668c747711633aa43ce8c65c24eb853b55924
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 17 00:52:15 2018 -0500

    gsk: Handle GL textures properly
    
    These textures already have a GL texture in them,
    no need to create a new one.

 gsk/gl/gskgldriver.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gsk/gl/gskgldriver.c b/gsk/gl/gskgldriver.c
index 3d858e7..6d1c417 100644
--- a/gsk/gl/gskgldriver.c
+++ b/gsk/gl/gskgldriver.c
@@ -370,6 +370,9 @@ gsk_gl_driver_get_texture_for_texture (GskGLDriver *driver,
   Texture *t;
   cairo_surface_t *surface;
 
+  if (GDK_IS_GL_TEXTURE (texture))
+    return gdk_gl_texture_get_id (GDK_GL_TEXTURE (texture));
+
   t = gdk_texture_get_render_data (texture, driver);
 
   if (t)


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