wayland/dma-buf: Make gbm_bo import function better named

It imports a DMA buffer as a gbm_bo, but only if it can be used to scan
it out, so name it import_scanout_gbm_bo().

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1261
This commit is contained in:
Jonas Ådahl 2020-05-20 12:49:36 +02:00 committed by Georges Basile Stavracas Neto
parent dbf47b652e
commit 7343b8d817

View File

@ -185,7 +185,7 @@ meta_wayland_dma_buf_buffer_attach (MetaWaylandBuffer *buffer,
#ifdef HAVE_NATIVE_BACKEND
static struct gbm_bo *
create_gbm_bo (MetaWaylandDmaBufBuffer *dma_buf,
import_scanout_gbm_bo (MetaWaylandDmaBufBuffer *dma_buf,
MetaGpuKms *gpu_kms,
int n_planes,
gboolean *use_modifier)
@ -276,7 +276,7 @@ meta_wayland_dma_buf_try_acquire_scanout (MetaWaylandDmaBufBuffer *dma_buf,
return NULL;
gpu_kms = meta_renderer_native_get_primary_gpu (renderer_native);
gbm_bo = create_gbm_bo (dma_buf, gpu_kms, n_planes, &use_modifier);
gbm_bo = import_scanout_gbm_bo (dma_buf, gpu_kms, n_planes, &use_modifier);
if (!gbm_bo)
{
g_debug ("Failed to import scanout gbm_bo: %s", g_strerror (errno));