[gtk+] gdk_cairo_draw_from_gl - fix drawing with alpha on window scale > 1



commit 4a4125bcfc252deecaab4547c891495b8e0ee5af
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Dec 15 21:54:11 2014 +0100

    gdk_cairo_draw_from_gl - fix drawing with alpha on window scale > 1
    
    The scissoring needs to take into account the window scale.

 gdk/gdkgl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c
index af47d8c..2c554bf 100644
--- a/gdk/gdkgl.c
+++ b/gdk/gdkgl.c
@@ -527,8 +527,8 @@ gdk_cairo_draw_from_gl (cairo_t              *cr,
 
       cairo_region_get_extents (clip_region, &clip_rect);
 
-      glScissor (clip_rect.x, FLIP_Y (clip_rect.y + clip_rect.height),
-                 clip_rect.width, clip_rect.height);
+      glScissor (clip_rect.x * window_scale, FLIP_Y ((clip_rect.y + clip_rect.height) * window_scale),
+                 clip_rect.width * window_scale, clip_rect.height * window_scale);
 
       n_quads = 0;
       n_rects = cairo_region_num_rectangles (clip_region);


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