diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c index 32dee99c8..946cf65f6 100644 --- a/src/backends/meta-screen-cast-stream-src.c +++ b/src/backends/meta-screen-cast-stream-src.c @@ -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); } diff --git a/src/backends/meta-screen-cast.c b/src/backends/meta-screen-cast.c index 8825e27a4..709e54917 100644 --- a/src/backends/meta-screen-cast.c +++ b/src/backends/meta-screen-cast.c @@ -59,9 +59,10 @@ meta_screen_cast_disable_dma_bufs (MetaScreenCast *screen_cast) } CoglDmaBufHandle * -meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast, - int width, - int height) +meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast, + CoglPixelFormat format, + int width, + int height) { MetaDbusSessionManager *session_manager = META_DBUS_SESSION_MANAGER (screen_cast); @@ -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) diff --git a/src/backends/meta-screen-cast.h b/src/backends/meta-screen-cast.h index 6a314783c..c9bc712b0 100644 --- a/src/backends/meta-screen-cast.h +++ b/src/backends/meta-screen-cast.h @@ -53,8 +53,9 @@ 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, - int width, - int height); +CoglDmaBufHandle * meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast, + CoglPixelFormat format, + int width, + int height); MetaScreenCast * meta_screen_cast_new (MetaBackend *backend);