[gtk/wip/baedert/for-master: 12/19] gl renderer: Use scale_x/y when rendering clipped nodes




commit 15994db74dba3722ce8e1d4541f91412222770c3
Author: Timm Bäder <mail baedert org>
Date:   Sat Sep 19 18:16:04 2020 +0200

    gl renderer: Use scale_x/y when rendering clipped nodes

 gsk/gl/gskglrenderer.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index bb5b16688a..e207c4a0f7 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1332,17 +1332,18 @@ render_clipped_child (GskGLRenderer         *self,
   else
     {
       /* well fuck */
-      const float scale = ops_get_scale (builder);
+      const float scale_x = builder->scale_x;
+      const float scale_y = builder->scale_y;
       gboolean is_offscreen;
       TextureRegion region;
       GskRoundedRect scaled_clip;
 
       memset (&scaled_clip, 0, sizeof (GskRoundedRect));
 
-      scaled_clip.bounds.origin.x = clip->origin.x * scale;
-      scaled_clip.bounds.origin.y = clip->origin.y * scale;
-      scaled_clip.bounds.size.width = clip->size.width * scale;
-      scaled_clip.bounds.size.height = clip->size.height * scale;
+      scaled_clip.bounds.origin.x = clip->origin.x * scale_x;
+      scaled_clip.bounds.origin.y = clip->origin.y * scale_y;
+      scaled_clip.bounds.size.width = clip->size.width * scale_x;
+      scaled_clip.bounds.size.height = clip->size.height * scale_y;
 
       ops_push_clip (builder, &scaled_clip);
       if (!add_offscreen_ops (self, builder, &child->bounds,


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