diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-18 04:38:49 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-03-18 05:57:07 +0100 |
commit | ee8e42f19bb2cf0505d74265dfb71470040b0502 (patch) | |
tree | 87d121547dd4a55a4bac96891a7dfd19f9620e22 /gdk/gdktexture.c | |
parent | 41a5e744d82efe95cb1e145caf2f3c3f22eac950 (diff) | |
download | gtk+-ee8e42f19bb2cf0505d74265dfb71470040b0502.tar.gz |
gdk: Remove gdk_texture_new_from_data()
Use gdk_memory_texture_new() instead.
Diffstat (limited to 'gdk/gdktexture.c')
-rw-r--r-- | gdk/gdktexture.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/gdk/gdktexture.c b/gdk/gdktexture.c index 663f53c283..c2557c4280 100644 --- a/gdk/gdktexture.c +++ b/gdk/gdktexture.c @@ -267,48 +267,6 @@ gdk_texture_init (GdkTexture *self) } /** - * gdk_texture_new_for_data: - * @data: (array): the pixel data - * @width: the number of pixels in each row - * @height: the number of rows - * @stride: the distance from the beginning of one row to the next, in bytes - * - * Creates a new texture object holding the given data. - * The data is assumed to be in CAIRO_FORMAT_ARGB32 format. - * - * Returns: a new #GdkTexture - */ -GdkTexture * -gdk_texture_new_for_data (const guchar *data, - int width, - int height, - int stride) -{ - GdkTexture *texture; - cairo_surface_t *original, *copy; - cairo_t *cr; - - g_return_val_if_fail (width > 0, NULL); - g_return_val_if_fail (height > 0, NULL); - - original = cairo_image_surface_create_for_data ((guchar *) data, CAIRO_FORMAT_ARGB32, width, height, stride); - copy = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); - - cr = cairo_create (copy); - cairo_set_source_surface (cr, original, 0, 0); - cairo_paint (cr); - cairo_destroy (cr); - - texture = gdk_texture_new_for_surface (copy); - - cairo_surface_destroy (copy); - cairo_surface_finish (original); - cairo_surface_destroy (original); - - return texture; -} - -/** * gdk_texture_new_for_surface: * @surface: a cairo image surface * |