renderer/native: Add API to get primary GPU

Will be used when acquiring scanouts from Wayland buffers.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/798
This commit is contained in:
Jonas Ådahl 2019-09-12 11:50:34 +02:00
parent 753066598f
commit 3dd8861fbf
2 changed files with 8 additions and 0 deletions

View File

@ -313,6 +313,12 @@ meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms)
return renderer_gpu_data->gbm.device;
}
MetaGpuKms *
meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_native)
{
return renderer_native->primary_gpu_kms;
}
static MetaRendererNativeGpuData *
meta_create_renderer_native_gpu_data (MetaGpuKms *gpu_kms)
{

View File

@ -51,6 +51,8 @@ MetaRendererNative * meta_renderer_native_new (MetaBackendNative *backend_nativ
struct gbm_device * meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms);
MetaGpuKms * meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_native);
void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native);
int64_t meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native);