Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/virtual/egl_gbm_backend.h
Show All 15 Lines | |||||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef KWIN_EGL_GBM_BACKEND_H | 20 | #ifndef KWIN_EGL_GBM_BACKEND_H | ||
21 | #define KWIN_EGL_GBM_BACKEND_H | 21 | #define KWIN_EGL_GBM_BACKEND_H | ||
22 | #include "abstract_egl_backend.h" | 22 | #include "abstract_egl_backend.h" | ||
23 | #include "scene_opengl.h" | 23 | #include "scene_opengl.h" | ||
24 | #include <config-kwin.h> | ||||
25 | | ||||
26 | #if HAVE_GBM | ||||
27 | struct gbm_device; | ||||
28 | #endif | ||||
24 | 29 | | |||
25 | namespace KWin | 30 | namespace KWin | ||
26 | { | 31 | { | ||
27 | class VirtualBackend; | 32 | class VirtualBackend; | ||
28 | class GLTexture; | 33 | class GLTexture; | ||
29 | class GLRenderTarget; | 34 | class GLRenderTarget; | ||
30 | 35 | | |||
31 | /** | 36 | /** | ||
Show All 14 Lines | |||||
46 | 51 | | |||
47 | protected: | 52 | protected: | ||
48 | void present() override; | 53 | void present() override; | ||
49 | 54 | | |||
50 | private: | 55 | private: | ||
51 | bool initializeEgl(); | 56 | bool initializeEgl(); | ||
52 | bool initBufferConfigs(); | 57 | bool initBufferConfigs(); | ||
53 | bool initRenderingContext(); | 58 | bool initRenderingContext(); | ||
59 | void initGbmDevice(); | ||||
54 | VirtualBackend *m_backend; | 60 | VirtualBackend *m_backend; | ||
55 | GLTexture *m_backBuffer = nullptr; | 61 | GLTexture *m_backBuffer = nullptr; | ||
56 | GLRenderTarget *m_fbo = nullptr; | 62 | GLRenderTarget *m_fbo = nullptr; | ||
57 | int m_frameCounter = 0; | 63 | int m_frameCounter = 0; | ||
64 | #if HAVE_GBM | ||||
65 | gbm_device *m_device = nullptr; | ||||
66 | #endif | ||||
67 | int m_drmFd = -1; | ||||
58 | friend class EglGbmTexture; | 68 | friend class EglGbmTexture; | ||
59 | }; | 69 | }; | ||
60 | 70 | | |||
61 | /** | 71 | /** | ||
62 | * @brief Texture using an EGLImageKHR. | 72 | * @brief Texture using an EGLImageKHR. | ||
63 | **/ | 73 | **/ | ||
64 | class EglGbmTexture : public AbstractEglTexture | 74 | class EglGbmTexture : public AbstractEglTexture | ||
65 | { | 75 | { | ||
Show All 11 Lines |