From f927e692c79457070324d5a49d5dde1d43d1e0a3 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 31 Mar 2022 12:34:01 -0300 Subject: [PATCH] cogl: Drop cogl_texture_new_from_file It is now unused. Part-of: --- cogl/cogl/deprecated/cogl-auto-texture.c | 26 -------------------- cogl/cogl/deprecated/cogl-auto-texture.h | 30 ------------------------ 2 files changed, 56 deletions(-) diff --git a/cogl/cogl/deprecated/cogl-auto-texture.c b/cogl/cogl/deprecated/cogl-auto-texture.c index dd44db51f..e57c704bb 100644 --- a/cogl/cogl/deprecated/cogl-auto-texture.c +++ b/cogl/cogl/deprecated/cogl-auto-texture.c @@ -225,29 +225,3 @@ _cogl_texture_new_from_bitmap (CoglBitmap *bitmap, return tex; } -CoglTexture * -cogl_texture_new_from_file (const char *filename, - CoglTextureFlags flags, - CoglPixelFormat internal_format, - GError **error) -{ - CoglBitmap *bmp; - CoglTexture *texture = NULL; - - _COGL_GET_CONTEXT (ctx, NULL); - - g_return_val_if_fail (error == NULL || *error == NULL, NULL); - - bmp = cogl_bitmap_new_from_file (filename, error); - if (bmp == NULL) - return NULL; - - texture = _cogl_texture_new_from_bitmap (bmp, flags, - internal_format, - TRUE, /* can convert in-place */ - error); - - cogl_object_unref (bmp); - - return texture; -} diff --git a/cogl/cogl/deprecated/cogl-auto-texture.h b/cogl/cogl/deprecated/cogl-auto-texture.h index 8ea4ac5c4..b498f14fc 100644 --- a/cogl/cogl/deprecated/cogl-auto-texture.h +++ b/cogl/cogl/deprecated/cogl-auto-texture.h @@ -35,36 +35,6 @@ G_BEGIN_DECLS #include -/** - * cogl_texture_new_from_file: - * @filename: the file to load - * @flags: Optional flags for the texture, or %COGL_TEXTURE_NONE - * @internal_format: the #CoglPixelFormat to use for the GPU storage of the - * texture. If %COGL_PIXEL_FORMAT_ANY is given then a premultiplied - * format similar to the format of the source data will be used. The - * default blending equations of Cogl expect premultiplied color data; - * the main use of passing a non-premultiplied format here is if you - * have non-premultiplied source data and are going to adjust the blend - * mode (see cogl_material_set_blend()) or use the data for something - * other than straight blending. - * @error: return location for a #GError or %NULL - * - * Creates a #CoglTexture from an image file. - * - * Return value: (transfer full): A newly created #CoglTexture or - * %NULL on failure - * - * Since: 0.8 - * Deprecated: 1.18: Use specific constructors such as - * cogl_texture_2d_new_from_file() - */ -COGL_DEPRECATED_FOR (cogl_texture_2d_new_from_file__OR__cogl_texture_2d_sliced_new_from_file) -COGL_EXPORT CoglTexture * -cogl_texture_new_from_file (const char *filename, - CoglTextureFlags flags, - CoglPixelFormat internal_format, - GError **error); - /** * cogl_texture_new_from_data: * @width: width of texture in pixels