[gtk/wip/baedert/for-master: 17/29] gl renderer: Avoid some work when rendering border nodes



commit 851d4d2fd10ef41bf9b4eed22444f30075a5de80
Author: Timm Bäder <mail baedert org>
Date:   Fri Jan 24 11:29:43 2020 +0100

    gl renderer: Avoid some work when rendering border nodes

 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 99df488159..bedf872c50 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -744,10 +744,6 @@ render_border_node (GskGLRenderer   *self,
                     GskRenderNode   *node,
                     RenderOpBuilder *builder)
 {
-  const float min_x = builder->dx + node->bounds.origin.x;
-  const float min_y = builder->dy + node->bounds.origin.y;
-  const float max_x = min_x + node->bounds.size.width;
-  const float max_y = min_y + node->bounds.size.height;
   const GdkRGBA *colors = gsk_border_node_peek_colors (node);
   const GskRoundedRect *rounded_outline = gsk_border_node_peek_outline (node);
   const float *widths = gsk_border_node_peek_widths (node);
@@ -824,6 +820,10 @@ render_border_node (GskGLRenderer   *self,
     sizes[3].h = 0;
 
   {
+    const float min_x = builder->dx + node->bounds.origin.x;
+    const float min_y = builder->dy + node->bounds.origin.y;
+    const float max_x = min_x + node->bounds.size.width;
+    const float max_y = min_y + node->bounds.size.height;
     const GskQuadVertex side_data[4][6] = {
       /* Top */
       {


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