From f78330139fbbb6cbff03917edba63a0528ba6612 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 16 Aug 2016 11:53:49 +0200 Subject: [PATCH] gdk_cairo_surface_upload_to_gl: Don't apply device scale The arguments to this function is the texture width/height, and these are already scaled. --- gdk/gdkgl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c index 58674c77c8..3535f3a04b 100644 --- a/gdk/gdkgl.c +++ b/gdk/gdkgl.c @@ -837,7 +837,6 @@ gdk_cairo_surface_upload_to_gl (cairo_surface_t *surface, { cairo_rectangle_int_t rect; cairo_surface_t *tmp; - double sx, sy; double device_x_offset, device_y_offset; g_return_if_fail (surface != NULL); @@ -848,14 +847,12 @@ gdk_cairo_surface_upload_to_gl (cairo_surface_t *surface, cairo_surface_flush (surface); - sx = sy = 1; - cairo_surface_get_device_scale (surface, &sx, &sy); cairo_surface_get_device_offset (surface, &device_x_offset, &device_y_offset); rect.x = (int) device_x_offset; rect.y = (int) device_y_offset; - rect.width = width * sx; - rect.height = height * sx; + rect.width = width; + rect.height = height; tmp = cairo_surface_map_to_image (surface, &rect); gdk_gl_context_upload_texture (context, tmp, rect.width, rect.height, target);