2525#include < qquickwindow.h>
2626#include < qscopedpointer.h>
2727#include < qsgtexture_platform.h>
28- #include < qtclasshelpermacros.h>
2928#include < qwayland-linux-dmabuf-v1.h>
3029#include < qwaylandclientextension.h>
3130#include < sys/mman.h>
@@ -48,42 +47,7 @@ Q_LOGGING_CATEGORY(logDmabuf, "quickshell.wayland.buffer.dmabuf", QtWarningMsg);
4847
4948LinuxDmabufManager* MANAGER = nullptr ; // NOLINT
5049
51- class FourCCStr {
52- public:
53- explicit FourCCStr (uint32_t code)
54- : chars(
55- {static_cast <char >(code >> 0 & 0xff ),
56- static_cast <char >(code >> 8 & 0xff ),
57- static_cast <char >(code >> 16 & 0xff ),
58- static_cast <char >(code >> 24 & 0xff ),
59- ' \0 ' }
60- ) {
61- for (auto i = 3 ; i != 0 ; i--) {
62- if (chars[i] == ' ' ) chars[i] = ' \0 ' ;
63- else break ;
64- }
65- }
66-
67- [[nodiscard]] const char * cStr () const { return this ->chars .data (); }
68-
69- private:
70- std::array<char , 5 > chars {};
71- };
72-
73- class FourCCModStr {
74- public:
75- explicit FourCCModStr (uint64_t code): drmStr(drmGetFormatModifierName(code)) {}
76- ~FourCCModStr () {
77- if (this ->drmStr ) drmFree (this ->drmStr );
78- }
79-
80- Q_DISABLE_COPY_MOVE (FourCCModStr);
81-
82- [[nodiscard]] const char * cStr () const { return this ->drmStr ; }
83-
84- private:
85- char * drmStr;
86- };
50+ } // namespace
8751
8852QDebug& operator <<(QDebug& debug, const FourCCStr& fourcc) {
8953 debug << fourcc.cStr ();
@@ -95,8 +59,6 @@ QDebug& operator<<(QDebug& debug, const FourCCModStr& fourcc) {
9559 return debug;
9660}
9761
98- } // namespace
99-
10062QDebug& operator <<(QDebug& debug, const WlDmaBuffer* buffer) {
10163 auto saver = QDebugStateSaver (debug);
10264 debug.nospace ();
0 commit comments