[gtk+] GdkGLContextX11: Use passed in context, not get_current()



commit 8c6395d8a17454b34b3162b38bcfb0f3cd9fff89
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Nov 6 09:10:34 2014 +0100

    GdkGLContextX11: Use passed in context, not get_current()

 gdk/x11/gdkglcontext-x11.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index 7b86a72..87724d7 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -380,11 +380,10 @@ glx_pixmap_get (cairo_surface_t *surface)
 }
 
 static gboolean
-gdk_x11_gl_context_texture_from_surface (GdkGLContext *context,
+gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
                                         cairo_surface_t *surface,
                                         cairo_region_t *region)
 {
-  GdkGLContext *current;
   GdkGLXPixmap *glx_pixmap;
   double device_x_offset, device_y_offset;
   cairo_rectangle_int_t rect;
@@ -405,11 +404,9 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *context,
   if (glx_pixmap == NULL)
     return FALSE;
 
-  current = gdk_gl_context_get_current ();
+  use_texture_rectangle = gdk_gl_context_use_texture_rectangle (paint_context);
 
-  use_texture_rectangle = gdk_gl_context_use_texture_rectangle (current);
-
-  window = gdk_gl_context_get_window (current)->impl_window;
+  window = gdk_gl_context_get_window (paint_context)->impl_window;
   window_scale = gdk_window_get_scale_factor (window);
   window_height = gdk_window_get_height (window);
 


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