diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c index f1d7b6923..521da033c 100644 --- a/src/backends/native/meta-renderer-native.c +++ b/src/backends/native/meta-renderer-native.c @@ -228,6 +228,16 @@ meta_create_renderer_native_gpu_data (MetaGpuKms *gpu_kms) return g_new0 (MetaRendererNativeGpuData, 1); } +static MetaEgl * +meta_renderer_native_get_egl (MetaRendererNative *renderer_native) +{ + MetaMonitorManager *monitor_manager = + META_MONITOR_MANAGER (renderer_native->monitor_manager_kms); + MetaBackend *backend = meta_monitor_manager_get_backend (monitor_manager); + + return meta_backend_get_egl (backend); +} + static void meta_renderer_native_disconnect (CoglRenderer *cogl_renderer) { @@ -1969,8 +1979,7 @@ find_egl_device (MetaRendererNative *renderer_native, MetaGpuKms *gpu_kms, GError **error) { - MetaBackend *backend = meta_get_backend (); - MetaEgl *egl = meta_backend_get_egl (backend); + MetaEgl *egl = meta_renderer_native_get_egl (renderer_native); char **missing_extensions; EGLint num_devices; EGLDeviceEXT *devices; @@ -2046,8 +2055,7 @@ get_egl_device_display (MetaRendererNative *renderer_native, EGLDeviceEXT egl_device, GError **error) { - MetaBackend *backend = meta_get_backend (); - MetaEgl *egl = meta_backend_get_egl (backend); + MetaEgl *egl = meta_renderer_native_get_egl (renderer_native); int kms_fd = meta_gpu_kms_get_fd (gpu_kms); EGLint platform_attribs[] = { EGL_DRM_MASTER_FD_EXT, kms_fd, @@ -2065,8 +2073,7 @@ create_renderer_gpu_data_egl_device (MetaRendererNative *renderer_native, MetaGpuKms *gpu_kms, GError **error) { - MetaBackend *backend = meta_get_backend (); - MetaEgl *egl = meta_backend_get_egl (backend); + MetaEgl *egl = meta_renderer_native_get_egl (renderer_native); char **missing_extensions; EGLDeviceEXT egl_device; EGLDisplay egl_display;