[gtk+/wip/baedert/drawing: 354/359] widget: Remove queue_draw_region vfunc



commit 1d1b02048393b0392a4206145572097adbf44948
Author: Timm Bäder <mail baedert org>
Date:   Wed Jul 12 07:48:15 2017 +0200

    widget: Remove queue_draw_region vfunc
    
    Unused

 gtk/gtkwidget.c |   20 +++-----------------
 gtk/gtkwidget.h |    4 ----
 2 files changed, 3 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b966dc5..f2e58d7 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -690,8 +690,6 @@ static void             gtk_widget_real_measure                 (GtkWidget
                                                                  int              *natural_baseline);
 static void             gtk_widget_real_state_flags_changed     (GtkWidget        *widget,
                                                                  GtkStateFlags     old_state);
-static void             gtk_widget_real_queue_draw_region       (GtkWidget         *widget,
-                                                                const cairo_region_t *region);
 static AtkObject*      gtk_widget_real_get_accessible          (GtkWidget        *widget);
 static void            gtk_widget_accessible_interface_init    (AtkImplementorIface *iface);
 static AtkObject*      gtk_widget_ref_accessible               (AtkImplementor *implementor);
@@ -1077,8 +1075,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
   klass->priv->accessible_role = ATK_ROLE_INVALID;
   klass->get_accessible = gtk_widget_real_get_accessible;
 
-  klass->queue_draw_region = gtk_widget_real_queue_draw_region;
-
   klass->pick = gtk_widget_real_pick;
 
   widget_props[PROP_NAME] =
@@ -4914,18 +4910,6 @@ gtk_widget_unrealize (GtkWidget *widget)
   g_object_unref (widget);
 }
 
-/*****************************************
- * Draw queueing.
- *****************************************/
-static void
-gtk_widget_real_queue_draw_region (GtkWidget            *widget,
-                                  const cairo_region_t *region)
-{
-  g_assert (_gtk_widget_get_has_window (widget));
-  gtk_debug_updates_add (widget, region);
-  gdk_window_invalidate_region (_gtk_widget_get_window (widget), region, TRUE);
-}
-
 /*
  * Returns the values you're supposed to pass to gdk_window_move_resize
  * for a windowed widget.
@@ -5354,7 +5338,9 @@ gtk_widget_queue_draw_region (GtkWidget            *widget,
   cairo_region_translate (region2, x, y);
 
 invalidate:
-  WIDGET_CLASS (widget)->queue_draw_region (parent, region2);
+  gtk_debug_updates_add (widget, region);
+  gdk_window_invalidate_region (_gtk_widget_get_window (widget), region2, TRUE);
+
   cairo_region_destroy (region2);
 }
 
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index c677aa5..bfaf04a 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -276,8 +276,6 @@ struct _GtkWidget
  * @style_updated: Signal emitted when the GtkStyleContext of a widget
  *   is changed.
  * @touch_event:
- * @queue_draw_region: Invalidates the area of widget defined by
- *   region.
  * @snapshot: Signal emitted when a widget is supposed to create a snapshot
  *   of itself.
  */
@@ -471,8 +469,6 @@ struct _GtkWidgetClass
   gboolean     (* touch_event)            (GtkWidget     *widget,
                                            GdkEventTouch *event);
 
-  void         (* queue_draw_region)           (GtkWidget            *widget,
-                                               const cairo_region_t *region);
   void         (* snapshot)                    (GtkWidget            *widget,
                                                 GtkSnapshot          *snapshot);
 


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