mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
cogl: Remove cogl_texture_new_from_sub_texture
This function is deprecated and must be replaced to the alternative. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2058>
This commit is contained in:

committed by
Marge Bot

parent
0c5cf1ec58
commit
612da58c72
@ -1392,6 +1392,8 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||
{
|
||||
cairo_rectangle_int_t *image_clip = NULL;
|
||||
CoglTexture *texture;
|
||||
CoglContext *cogl_context =
|
||||
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||
cairo_surface_t *surface;
|
||||
|
||||
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
|
||||
@ -1432,11 +1434,12 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||
}
|
||||
|
||||
if (image_clip)
|
||||
texture = cogl_texture_new_from_sub_texture (texture,
|
||||
image_clip->x,
|
||||
image_clip->y,
|
||||
image_clip->width,
|
||||
image_clip->height);
|
||||
texture = COGL_TEXTURE (cogl_sub_texture_new (cogl_context,
|
||||
texture,
|
||||
image_clip->x,
|
||||
image_clip->y,
|
||||
image_clip->width,
|
||||
image_clip->height));
|
||||
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
cogl_texture_get_width (texture),
|
||||
|
Reference in New Issue
Block a user