From 0b06e2029cfdceb7dc27d1f3c19f8b5facfa0313 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 2 Jul 2013 16:35:05 +0200 Subject: [PATCH] gdk: gdk_cairo_pixbuf_to_surface -> gdk_cairo_surface_create_from_pixbuf --- gdk/gdkcairo.c | 6 +++--- gdk/gdkcairo.h | 2 +- gtk/gtkcssimagesurface.c | 2 +- gtk/gtkcssstylefuncs.c | 2 +- gtk/gtkfilesystem.c | 2 +- gtk/gtkiconfactory.c | 2 +- gtk/gtkiconhelper.c | 4 ++-- gtk/gtkicontheme.c | 2 +- gtk/gtknumerableicon.c | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c index f3a134b5b8..33fb565f58 100644 --- a/gdk/gdkcairo.c +++ b/gdk/gdkcairo.c @@ -176,7 +176,7 @@ gdk_cairo_region (cairo_t *cr, } /** - * gdk_cairo_pixbuf_to_surface: + * gdk_cairo_surface_create_from_pixbuf: * @pixbuf: a #GdkPixbuf * @for_window: The window this will be drawn to, on %NULL. * @@ -186,7 +186,7 @@ gdk_cairo_region (cairo_t *cr, * Since: 3.10 */ cairo_surface_t * -gdk_cairo_pixbuf_to_surface (const GdkPixbuf *pixbuf, +gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf, GdkWindow *for_window) { gint width = gdk_pixbuf_get_width (pixbuf); @@ -295,7 +295,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr, { cairo_surface_t *surface; - surface = gdk_cairo_pixbuf_to_surface (pixbuf, NULL); + surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, NULL); cairo_set_source_surface (cr, surface, pixbuf_x, pixbuf_y); cairo_surface_destroy (surface); } diff --git a/gdk/gdkcairo.h b/gdk/gdkcairo.h index 084e629966..fdee4e8d2c 100644 --- a/gdk/gdkcairo.h +++ b/gdk/gdkcairo.h @@ -72,7 +72,7 @@ cairo_surface_t * gdk_cairo_surface_create_similar (cairo_surface_t *surface, int width, int height); GDK_AVAILABLE_IN_3_10 -cairo_surface_t * gdk_cairo_pixbuf_to_surface (const GdkPixbuf *pixbuf, +cairo_surface_t * gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf, GdkWindow *for_window); G_END_DECLS diff --git a/gtk/gtkcssimagesurface.c b/gtk/gtkcssimagesurface.c index a2353902d5..2de8a23989 100644 --- a/gtk/gtkcssimagesurface.c +++ b/gtk/gtkcssimagesurface.c @@ -145,7 +145,7 @@ _gtk_css_image_surface_new_for_pixbuf (GdkPixbuf *pixbuf) g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL); - surface = gdk_cairo_pixbuf_to_surface (pixbuf, NULL); + surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, NULL); image = _gtk_css_image_surface_new (surface); cairo_surface_destroy (surface); diff --git a/gtk/gtkcssstylefuncs.c b/gtk/gtkcssstylefuncs.c index a228ea48d0..c84339c1ce 100644 --- a/gtk/gtkcssstylefuncs.c +++ b/gtk/gtkcssstylefuncs.c @@ -783,7 +783,7 @@ pattern_value_parse (GtkCssParser *parser, return FALSE; } - surface = gdk_cairo_pixbuf_to_surface (pixbuf, NULL); + surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, NULL); pattern = cairo_pattern_create_for_surface (surface); cairo_surface_destroy (surface); diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c index 0af4a5c7fd..96ffb99682 100644 --- a/gtk/gtkfilesystem.c +++ b/gtk/gtkfilesystem.c @@ -819,7 +819,7 @@ _gtk_file_info_render_icon (GFileInfo *info, icon_size*scale, icon_size*scale, NULL); - surface = gdk_cairo_pixbuf_to_surface (pixbuf, + surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, gtk_widget_get_window (widget)); g_object_unref (pixbuf); pattern = cairo_pattern_create_for_surface (surface); diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c index 66b1f19de9..837e6444c0 100644 --- a/gtk/gtkiconfactory.c +++ b/gtk/gtkiconfactory.c @@ -1615,7 +1615,7 @@ gtk_icon_set_render_icon_pattern (GtkIconSet *icon_set, pixbuf = gtk_icon_set_render_icon_pixbuf_for_scale (icon_set, context, size, scale); - surface = gdk_cairo_pixbuf_to_surface (pixbuf, for_window); + surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, for_window); g_object_unref (pixbuf); pattern = cairo_pattern_create_for_surface (surface); cairo_surface_destroy (surface); diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index a0383e1098..cb12b18bd2 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -588,7 +588,7 @@ ensure_pattern_from_pixbuf (GtkIconHelper *self, self->priv->rendered_pattern_width = (gdk_pixbuf_get_width (pixbuf) + scale - 1) / scale; self->priv->rendered_pattern_height = (gdk_pixbuf_get_height (pixbuf) + scale - 1) / scale; - surface = gdk_cairo_pixbuf_to_surface (pixbuf, self->priv->window); + surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, self->priv->window); g_object_unref (pixbuf); self->priv->rendered_pattern = cairo_pattern_create_for_surface (surface); cairo_surface_destroy (surface); @@ -685,7 +685,7 @@ ensure_stated_pattern_from_info (GtkIconHelper *self, pattern = NULL; if (destination) { - surface = gdk_cairo_pixbuf_to_surface (destination, self->priv->window); + surface = gdk_cairo_surface_create_from_pixbuf (destination, self->priv->window); pattern = cairo_pattern_create_for_surface (surface); cairo_matrix_init_scale (&matrix, scale, scale); cairo_pattern_set_matrix (pattern, &matrix); diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index fe53629f68..b23d3509ed 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3909,7 +3909,7 @@ gtk_icon_info_load_pattern (GtkIconInfo *icon_info, if (pixbuf == NULL) return NULL; - surface = gdk_cairo_pixbuf_to_surface (pixbuf, for_window); + surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, for_window); g_object_unref (pixbuf); pattern = cairo_pattern_create_for_surface (surface); cairo_surface_destroy (surface); diff --git a/gtk/gtknumerableicon.c b/gtk/gtknumerableicon.c index 9ba612fe5f..44cbbead82 100644 --- a/gtk/gtknumerableicon.c +++ b/gtk/gtknumerableicon.c @@ -219,7 +219,7 @@ draw_from_gicon (GtkNumerableIcon *self) if (pixbuf == NULL) return NULL; - surface = gdk_cairo_pixbuf_to_surface (pixbuf, NULL); + surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, NULL); g_object_unref (pixbuf); return surface;