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>
This commit is contained in:
Jonas Ådahl 2021-05-05 15:22:53 +02:00
parent b3dffb43b3
commit 9292eba035
2 changed files with 8 additions and 0 deletions

View File

@ -153,3 +153,9 @@ meta_render_device_gbm_new (MetaBackend *backend,
"device-file", device_file, "device-file", device_file,
NULL); NULL);
} }
struct gbm_device *
meta_render_device_gbm_get_gbm_device (MetaRenderDeviceGbm *render_device_gbm)
{
return render_device_gbm->gbm_device;
}

View File

@ -32,4 +32,6 @@ MetaRenderDeviceGbm * meta_render_device_gbm_new (MetaBackend *backend,
MetaDeviceFile *device_file, MetaDeviceFile *device_file,
GError **error); GError **error);
struct gbm_device * meta_render_device_gbm_get_gbm_device (MetaRenderDeviceGbm *render_device_gbm);
#endif /* META_RENDER_DEVICE_GBM_H */ #endif /* META_RENDER_DEVICE_GBM_H */