summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Senyk <thomas.senyk@qt.io>2022-12-13 11:19:58 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-12-13 11:20:08 +0000
commit46eaaed2693c5d226c774ff83734a3b831fe28ff (patch)
tree9a848b7d9b565bc719ea3b954907f0c371b19ae8
parent49f1757edd335a1a909ae922c4a79acf34f9a918 (diff)
downloadqtwayland-46eaaed2693c5d226c774ff83734a3b831fe28ff.tar.gz
Add WL_SHM_FORMAT_RGB888 to supported shm formats
In addition a new entry in QWaylandCompositor::ShmFormat allows compositors to enable that format at runtime Change-Id: I0f894adb3f688458a65713e343127fbcb26f8b65 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit ff445c2c7c93a64922ae437cbbdc95542360c7ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.h1
-rw-r--r--src/shared/qwaylandsharedmemoryformathelper_p.h9
2 files changed, 9 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h
index 262dd588..1dee5cad 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.h
+++ b/src/compositor/compositor_api/qwaylandcompositor.h
@@ -67,6 +67,7 @@ public:
ShmFormat_RGB888 = 0x34324752,
ShmFormat_XBGR8888 = 0x34324258,
ShmFormat_ABGR8888 = 0x34324241,
+ ShmFormat_BGR888 = 0x34324742,
ShmFormat_XRGB2101010 = 0x30335258,
ShmFormat_XBGR2101010 = 0x30334258,
ShmFormat_ARGB2101010 = 0x30335241,
diff --git a/src/shared/qwaylandsharedmemoryformathelper_p.h b/src/shared/qwaylandsharedmemoryformathelper_p.h
index 55bcfc41..c8a9c286 100644
--- a/src/shared/qwaylandsharedmemoryformathelper_p.h
+++ b/src/shared/qwaylandsharedmemoryformathelper_p.h
@@ -24,6 +24,7 @@ public:
case WL_SHM_FORMAT_RGB565: return QImage::Format_RGB16;
case WL_SHM_FORMAT_XRGB1555: return QImage::Format_RGB555;
case WL_SHM_FORMAT_RGB888: return QImage::Format_RGB888;
+ case WL_SHM_FORMAT_BGR888: return QImage::Format_BGR888;
case WL_SHM_FORMAT_XRGB4444: return QImage::Format_RGB444;
case WL_SHM_FORMAT_ARGB4444: return QImage::Format_ARGB4444_Premultiplied;
case WL_SHM_FORMAT_XBGR8888: return QImage::Format_RGBX8888;
@@ -76,7 +77,13 @@ private:
WL_SHM_FORMAT_XRGB2101010, //Format_RGB30,
WL_SHM_FORMAT_ARGB2101010, //Format_A2RGB30_Premultiplied,
WL_SHM_FORMAT_C8, //Format_Alpha8,
- WL_SHM_FORMAT_C8 //Format_Grayscale8,
+ WL_SHM_FORMAT_C8, //Format_Grayscale8,
+ wl_shm_format(INT_MIN), //Format_RGBX64,
+ wl_shm_format(INT_MIN), //Format_RGBA64,
+ wl_shm_format(INT_MIN), //Format_RGBA64_Premultiplied,
+ wl_shm_format(INT_MIN), //Format_Grayscale16,
+ WL_SHM_FORMAT_BGR888, //Format_BGR888
+
};
const size_t size = sizeof(formats_array) / sizeof(*formats_array);
return Array(size, formats_array);