[gtk+] gsk: Apply scale factor for fallback rendering



commit ca7c148687edf0e2d344b39bc8c4b7259446de60
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 28 14:38:49 2017 -0400

    gsk: Apply scale factor for fallback rendering
    
    This fixes blurry text and icons whenever we apply shadows
    in a hidpi window. Shadow nodes are the last ones that we
    still use fallback for, and this was causing us to render
    the text blurry.

 gsk/gskvulkanrenderpass.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskvulkanrenderpass.c b/gsk/gskvulkanrenderpass.c
index 37cdf25..d902a90 100644
--- a/gsk/gskvulkanrenderpass.c
+++ b/gsk/gskvulkanrenderpass.c
@@ -848,8 +848,9 @@ gsk_vulkan_render_pass_upload_fallback (GskVulkanRenderPass  *self,
 
   /* XXX: We could intersect bounds with clip bounds here */
   surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
-                                        ceil (node->bounds.size.width),
-                                        ceil (node->bounds.size.height));
+                                        ceil (node->bounds.size.width * self->scale_factor),
+                                        ceil (node->bounds.size.height * self->scale_factor));
+  cairo_surface_set_device_scale (surface, self->scale_factor, self->scale_factor);
   cr = cairo_create (surface);
   cairo_translate (cr, -node->bounds.origin.x, -node->bounds.origin.y);
 


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