Changeset View
Changeset View
Standalone View
Standalone View
platformsupport/scenes/opengl/egl_dmabuf.h
Show All 27 Lines | |||||
28 | 28 | | |||
29 | namespace KWin | 29 | namespace KWin | ||
30 | { | 30 | { | ||
31 | class EglDmabuf; | 31 | class EglDmabuf; | ||
32 | 32 | | |||
33 | class EglDmabufBuffer : public DmabufBuffer | 33 | class EglDmabufBuffer : public DmabufBuffer | ||
34 | { | 34 | { | ||
35 | public: | 35 | public: | ||
36 | using Plane = KWayland::Server::LinuxDmabufUnstableV1Interface::Plane; | 36 | using Plane = KWaylandServer::LinuxDmabufUnstableV1Interface::Plane; | ||
37 | using Flags = KWayland::Server::LinuxDmabufUnstableV1Interface::Flags; | 37 | using Flags = KWaylandServer::LinuxDmabufUnstableV1Interface::Flags; | ||
38 | 38 | | |||
39 | enum class ImportType { | 39 | enum class ImportType { | ||
40 | Direct, | 40 | Direct, | ||
41 | Conversion | 41 | Conversion | ||
42 | }; | 42 | }; | ||
43 | 43 | | |||
44 | EglDmabufBuffer(EGLImage image, | 44 | EglDmabufBuffer(EGLImage image, | ||
45 | const QVector<Plane> &planes, | 45 | const QVector<Plane> &planes, | ||
Show All 20 Lines | 65 | private: | |||
66 | QVector<EGLImage> m_images; | 66 | QVector<EGLImage> m_images; | ||
67 | EglDmabuf *m_interfaceImpl; | 67 | EglDmabuf *m_interfaceImpl; | ||
68 | ImportType m_importType; | 68 | ImportType m_importType; | ||
69 | }; | 69 | }; | ||
70 | 70 | | |||
71 | class EglDmabuf : public LinuxDmabuf | 71 | class EglDmabuf : public LinuxDmabuf | ||
72 | { | 72 | { | ||
73 | public: | 73 | public: | ||
74 | using Plane = KWayland::Server::LinuxDmabufUnstableV1Interface::Plane; | 74 | using Plane = KWaylandServer::LinuxDmabufUnstableV1Interface::Plane; | ||
75 | using Flags = KWayland::Server::LinuxDmabufUnstableV1Interface::Flags; | 75 | using Flags = KWaylandServer::LinuxDmabufUnstableV1Interface::Flags; | ||
76 | 76 | | |||
77 | static EglDmabuf* factory(AbstractEglBackend *backend); | 77 | static EglDmabuf* factory(AbstractEglBackend *backend); | ||
78 | 78 | | |||
79 | explicit EglDmabuf(AbstractEglBackend *backend); | 79 | explicit EglDmabuf(AbstractEglBackend *backend); | ||
80 | ~EglDmabuf() override; | 80 | ~EglDmabuf() override; | ||
81 | 81 | | |||
82 | KWayland::Server::LinuxDmabufUnstableV1Buffer *importBuffer(const QVector<Plane> &planes, | 82 | KWaylandServer::LinuxDmabufUnstableV1Buffer *importBuffer(const QVector<Plane> &planes, | ||
83 | uint32_t format, | 83 | uint32_t format, | ||
84 | const QSize &size, | 84 | const QSize &size, | ||
85 | Flags flags) override; | 85 | Flags flags) override; | ||
86 | 86 | | |||
87 | private: | 87 | private: | ||
88 | EGLImage createImage(const QVector<Plane> &planes, | 88 | EGLImage createImage(const QVector<Plane> &planes, | ||
89 | uint32_t format, | 89 | uint32_t format, | ||
90 | const QSize &size); | 90 | const QSize &size); | ||
91 | 91 | | |||
92 | KWayland::Server::LinuxDmabufUnstableV1Buffer *yuvImport(const QVector<Plane> &planes, | 92 | KWaylandServer::LinuxDmabufUnstableV1Buffer *yuvImport(const QVector<Plane> &planes, | ||
93 | uint32_t format, | 93 | uint32_t format, | ||
94 | const QSize &size, | 94 | const QSize &size, | ||
95 | Flags flags); | 95 | Flags flags); | ||
96 | 96 | | |||
97 | void setSupportedFormatsAndModifiers(); | 97 | void setSupportedFormatsAndModifiers(); | ||
98 | 98 | | |||
99 | AbstractEglBackend *m_backend; | 99 | AbstractEglBackend *m_backend; | ||
100 | 100 | | |||
101 | friend class EglDmabufBuffer; | 101 | friend class EglDmabufBuffer; | ||
102 | }; | 102 | }; | ||
103 | 103 | | |||
104 | } | 104 | } |