Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/egl_gbm_backend.cpp
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Line(s) | 228 | for (auto &o: m_outputs) { | |||
---|---|---|---|---|---|
229 | makeContextCurrent(o); | 229 | makeContextCurrent(o); | ||
230 | presentOnOutput(o); | 230 | presentOnOutput(o); | ||
231 | } | 231 | } | ||
232 | } | 232 | } | ||
233 | 233 | | |||
234 | void EglGbmBackend::presentOnOutput(EglGbmBackend::Output &o) | 234 | void EglGbmBackend::presentOnOutput(EglGbmBackend::Output &o) | ||
235 | { | 235 | { | ||
236 | eglSwapBuffers(eglDisplay(), o.eglSurface); | 236 | eglSwapBuffers(eglDisplay(), o.eglSurface); | ||
237 | auto oldBuffer = o.buffer; | | |||
238 | o.buffer = m_backend->createBuffer(o.gbmSurface); | 237 | o.buffer = m_backend->createBuffer(o.gbmSurface); | ||
239 | m_backend->present(o.buffer, o.output); | 238 | m_backend->present(o.buffer, o.output); | ||
240 | delete oldBuffer; | | |||
241 | if (supportsBufferAge()) { | 239 | if (supportsBufferAge()) { | ||
242 | eglQuerySurface(eglDisplay(), o.eglSurface, EGL_BUFFER_AGE_EXT, &o.bufferAge); | 240 | eglQuerySurface(eglDisplay(), o.eglSurface, EGL_BUFFER_AGE_EXT, &o.bufferAge); | ||
243 | } | 241 | } | ||
244 | 242 | | |||
245 | } | 243 | } | ||
246 | 244 | | |||
247 | void EglGbmBackend::screenGeometryChanged(const QSize &size) | 245 | void EglGbmBackend::screenGeometryChanged(const QSize &size) | ||
248 | { | 246 | { | ||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |