[gtk+] gdk: Fix a variable
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Fix a variable
- Date: Thu, 17 Nov 2016 22:39:20 +0000 (UTC)
commit c162b87ebd50e82907006c13ae64d7c7828d0fa4
Author: Benjamin Otte <otte redhat com>
Date: Thu Nov 17 22:03:04 2016 +0100
gdk: Fix a variable
The passed in surface is the current_paint surface, so I guess this
usage hasn't been noticed.
gdk/gdkgl.c | 6 ++----
gdk/x11/gdkglcontext-x11.c | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c
index 2005cec..b62fc2d 100644
--- a/gdk/gdkgl.c
+++ b/gdk/gdkgl.c
@@ -741,10 +741,8 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
gdk_window_get_unscaled_size (window, NULL, &unscaled_window_height);
sx = sy = 1;
- cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
-
- cairo_surface_get_device_offset (surface,
- &device_x_offset, &device_y_offset);
+ cairo_surface_get_device_scale (surface, &sx, &sy);
+ cairo_surface_get_device_offset (surface, &device_x_offset, &device_y_offset);
glGenTextures (1, &texture_id);
if (use_texture_rectangle)
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index 5f16baf..77103b5 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -463,7 +463,7 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
gdk_window_get_unscaled_size (window, NULL, &unscaled_window_height);
sx = sy = 1;
- cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
+ cairo_surface_get_device_scale (surface, &sx, &sy);
cairo_surface_get_device_offset (surface, &device_x_offset, &device_y_offset);
/* Ensure all the X stuff are synced before we read it back via texture-from-pixmap */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]