From 8e0ed691e3788bd718259b8f88130edaa1aae407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 21 Aug 2017 12:40:41 +0200 Subject: [PATCH] widget: Remove unused draw_internal prototype gtk_widget_draw_internal is now only used inside gtkwidget.c, so remove the prototype from gtkwidgetprivate.h. And since all incovacations call it with clip_to_size=TRUE, remove that parameter. --- gtk/gtkwidget.c | 24 ++++++++++-------------- gtk/gtkwidgetprivate.h | 3 --- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index dbfaa8cb12..96b9c98271 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -6284,23 +6284,19 @@ get_render_mode (GtkWidgetClass *klass) return RENDER_SNAPSHOT; } -void +static void gtk_widget_draw_internal (GtkWidget *widget, - cairo_t *cr, - gboolean clip_to_size) + cairo_t *cr) { if (!_gtk_widget_is_drawable (widget)) return; - if (clip_to_size) - { - cairo_rectangle (cr, - widget->priv->clip.x - widget->priv->allocation.x, - widget->priv->clip.y - widget->priv->allocation.y, - widget->priv->clip.width, - widget->priv->clip.height); - cairo_clip (cr); - } + cairo_rectangle (cr, + widget->priv->clip.x - widget->priv->allocation.x, + widget->priv->clip.y - widget->priv->allocation.y, + widget->priv->clip.width, + widget->priv->clip.height); + cairo_clip (cr); if (gdk_cairo_get_clip_rectangle (cr, NULL)) { @@ -6457,7 +6453,7 @@ gtk_widget_draw (GtkWidget *widget, cairo_save (cr); - gtk_widget_draw_internal (widget, cr, TRUE); + gtk_widget_draw_internal (widget, cr); cairo_restore (cr); } @@ -15159,7 +15155,7 @@ gtk_widget_snapshot (GtkWidget *widget, cr = gtk_snapshot_append_cairo (snapshot, &bounds, "Fallback<%s>", G_OBJECT_TYPE_NAME (widget)); - gtk_widget_draw_internal (widget, cr, TRUE); + gtk_widget_draw_internal (widget, cr); cairo_destroy (cr); } else diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h index 5a3472863a..4c76ca1efa 100644 --- a/gtk/gtkwidgetprivate.h +++ b/gtk/gtkwidgetprivate.h @@ -179,9 +179,6 @@ gboolean _gtk_widget_get_alloc_needed (GtkWidget *widget); gboolean gtk_widget_needs_allocate (GtkWidget *widget); void gtk_widget_ensure_resize (GtkWidget *widget); void gtk_widget_ensure_allocate (GtkWidget *widget); -void gtk_widget_draw_internal (GtkWidget *widget, - cairo_t *cr, - gboolean do_clip); void _gtk_widget_scale_changed (GtkWidget *widget);