dmabuf: Use gsk_renderer_realize_for_display()

We want to use the correct display when realizing our dmabuf
downloaders.

It's a good thing that the inspector doesn't use dmabufs, isn't it?
This commit is contained in:
Benjamin Otte 2024-01-07 10:03:44 +01:00
parent d0bf33339e
commit b486588883
2 changed files with 10 additions and 10 deletions

View File

@ -140,10 +140,10 @@ gdk_dmabuf_egl_downloader_collect_formats (GdkDisplay *display,
typedef struct _GskRenderer GskRenderer;
extern GskRenderer * gsk_gl_renderer_new (void);
extern gboolean gsk_renderer_realize (GskRenderer *renderer,
GdkSurface *surface,
GError **error);
extern GskRenderer * gsk_gl_renderer_new (void);
extern gboolean gsk_renderer_realize_for_display (GskRenderer *renderer,
GdkDisplay *display,
GError **error);
GdkDmabufDownloader *
gdk_dmabuf_get_egl_downloader (GdkDisplay *display,
@ -176,7 +176,7 @@ gdk_dmabuf_get_egl_downloader (GdkDisplay *display,
renderer = gsk_gl_renderer_new ();
if (!gsk_renderer_realize (renderer, NULL, &error))
if (!gsk_renderer_realize_for_display (renderer, display, &error))
{
g_warning ("Failed to realize GL renderer: %s", error->message);
g_error_free (error);

View File

@ -1833,10 +1833,10 @@ gdk_display_unref_vulkan (GdkDisplay *display)
typedef struct _GskRenderer GskRenderer;
extern GskRenderer * gsk_vulkan_renderer_new (void);
extern gboolean gsk_renderer_realize (GskRenderer *renderer,
GdkSurface *surface,
GError **error);
extern GskRenderer * gsk_vulkan_renderer_new (void);
extern gboolean gsk_renderer_realize_for_display (GskRenderer *renderer,
GdkDisplay *display,
GError **error);
GdkDmabufDownloader *
gdk_vulkan_get_dmabuf_downloader (GdkDisplay *display,
@ -1903,7 +1903,7 @@ gdk_vulkan_get_dmabuf_downloader (GdkDisplay *display,
renderer = gsk_vulkan_renderer_new ();
if (!gsk_renderer_realize (renderer, NULL, &error))
if (!gsk_renderer_realize_for_display (renderer, display, &error))
{
g_warning ("Failed to realize GL renderer: %s", error->message);
g_error_free (error);