[mutter] render-device/gbm: Add getter for gbm_device



commit 9292eba035ec0f0fd8dbcba9f5dd7d729a7bbe1b
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Wed May 5 15:22:53 2021 +0200

    render-device/gbm: Add getter for gbm_device
    
    Will be needed, at least during a transition period, to e.g. deal with
    gbm_surface's et. al. without having MetaRenderDevice learning about
    render surfaces.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1854>

 src/backends/native/meta-render-device-gbm.c | 6 ++++++
 src/backends/native/meta-render-device-gbm.h | 2 ++
 2 files changed, 8 insertions(+)
---
diff --git a/src/backends/native/meta-render-device-gbm.c b/src/backends/native/meta-render-device-gbm.c
index 5dc99d379e..bde08adc3d 100644
--- a/src/backends/native/meta-render-device-gbm.c
+++ b/src/backends/native/meta-render-device-gbm.c
@@ -153,3 +153,9 @@ meta_render_device_gbm_new (MetaBackend     *backend,
                          "device-file", device_file,
                          NULL);
 }
+
+struct gbm_device *
+meta_render_device_gbm_get_gbm_device (MetaRenderDeviceGbm *render_device_gbm)
+{
+  return render_device_gbm->gbm_device;
+}
diff --git a/src/backends/native/meta-render-device-gbm.h b/src/backends/native/meta-render-device-gbm.h
index c831b0d407..4c8b0516c4 100644
--- a/src/backends/native/meta-render-device-gbm.h
+++ b/src/backends/native/meta-render-device-gbm.h
@@ -32,4 +32,6 @@ MetaRenderDeviceGbm * meta_render_device_gbm_new (MetaBackend     *backend,
                                                   MetaDeviceFile  *device_file,
                                                   GError         **error);
 
+struct gbm_device * meta_render_device_gbm_get_gbm_device (MetaRenderDeviceGbm *render_device_gbm);
+
 #endif /* META_RENDER_DEVICE_GBM_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]