backends/screen-cast: Pass pixel format to DMA-BUF constructor

Following the previous commit, do the same function parameter
treatment to meta_screen_cast_create_dma_buf_handle().

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3175>
This commit is contained in:
Georges Basile Stavracas Neto 2023-08-11 16:00:32 -03:00
parent b391ded7bf
commit e24be82c12
3 changed files with 10 additions and 7 deletions

View File

@ -1061,6 +1061,7 @@ on_stream_add_buffer (void *data,
{
dmabuf_handle =
meta_screen_cast_create_dma_buf_handle (screen_cast,
COGL_PIXEL_FORMAT_BGRX_8888,
priv->video_format.size.width,
priv->video_format.size.height);
}

View File

@ -60,6 +60,7 @@ meta_screen_cast_disable_dma_bufs (MetaScreenCast *screen_cast)
CoglDmaBufHandle *
meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast,
CoglPixelFormat format,
int width,
int height)
{
@ -79,7 +80,7 @@ meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast,
return NULL;
dmabuf_handle = cogl_renderer_create_dma_buf (cogl_renderer,
COGL_PIXEL_FORMAT_BGRX_8888,
format,
width, height,
&error);
if (!dmabuf_handle)

View File

@ -54,6 +54,7 @@ MetaBackend * meta_screen_cast_get_backend (MetaScreenCast *screen_cast);
void meta_screen_cast_disable_dma_bufs (MetaScreenCast *screen_cast);
CoglDmaBufHandle * meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast,
CoglPixelFormat format,
int width,
int height);