diff options
author | Rui Matos <tiagomatos@gmail.com> | 2016-02-04 15:55:23 +0100 |
---|---|---|
committer | Rui Matos <tiagomatos@gmail.com> | 2016-02-04 18:22:05 +0100 |
commit | 55eef2deb35c2a6578527a0db98b1a96f0a79bb9 (patch) | |
tree | 2c9a44e9a46ab9d3e003c1c77458cf0f0c61018b /src/backends | |
parent | f9db65f47f7e3cfa050d3373d1a2b3615c574040 (diff) | |
download | mutter-55eef2deb35c2a6578527a0db98b1a96f0a79bb9.tar.gz |
cursor-renderer-native: Re-use cogl's gbm device
Instancing a gbm device without initializing EGL with it means that it
won't be able to import wl_drm buffers. Instead, let's re-use cogl's
gbm device which is already properly initialized.
https://bugzilla.gnome.org/show_bug.cgi?id=761557
Diffstat (limited to 'src/backends')
-rw-r--r-- | src/backends/native/meta-cursor-renderer-native.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c index 297400ece..c20c3ec60 100644 --- a/src/backends/native/meta-cursor-renderer-native.c +++ b/src/backends/native/meta-cursor-renderer-native.c @@ -102,9 +102,6 @@ meta_cursor_renderer_native_finalize (GObject *object) if (priv->animation_timeout_id) g_source_remove (priv->animation_timeout_id); - if (priv->gbm) - gbm_device_destroy (priv->gbm); - G_OBJECT_CLASS (meta_cursor_renderer_native_parent_class)->finalize (object); } @@ -672,7 +669,7 @@ meta_cursor_renderer_native_init (MetaCursorRendererNative *native) { CoglRenderer *cogl_renderer = cogl_display_get_renderer (cogl_context_get_display (ctx)); priv->drm_fd = cogl_kms_renderer_get_kms_fd (cogl_renderer); - priv->gbm = gbm_create_device (priv->drm_fd); + priv->gbm = cogl_kms_renderer_get_gbm (cogl_renderer); uint64_t width, height; if (drmGetCap (priv->drm_fd, DRM_CAP_CURSOR_WIDTH, &width) == 0 && |