[gtk+/wip/otte/rendernode: 14/30] gtk: Remove unused argument from function



commit bc0d6dfe46ee4cd999eefd2f6116236ce86b566e
Author: Benjamin Otte <otte redhat com>
Date:   Sun Dec 18 17:52:47 2016 +0100

    gtk: Remove unused argument from function

 gtk/gtkcssgadget.c           |    1 -
 gtk/gtkrender.c              |    4 +---
 gtk/gtkrenderborder.c        |   29 +++++------------------------
 gtk/gtkrenderborderprivate.h |    1 -
 4 files changed, 6 insertions(+), 29 deletions(-)
---
diff --git a/gtk/gtkcssgadget.c b/gtk/gtkcssgadget.c
index ce6e8d7..063d4f3 100644
--- a/gtk/gtkcssgadget.c
+++ b/gtk/gtkcssgadget.c
@@ -902,7 +902,6 @@ gtk_css_gadget_draw (GtkCssGadget *gadget,
                                y + margin.top,
                                width - margin.left - margin.right,
                                height - margin.top - margin.bottom,
-                               0,
                                gtk_css_node_get_junction_sides (priv->node));
 
   contents_x = x + margin.left + border.left + padding.left;
diff --git a/gtk/gtkrender.c b/gtk/gtkrender.c
index a0c086b..1c279f6 100644
--- a/gtk/gtkrender.c
+++ b/gtk/gtkrender.c
@@ -332,7 +332,6 @@ gtk_render_frame (GtkStyleContext *context,
   gtk_css_style_render_border (gtk_style_context_lookup_style (context),
                                cr,
                                x, y, width, height,
-                               0,
                                gtk_style_context_get_junction_sides (context));
 }
 
@@ -595,7 +594,6 @@ gtk_do_render_slider (GtkStyleContext *context,
   gtk_css_style_render_border (style,
                                cr,
                                x, y, width, height,
-                               0,
                                junction);
 }
 
@@ -732,7 +730,7 @@ gtk_css_style_render_frame_gap (GtkCssStyle     *style,
 
   gtk_css_style_render_border (style, cr,
                                x, y, width, height,
-                               0, junction);
+                               junction);
 
   cairo_restore (cr);
 }
diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c
index 9696c6c..5a17516 100644
--- a/gtk/gtkrenderborder.c
+++ b/gtk/gtkrenderborder.c
@@ -338,20 +338,6 @@ gtk_border_image_render (GtkBorderImage   *image,
 }
 
 static void
-hide_border_sides (double         border[4],
-                   GtkBorderStyle border_style[4],
-                   guint          hidden_side)
-{
-  guint i;
-
-  for (i = 0; i < 4; i++)
-    {
-      if (hidden_side & (1 << i))
-        border[i] = 0;
-    }
-}
-
-static void
 render_frame_fill (cairo_t        *cr,
                    GskRoundedRect *border_box,
                    const double    border_width[4],
@@ -569,10 +555,10 @@ static void
 render_border (cairo_t        *cr,
                GskRoundedRect *border_box,
                const double    border_width[4],
-               guint           hidden_side,
                GdkRGBA         colors[4],
                GtkBorderStyle  border_style[4])
 {
+  guint hidden_side = 0;
   guint i, j;
 
   cairo_save (cr);
@@ -712,7 +698,6 @@ gtk_css_style_render_border (GtkCssStyle      *style,
                              gdouble           y,
                              gdouble           width,
                              gdouble           height,
-                             guint             hidden_side,
                              GtkJunctionSides  junction)
 {
   GtkBorderImage border_image;
@@ -745,8 +730,6 @@ gtk_css_style_render_border (GtkCssStyle      *style,
       border_style[2] = _gtk_css_border_style_value_get (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE));
       border_style[3] = _gtk_css_border_style_value_get (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_LEFT_STYLE));
 
-      hide_border_sides (border_width, border_style, hidden_side);
-
       colors[0] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_TOP_COLOR));
       colors[1] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_RIGHT_COLOR));
       colors[2] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR));
@@ -755,7 +738,7 @@ gtk_css_style_render_border (GtkCssStyle      *style,
       _gtk_rounded_box_init_rect (&border_box, x, y, width, height);
       _gtk_rounded_box_apply_border_radius_for_style (&border_box, style, junction);
 
-      render_border (cr, &border_box, border_width, hidden_side, colors, border_style);
+      render_border (cr, &border_box, border_width, colors, border_style);
     }
 }
 
@@ -808,8 +791,6 @@ gtk_css_style_snapshot_border (GtkCssStyle      *style,
       border_style[2] = _gtk_css_border_style_value_get (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE));
       border_style[3] = _gtk_css_border_style_value_get (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_LEFT_STYLE));
 
-      hide_border_sides (border_width, border_style, 0);
-
       colors[0] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_TOP_COLOR));
       colors[1] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_RIGHT_COLOR));
       colors[2] = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR));
@@ -818,7 +799,7 @@ gtk_css_style_snapshot_border (GtkCssStyle      *style,
       _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
       _gtk_rounded_box_apply_border_radius_for_style (&border_box, style, junction);
 
-      render_border (cr, &border_box, border_width, 0, colors, border_style);
+      render_border (cr, &border_box, border_width, colors, border_style);
 
       cairo_destroy (cr);
     }
@@ -917,7 +898,7 @@ gtk_css_style_render_outline (GtkCssStyle *style,
       _gtk_rounded_box_init_rect (&border_box, rect.x, rect.y, rect.width, rect.height);
       _gtk_rounded_box_apply_outline_radius_for_style (&border_box, style, GTK_JUNCTION_NONE);
 
-      render_border (cr, &border_box, border_width, 0, colors, border_style);
+      render_border (cr, &border_box, border_width, colors, border_style);
     }
 }
 
@@ -953,7 +934,7 @@ gtk_css_style_snapshot_outline (GtkCssStyle *style,
                                            &GRAPHENE_RECT_INIT (rect.x, rect.y, rect.width, rect.height),
                                            "Outline");
 
-      render_border (cr, &border_box, border_width, 0, colors, border_style);
+      render_border (cr, &border_box, border_width, colors, border_style);
 
       cairo_destroy (cr);
     }
diff --git a/gtk/gtkrenderborderprivate.h b/gtk/gtkrenderborderprivate.h
index 214560b..f89cdcb 100644
--- a/gtk/gtkrenderborderprivate.h
+++ b/gtk/gtkrenderborderprivate.h
@@ -36,7 +36,6 @@ void            gtk_css_style_render_border             (GtkCssStyle
                                                          gdouble                 y,
                                                          gdouble                 width,
                                                          gdouble                 height,
-                                                         guint                   hidden_side,
                                                          GtkJunctionSides        junction);
 gboolean        gtk_css_style_render_border_get_clip    (GtkCssStyle            *style,
                                                          gdouble                 x,


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