[gtk+] snapshot: Make gtk_snapshot_get_renderer() private



commit c258ee403a92203957f786138e79cfbeea853ad1
Author: Benjamin Otte <otte redhat com>
Date:   Tue Dec 13 05:08:40 2016 +0100

    snapshot: Make gtk_snapshot_get_renderer() private
    
    Public API doesn't need to be concerned with renderers. Worst case, they
    can use NULL instead of the actual renderer.

 docs/reference/gtk/gtk4-sections.txt |    1 -
 gtk/gtkiconhelper.c                  |    5 ++---
 gtk/gtksnapshot.h                    |    3 ---
 gtk/gtksnapshotprivate.h             |    2 ++
 4 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 4882717..8e1f9e6 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4453,7 +4453,6 @@ gtk_volume_button_get_type
 <FILE>gtksnapshot</FILE>
 <TITLE>GtkSnapshot</TITLE>
 GtkSnapshot
-gtk_snapshot_get_renderer
 gtk_snapshot_push
 gtk_snapshot_push_node
 gtk_snapshot_pop
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index 72362d4..82576fd 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -553,8 +553,7 @@ gtk_icon_helper_ensure_surface (GtkIconHelper *self)
 }
 
 static void
-gtk_icon_helper_ensure_texture (GtkIconHelper *self,
-                                GskRenderer   *renderer)
+gtk_icon_helper_ensure_texture (GtkIconHelper *self)
 {
   cairo_surface_t *map;
   int width, height, scale;
@@ -874,7 +873,7 @@ gtk_icon_helper_snapshot (GtkIconHelper *self,
   GtkCssStyle *style;
   GskTexture *texture;
 
-  gtk_icon_helper_ensure_texture (self, gtk_snapshot_get_renderer (snapshot));
+  gtk_icon_helper_ensure_texture (self);
   texture = self->priv->texture;
   if (texture == NULL)
     return;
diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h
index 8a2cc4a..7b7e5ef 100644
--- a/gtk/gtksnapshot.h
+++ b/gtk/gtksnapshot.h
@@ -37,9 +37,6 @@
 G_BEGIN_DECLS
 
 GDK_AVAILABLE_IN_3_90
-GskRenderer *   gtk_snapshot_get_renderer               (const GtkSnapshot      *snapshot);
-
-GDK_AVAILABLE_IN_3_90
 void            gtk_snapshot_push                       (GtkSnapshot            *snapshot,
                                                          gboolean                keep_coordinates,
                                                          const char             *name,
diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h
index eb8cbac..9050c4f 100644
--- a/gtk/gtksnapshotprivate.h
+++ b/gtk/gtksnapshotprivate.h
@@ -48,6 +48,8 @@ void            gtk_snapshot_init               (GtkSnapshot             *state,
                                                  ...) G_GNUC_PRINTF (4, 5);
 GskRenderNode * gtk_snapshot_finish             (GtkSnapshot             *state);
 
+GskRenderer *   gtk_snapshot_get_renderer       (const GtkSnapshot       *snapshot);
+
 G_END_DECLS
 
 #endif /* __GTK_SNAPSHOT_PRIVATE_H__ */


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