forked from AuroraMiddleware/gtk
gdk: Remove gdk_cairo_surface_create_from_pixbuf()
It's unused and people should use textures and snapshots anyway.
This commit is contained in:
parent
9cecf123f3
commit
7ef8696a7d
@ -415,7 +415,6 @@ gdk_cairo_set_source_pixbuf
|
||||
gdk_cairo_rectangle
|
||||
gdk_cairo_region
|
||||
gdk_cairo_region_create_from_surface
|
||||
gdk_cairo_surface_create_from_pixbuf
|
||||
gdk_cairo_draw_from_gl
|
||||
gdk_cairo_surface_upload_to_gl
|
||||
</SECTION>
|
||||
|
@ -237,46 +237,6 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
|
||||
cairo_surface_mark_dirty (surface);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_cairo_surface_create_from_pixbuf:
|
||||
* @pixbuf: a #GdkPixbuf
|
||||
* @scale: the scale of the new surface, or 0 to use same as @surface
|
||||
* @for_surface: (allow-none): The surface this will be drawn to, or %NULL
|
||||
*
|
||||
* Creates an image surface with the same contents as
|
||||
* the pixbuf.
|
||||
*
|
||||
* Returns: a new cairo surface, must be freed with cairo_surface_destroy()
|
||||
*/
|
||||
cairo_surface_t *
|
||||
gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
|
||||
int scale,
|
||||
GdkSurface *for_surface)
|
||||
{
|
||||
cairo_format_t format;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
|
||||
g_return_val_if_fail (scale >= 0, NULL);
|
||||
g_return_val_if_fail (for_surface == NULL || GDK_IS_SURFACE (for_surface), NULL);
|
||||
|
||||
if (gdk_pixbuf_get_n_channels (pixbuf) == 3)
|
||||
format = CAIRO_FORMAT_RGB24;
|
||||
else
|
||||
format = CAIRO_FORMAT_ARGB32;
|
||||
|
||||
surface =
|
||||
gdk_surface_create_similar_image_surface (for_surface,
|
||||
format,
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_pixbuf_get_height (pixbuf),
|
||||
scale);
|
||||
|
||||
gdk_cairo_surface_paint_pixbuf (surface, pixbuf);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_cairo_set_source_pixbuf:
|
||||
* @cr: a cairo context
|
||||
|
@ -56,10 +56,6 @@ cairo_region_t *
|
||||
(cairo_surface_t *surface);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_surface_t * gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
|
||||
int scale,
|
||||
GdkSurface *for_surface);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
GdkSurface *surface,
|
||||
int source,
|
||||
|
Loading…
Reference in New Issue
Block a user