Adapt to Clutter -> Cogl pixel format

As the pixel format made more sense to be part of CoglPixelFormat and
was moved there

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2808>
This commit is contained in:
Bilal Elmoussaoui 2023-07-18 15:48:44 +02:00
parent d383f4acac
commit 64c8d94d2b
2 changed files with 6 additions and 6 deletions

View File

@ -351,7 +351,7 @@ do_grab_screenshot (ShellScreenshot *screenshot,
if (!clutter_stage_paint_to_buffer (stage, &screenshot_rect, scale,
cairo_image_surface_get_data (image),
cairo_image_surface_get_stride (image),
CLUTTER_CAIRO_FORMAT_ARGB32,
COGL_PIXEL_FORMAT_CAIRO_ARGB32_COMPAT,
paint_flags,
&error))
{
@ -406,7 +406,7 @@ draw_cursor_image (cairo_surface_t *surface,
height = cogl_texture_get_height (texture);
stride = 4 * width;
data = g_new (guint8, stride * height);
cogl_texture_get_data (texture, CLUTTER_CAIRO_FORMAT_ARGB32, stride, data);
cogl_texture_get_data (texture, COGL_PIXEL_FORMAT_CAIRO_ARGB32_COMPAT, stride, data);
/* FIXME: cairo-gl? */
cursor_surface = cairo_image_surface_create_for_data (data,
@ -1308,7 +1308,7 @@ shell_screenshot_composite_to_stream (CoglTexture *texture,
cogl_texture_get_width (sub_texture),
cogl_texture_get_height (sub_texture));
cogl_texture_get_data (sub_texture, CLUTTER_CAIRO_FORMAT_ARGB32,
cogl_texture_get_data (sub_texture, COGL_PIXEL_FORMAT_CAIRO_ARGB32_COMPAT,
cairo_image_surface_get_stride (surface),
cairo_image_surface_get_data (surface));
cairo_surface_mark_dirty (surface);
@ -1324,7 +1324,7 @@ shell_screenshot_composite_to_stream (CoglTexture *texture,
cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
cogl_texture_get_width (cursor),
cogl_texture_get_height (cursor));
cogl_texture_get_data (cursor, CLUTTER_CAIRO_FORMAT_ARGB32,
cogl_texture_get_data (cursor, COGL_PIXEL_FORMAT_CAIRO_ARGB32_COMPAT,
cairo_image_surface_get_stride (cursor_surface),
cairo_image_surface_get_data (cursor_surface));
cairo_surface_mark_dirty (cursor_surface);

View File

@ -181,7 +181,7 @@ create_corner_material (StCornerSpec *corner)
cairo_surface_destroy (surface);
texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, size, size,
CLUTTER_CAIRO_FORMAT_ARGB32,
COGL_PIXEL_FORMAT_CAIRO_ARGB32_COMPAT,
rowstride,
data,
&error));
@ -1344,7 +1344,7 @@ st_theme_node_prerender_background (StThemeNode *node,
texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx,
texture_width,
texture_height,
CLUTTER_CAIRO_FORMAT_ARGB32,
COGL_PIXEL_FORMAT_CAIRO_ARGB32_COMPAT,
rowstride,
data,
&error));