Changeset View
Changeset View
Standalone View
Standalone View
platformsupport/scenes/opengl/backend.h
Show All 20 Lines | |||||
21 | #ifndef KWIN_SCENE_OPENGL_BACKEND_H | 21 | #ifndef KWIN_SCENE_OPENGL_BACKEND_H | ||
22 | #define KWIN_SCENE_OPENGL_BACKEND_H | 22 | #define KWIN_SCENE_OPENGL_BACKEND_H | ||
23 | 23 | | |||
24 | #include <QElapsedTimer> | 24 | #include <QElapsedTimer> | ||
25 | #include <QRegion> | 25 | #include <QRegion> | ||
26 | 26 | | |||
27 | #include <kwin_export.h> | 27 | #include <kwin_export.h> | ||
28 | 28 | | |||
29 | #include <KWayland/Server/linuxdmabuf_v1_interface.h> | ||||
30 | | ||||
29 | namespace KWin | 31 | namespace KWin | ||
30 | { | 32 | { | ||
31 | class OpenGLBackend; | 33 | class OpenGLBackend; | ||
32 | class OverlayWindow; | 34 | class OverlayWindow; | ||
33 | class SceneOpenGL; | 35 | class SceneOpenGL; | ||
34 | class SceneOpenGLTexture; | 36 | class SceneOpenGLTexture; | ||
35 | class SceneOpenGLTexturePrivate; | 37 | class SceneOpenGLTexturePrivate; | ||
36 | class WindowPixmap; | 38 | class WindowPixmap; | ||
▲ Show 20 Lines • Show All 155 Lines • ▼ Show 20 Line(s) | 193 | bool hasExtension(const QByteArray &extension) const { | |||
192 | return m_extensions.contains(extension); | 194 | return m_extensions.contains(extension); | ||
193 | } | 195 | } | ||
194 | 196 | | |||
195 | /** | 197 | /** | ||
196 | * Copy a region of pixels from the current read to the current draw buffer | 198 | * Copy a region of pixels from the current read to the current draw buffer | ||
197 | */ | 199 | */ | ||
198 | void copyPixels(const QRegion ®ion); | 200 | void copyPixels(const QRegion ®ion); | ||
199 | 201 | | |||
202 | /** | ||||
203 | * Returns the list of the DRM format codes supported by the OpenGL backend. | ||||
204 | * | ||||
205 | * The default implementation returns an empty vector. | ||||
206 | */ | ||||
207 | virtual QVector<uint32_t> supportedDrmFormats(); | ||||
208 | | ||||
209 | /** | ||||
210 | * Returns the list of the DRM modifiers supported with the given format. | ||||
211 | * | ||||
212 | * The default implementation returns an empty vector. | ||||
213 | */ | ||||
214 | virtual QVector<uint64_t> supportedDrmModifiers(uint32_t format); | ||||
215 | | ||||
216 | /** | ||||
217 | * Imports a dmabuf-buffer into the OpenGL backend. | ||||
218 | * | ||||
219 | * The default implementation returns nullptr. | ||||
220 | */ | ||||
221 | virtual KWayland::Server::LinuxDmabuf::Buffer *importDmabufBuffer(const QVector<KWayland::Server::LinuxDmabuf::Plane> &planes, | ||||
222 | uint32_t format, | ||||
223 | const QSize &size, | ||||
224 | KWayland::Server::LinuxDmabuf::Flags flags = 0); | ||||
225 | | ||||
200 | protected: | 226 | protected: | ||
201 | /** | 227 | /** | ||
202 | * @brief Backend specific flushing of frame to screen. | 228 | * @brief Backend specific flushing of frame to screen. | ||
203 | **/ | 229 | **/ | ||
204 | virtual void present() = 0; | 230 | virtual void present() = 0; | ||
205 | /** | 231 | /** | ||
206 | * @brief Sets the backend initialization to failed. | 232 | * @brief Sets the backend initialization to failed. | ||
207 | * | 233 | * | ||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |