clutter/canvas: Use cogl_texture_2d_new_from_bitmap
cogl_texture_new_from_bitmap() is deprecated. Since this was the last usage of it, also drop cogl_texture_new_from_bitmap(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355>
This commit is contained in:
parent
20bfd10f0c
commit
f25360677f
@ -342,9 +342,7 @@ clutter_canvas_paint_content (ClutterContent *content,
|
|||||||
g_clear_pointer (&priv->texture, cogl_object_unref);
|
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||||
|
|
||||||
if (priv->texture == NULL)
|
if (priv->texture == NULL)
|
||||||
priv->texture = cogl_texture_new_from_bitmap (priv->buffer,
|
priv->texture = COGL_TEXTURE (cogl_texture_2d_new_from_bitmap (priv->buffer));
|
||||||
COGL_TEXTURE_NO_SLICING,
|
|
||||||
CLUTTER_CAIRO_FORMAT_ARGB32);
|
|
||||||
|
|
||||||
if (priv->texture == NULL)
|
if (priv->texture == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -225,28 +225,6 @@ _cogl_texture_new_from_bitmap (CoglBitmap *bitmap,
|
|||||||
return tex;
|
return tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglTexture *
|
|
||||||
cogl_texture_new_from_bitmap (CoglBitmap *bitmap,
|
|
||||||
CoglTextureFlags flags,
|
|
||||||
CoglPixelFormat internal_format)
|
|
||||||
{
|
|
||||||
g_autoptr (GError) error = NULL;
|
|
||||||
|
|
||||||
CoglTexture *tex =
|
|
||||||
_cogl_texture_new_from_bitmap (bitmap,
|
|
||||||
flags,
|
|
||||||
internal_format,
|
|
||||||
FALSE, /* can't convert in-place */
|
|
||||||
&error);
|
|
||||||
if (!tex)
|
|
||||||
{
|
|
||||||
COGL_NOTE (TEXTURES, "Failed to create texture from bitmap: %s",
|
|
||||||
error->message);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return tex;
|
|
||||||
}
|
|
||||||
|
|
||||||
CoglTexture *
|
CoglTexture *
|
||||||
cogl_texture_new_from_file (const char *filename,
|
cogl_texture_new_from_file (const char *filename,
|
||||||
CoglTextureFlags flags,
|
CoglTextureFlags flags,
|
||||||
|
@ -102,28 +102,6 @@ cogl_texture_new_from_data (int width,
|
|||||||
int rowstride,
|
int rowstride,
|
||||||
const uint8_t *data);
|
const uint8_t *data);
|
||||||
|
|
||||||
/**
|
|
||||||
* cogl_texture_new_from_bitmap:
|
|
||||||
* @bitmap: A #CoglBitmap pointer
|
|
||||||
* @flags: Optional flags for the texture, or %COGL_TEXTURE_NONE
|
|
||||||
* @internal_format: the #CoglPixelFormat to use for the GPU storage of the
|
|
||||||
* texture
|
|
||||||
*
|
|
||||||
* Creates a #CoglTexture from a #CoglBitmap.
|
|
||||||
*
|
|
||||||
* Return value: (transfer full): A newly created #CoglTexture or
|
|
||||||
* %NULL on failure
|
|
||||||
*
|
|
||||||
* Since: 1.0
|
|
||||||
* Deprecated: 1.18: Use specific constructors such as
|
|
||||||
* cogl_texture_2d_new_from_bitmap()
|
|
||||||
*/
|
|
||||||
COGL_DEPRECATED_FOR (cogl_texture_2d_new_from_bitmap__OR__cogl_texture_2d_sliced_new_from_bitmap)
|
|
||||||
COGL_EXPORT CoglTexture *
|
|
||||||
cogl_texture_new_from_bitmap (CoglBitmap *bitmap,
|
|
||||||
CoglTextureFlags flags,
|
|
||||||
CoglPixelFormat internal_format);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __COGL_AUTO_TEXTURE_H__ */
|
#endif /* __COGL_AUTO_TEXTURE_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user