summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-07-08 09:20:55 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-08-21 07:09:11 +0200
commitd806bbf08b8501e053c791bdd44a267362436c42 (patch)
tree9178a9e8a1c75f61c24ef2bb09aa0c6f9b9fe4d2 /src/shared
parentf3d40b02558f5eca54ddb33b132d350b958cac1e (diff)
Add API for selecting supported wl_shm formats
We would always reported all formats we could convert from as supported on the wl_shm protocol. This would sometimes cause clients to pick formats that required internal conversion when creating OpenGL textures from the images. To avoid this, we default to only supporting the RGB32 and ARGB32_Premultiplied formats (which are required and advertised automatically) and if the user wants to add additional formats, we now have a additionalShmFormats property for this. [ChangeLog][QtWaylandCompositor] The compositor will now by default only advertise support for the required wl_shm formats. Additional formats can be added to the list by setting the additionalShmFormats property on the compositor. Fixes: QTBUG-77531 Change-Id: Ibd5d5be2a37968353c00308abbfff7ca6f8d310d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/qwaylandsharedmemoryformathelper_p.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/shared/qwaylandsharedmemoryformathelper_p.h b/src/shared/qwaylandsharedmemoryformathelper_p.h
index ac4428dfd..6feaff3f9 100644
--- a/src/shared/qwaylandsharedmemoryformathelper_p.h
+++ b/src/shared/qwaylandsharedmemoryformathelper_p.h
@@ -71,7 +71,6 @@ public:
default: return QImage::Format_Invalid;
}
}
- static inline QList<wl_shm_format> supportedWaylandFormats();
private:
//IMPLEMENTATION (which has to be inline in the header because of the include trick)
@@ -127,19 +126,6 @@ wl_shm_format QWaylandSharedMemoryFormatHelper::fromQImageFormat(QImage::Format
return array.data[format];
}
-QList<wl_shm_format> QWaylandSharedMemoryFormatHelper::supportedWaylandFormats()
-{
- QList<wl_shm_format> retFormats;
- Array array = getData();
- for (size_t i = 0; i < array.size; i++) {
- if (int(array.data[i]) != INT_MIN
- && !retFormats.contains(array.data[i])) {
- retFormats.append(array.data[i]);
- }
- }
- return retFormats;
-}
-
QT_END_NAMESPACE
#endif //QWAYLANDSHAREDMEMORYFORMATHELPER_H