[gtk/matthiasc/for-master: 19/29] gl renderer: Make minimal rounded rects more minimal




commit da514187f5215cfb140e4c76c9dba506d178412f
Author: Timm Bäder <mail baedert org>
Date:   Tue Nov 3 09:18:37 2020 +0100

    gl renderer: Make minimal rounded rects more minimal

 gsk/gl/gskglrenderer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 1d644da24c..cd93966d5c 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -306,10 +306,10 @@ color_matrix_modifies_alpha (GskRenderNode *node)
 static inline void
 gsk_rounded_rect_shrink_to_minimum (GskRoundedRect *self)
 {
-  self->bounds.size.width = ceilf (MAX (MAX (self->corner[0].width, self->corner[1].width),
-                                        MAX (self->corner[2].width, self->corner[3].width)) * 2);
-  self->bounds.size.height = ceilf (MAX (MAX (self->corner[0].height, self->corner[1].height),
-                                         MAX (self->corner[2].height, self->corner[3].height)) * 2);
+  self->bounds.size.width  = MAX (self->corner[0].width + self->corner[1].width,
+                                  self->corner[3].width + self->corner[2].width);
+  self->bounds.size.height = MAX (self->corner[0].height + self->corner[3].height,
+                                  self->corner[1].height + self->corner[2].height);
 }
 
 static inline gboolean G_GNUC_PURE


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