Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/wayland/egl_wayland_backend.cpp
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Line(s) | 283 | for (auto *output: qAsConst(m_outputs)) { | |||
---|---|---|---|---|---|
284 | makeContextCurrent(output); | 284 | makeContextCurrent(output); | ||
285 | presentOnSurface(output); | 285 | presentOnSurface(output); | ||
286 | } | 286 | } | ||
287 | } | 287 | } | ||
288 | 288 | | |||
289 | void EglWaylandBackend::presentOnSurface(EglWaylandOutput *output) | 289 | void EglWaylandBackend::presentOnSurface(EglWaylandOutput *output) | ||
290 | { | 290 | { | ||
291 | output->m_waylandOutput->surface()->setupFrameCallback(); | 291 | output->m_waylandOutput->surface()->setupFrameCallback(); | ||
292 | if (!m_swapping) { | ||||
293 | m_swapping = true; | ||||
292 | Compositor::self()->aboutToSwapBuffers(); | 294 | Compositor::self()->aboutToSwapBuffers(); | ||
295 | } | ||||
293 | 296 | | |||
294 | if (supportsBufferAge()) { | 297 | if (supportsBufferAge()) { | ||
295 | eglSwapBuffers(eglDisplay(), output->m_eglSurface); | 298 | eglSwapBuffers(eglDisplay(), output->m_eglSurface); | ||
296 | eglQuerySurface(eglDisplay(), output->m_eglSurface, EGL_BUFFER_AGE_EXT, &output->m_bufferAge); | 299 | eglQuerySurface(eglDisplay(), output->m_eglSurface, EGL_BUFFER_AGE_EXT, &output->m_bufferAge); | ||
297 | } else { | 300 | } else { | ||
298 | eglSwapBuffers(eglDisplay(), output->m_eglSurface); | 301 | eglSwapBuffers(eglDisplay(), output->m_eglSurface); | ||
299 | } | 302 | } | ||
300 | 303 | | |||
Show All 15 Lines | |||||
316 | { | 319 | { | ||
317 | return new EglWaylandTexture(texture, this); | 320 | return new EglWaylandTexture(texture, this); | ||
318 | } | 321 | } | ||
319 | 322 | | |||
320 | QRegion EglWaylandBackend::prepareRenderingFrame() | 323 | QRegion EglWaylandBackend::prepareRenderingFrame() | ||
321 | { | 324 | { | ||
322 | eglWaitNative(EGL_CORE_NATIVE_ENGINE); | 325 | eglWaitNative(EGL_CORE_NATIVE_ENGINE); | ||
323 | startRenderTimer(); | 326 | startRenderTimer(); | ||
327 | m_swapping = false; | ||||
324 | return QRegion(); | 328 | return QRegion(); | ||
325 | } | 329 | } | ||
326 | 330 | | |||
327 | QRegion EglWaylandBackend::prepareRenderingForScreen(int screenId) | 331 | QRegion EglWaylandBackend::prepareRenderingForScreen(int screenId) | ||
328 | { | 332 | { | ||
329 | auto *output = m_outputs.at(screenId); | 333 | auto *output = m_outputs.at(screenId); | ||
330 | makeContextCurrent(output); | 334 | makeContextCurrent(output); | ||
331 | if (supportsBufferAge()) { | 335 | if (supportsBufferAge()) { | ||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |