Changeset View
Changeset View
Standalone View
Standalone View
platformsupport/scenes/opengl/abstract_egl_backend.h
Show All 22 Lines | |||||
23 | #include "texture.h" | 23 | #include "texture.h" | ||
24 | 24 | | |||
25 | #include <QObject> | 25 | #include <QObject> | ||
26 | #include <epoxy/egl.h> | 26 | #include <epoxy/egl.h> | ||
27 | #include <fixx11h.h> | 27 | #include <fixx11h.h> | ||
28 | 28 | | |||
29 | class QOpenGLFramebufferObject; | 29 | class QOpenGLFramebufferObject; | ||
30 | 30 | | |||
31 | namespace KWayland | 31 | namespace KWaylandServer | ||
32 | { | | |||
33 | namespace Server | | |||
34 | { | 32 | { | ||
35 | class BufferInterface; | 33 | class BufferInterface; | ||
36 | } | 34 | } | ||
37 | } | | |||
38 | 35 | | |||
39 | namespace KWin | 36 | namespace KWin | ||
40 | { | 37 | { | ||
41 | 38 | | |||
42 | class EglDmabuf; | 39 | class EglDmabuf; | ||
43 | 40 | | |||
44 | class KWIN_EXPORT AbstractEglBackend : public QObject, public OpenGLBackend | 41 | class KWIN_EXPORT AbstractEglBackend : public QObject, public OpenGLBackend | ||
45 | { | 42 | { | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 98 | protected: | |||
108 | } | 105 | } | ||
109 | SceneOpenGLTexture *texture() const { | 106 | SceneOpenGLTexture *texture() const { | ||
110 | return q; | 107 | return q; | ||
111 | } | 108 | } | ||
112 | 109 | | |||
113 | private: | 110 | private: | ||
114 | void createTextureSubImage(int scale, const QImage &image, const QRegion &damage); | 111 | void createTextureSubImage(int scale, const QImage &image, const QRegion &damage); | ||
115 | bool createTextureImage(const QImage &image); | 112 | bool createTextureImage(const QImage &image); | ||
116 | bool loadShmTexture(const QPointer<KWayland::Server::BufferInterface> &buffer); | 113 | bool loadShmTexture(const QPointer<KWaylandServer::BufferInterface> &buffer); | ||
117 | bool loadEglTexture(const QPointer<KWayland::Server::BufferInterface> &buffer); | 114 | bool loadEglTexture(const QPointer<KWaylandServer::BufferInterface> &buffer); | ||
118 | bool loadDmabufTexture(const QPointer< KWayland::Server::BufferInterface > &buffer); | 115 | bool loadDmabufTexture(const QPointer< KWaylandServer::BufferInterface > &buffer); | ||
119 | bool loadInternalImageObject(WindowPixmap *pixmap); | 116 | bool loadInternalImageObject(WindowPixmap *pixmap); | ||
120 | EGLImageKHR attach(const QPointer<KWayland::Server::BufferInterface> &buffer); | 117 | EGLImageKHR attach(const QPointer<KWaylandServer::BufferInterface> &buffer); | ||
121 | bool updateFromFBO(const QSharedPointer<QOpenGLFramebufferObject> &fbo); | 118 | bool updateFromFBO(const QSharedPointer<QOpenGLFramebufferObject> &fbo); | ||
122 | bool updateFromInternalImageObject(WindowPixmap *pixmap); | 119 | bool updateFromInternalImageObject(WindowPixmap *pixmap); | ||
123 | SceneOpenGLTexture *q; | 120 | SceneOpenGLTexture *q; | ||
124 | AbstractEglBackend *m_backend; | 121 | AbstractEglBackend *m_backend; | ||
125 | EGLImageKHR m_image; | 122 | EGLImageKHR m_image; | ||
126 | }; | 123 | }; | ||
127 | 124 | | |||
128 | } | 125 | } | ||
129 | 126 | | |||
130 | #endif | 127 | #endif |