[gtk+/wip/ebassi/gsk-renderer: 117/135] gdk_cairo_surface_upload_to_gl: Don't apply device scale



commit f78330139fbbb6cbff03917edba63a0528ba6612
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Aug 16 11:53:49 2016 +0200

    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 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c
index 58674c7..3535f3a 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);


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