Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/egl_gbm_backend.h
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 55 | protected: | |||
---|---|---|---|---|---|
56 | void present() override; | 56 | void present() override; | ||
57 | void cleanupSurfaces() override; | 57 | void cleanupSurfaces() override; | ||
58 | 58 | | |||
59 | private: | 59 | private: | ||
60 | bool initializeEgl(); | 60 | bool initializeEgl(); | ||
61 | bool initBufferConfigs(); | 61 | bool initBufferConfigs(); | ||
62 | bool initRenderingContext(); | 62 | bool initRenderingContext(); | ||
63 | void initRemotePresent(); | 63 | void initRemotePresent(); | ||
64 | struct Output { | 64 | struct EglGbmOutput { | ||
65 | DrmOutput *output = nullptr; | 65 | DrmOutput *output = nullptr; | ||
66 | DrmBuffer *buffer = nullptr; | 66 | DrmBuffer *buffer = nullptr; | ||
67 | std::shared_ptr<GbmSurface> gbmSurface; | 67 | std::shared_ptr<GbmSurface> gbmSurface; | ||
68 | EGLSurface eglSurface = EGL_NO_SURFACE; | 68 | EGLSurface eglSurface = EGL_NO_SURFACE; | ||
69 | int bufferAge = 0; | 69 | int bufferAge = 0; | ||
70 | /** | 70 | /** | ||
71 | * @brief The damage history for the past 10 frames. | 71 | * @brief The damage history for the past 10 frames. | ||
72 | */ | 72 | */ | ||
73 | QList<QRegion> damageHistory; | 73 | QList<QRegion> damageHistory; | ||
74 | }; | 74 | }; | ||
75 | bool resetOutput(Output &output, DrmOutput *drmOutput); | 75 | bool resetOutput(EglGbmOutput &output, DrmOutput *drmOutput); | ||
76 | bool makeContextCurrent(const Output &output); | 76 | bool makeContextCurrent(const EglGbmOutput &output); | ||
77 | void presentOnOutput(Output &output); | 77 | void presentOnOutput(EglGbmOutput &output); | ||
78 | void cleanupOutput(const Output &output); | 78 | void cleanupOutput(const EglGbmOutput &output); | ||
79 | void createOutput(DrmOutput *output); | 79 | void createOutput(DrmOutput *output); | ||
80 | DrmBackend *m_backend; | 80 | DrmBackend *m_backend; | ||
81 | QVector<Output> m_outputs; | 81 | QVector<EglGbmOutput> m_outputs; | ||
82 | QScopedPointer<RemoteAccessManager> m_remoteaccessManager; | 82 | QScopedPointer<RemoteAccessManager> m_remoteaccessManager; | ||
83 | friend class EglGbmTexture; | 83 | friend class EglGbmTexture; | ||
84 | }; | 84 | }; | ||
85 | 85 | | |||
86 | /** | 86 | /** | ||
87 | * @brief Texture using an EGLImageKHR. | 87 | * @brief Texture using an EGLImageKHR. | ||
88 | **/ | 88 | **/ | ||
89 | class EglGbmTexture : public AbstractEglTexture | 89 | class EglGbmTexture : public AbstractEglTexture | ||
Show All 12 Lines |