[gtk+] viewport: Call map/unmap functions on pixel cache
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] viewport: Call map/unmap functions on pixel cache
- Date: Wed, 9 Apr 2014 23:55:37 +0000 (UTC)
commit 461f1900f229c48fbf035199daf8e5a687195b78
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 9 23:34:40 2014 +0200
viewport: Call map/unmap functions on pixel cache
https://bugzilla.gnome.org/show_bug.cgi?id=726475
gtk/gtkviewport.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index e129610..7f75bea 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -96,6 +96,8 @@ static void gtk_viewport_get_property (GObject *object,
static void gtk_viewport_destroy (GtkWidget *widget);
static void gtk_viewport_realize (GtkWidget *widget);
static void gtk_viewport_unrealize (GtkWidget *widget);
+static void gtk_viewport_map (GtkWidget *widget);
+static void gtk_viewport_unmap (GtkWidget *widget);
static gint gtk_viewport_draw (GtkWidget *widget,
cairo_t *cr);
static void gtk_viewport_add (GtkContainer *container,
@@ -140,6 +142,8 @@ gtk_viewport_class_init (GtkViewportClass *class)
widget_class->destroy = gtk_viewport_destroy;
widget_class->realize = gtk_viewport_realize;
widget_class->unrealize = gtk_viewport_unrealize;
+ widget_class->map = gtk_viewport_map;
+ widget_class->unmap = gtk_viewport_unmap;
widget_class->draw = gtk_viewport_draw;
widget_class->size_allocate = gtk_viewport_size_allocate;
widget_class->style_updated = gtk_viewport_style_updated;
@@ -790,6 +794,28 @@ gtk_viewport_unrealize (GtkWidget *widget)
}
static void
+gtk_viewport_map (GtkWidget *widget)
+{
+ GtkViewport *viewport = GTK_VIEWPORT (widget);
+ GtkViewportPrivate *priv = viewport->priv;
+
+ _gtk_pixel_cache_map (priv->pixel_cache);
+
+ GTK_WIDGET_CLASS (gtk_viewport_parent_class)->map (widget);
+}
+
+static void
+gtk_viewport_unmap (GtkWidget *widget)
+{
+ GtkViewport *viewport = GTK_VIEWPORT (widget);
+ GtkViewportPrivate *priv = viewport->priv;
+
+ GTK_WIDGET_CLASS (gtk_viewport_parent_class)->unmap (widget);
+
+ _gtk_pixel_cache_unmap (priv->pixel_cache);
+}
+
+static void
draw_bin (cairo_t *cr,
gpointer user_data)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]