summaryrefslogtreecommitdiff
path: root/src/gbm/main
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2017-06-16 10:28:03 +0100
committerDaniel Stone <daniels@collabora.com>2017-07-18 22:16:20 +0100
commit6f8d8b17a1e25361881dfa4f91a43c1c04b029f9 (patch)
tree1a1679bb38089441c0d72aaf57837b9599c5b3c1 /src/gbm/main
parent28ccf8587e1e1c0e9a7b08296807c343f33dc9de (diff)
gbm: Axe buffer import format conversion table
Wayland buffers coming from wl_drm use the WL_DRM_FORMAT_* enums, which are identical to GBM_FORMAT_*. Similarly, FD imports do not need to convert between GBM and DRI FourCC, since they are (almost) completely compatible. This widens the formats accepted by gbm_bo_import() when importing wl_buffers; previously, only XRGB8888, ARGB8888, RGB565 and YUYV were supported. Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/gbm/main')
-rw-r--r--src/gbm/main/gbm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
index 6a9bf1fc2a8..879f003f1b4 100644
--- a/src/gbm/main/gbm.h
+++ b/src/gbm/main/gbm.h
@@ -77,6 +77,12 @@ enum gbm_bo_format {
GBM_BO_FORMAT_ARGB8888
};
+
+/**
+ * The FourCC format codes are taken from the drm_fourcc.h definition, and
+ * re-namespaced. New GBM formats must not be added, unless they are
+ * identical ports from drm_fourcc.
+ */
#define __gbm_fourcc_code(a,b,c,d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \
((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))