Home
Phabricator
Search
Log In
Paste
P357
Masterwork From Distant Lands
Active
Public
Actions
Authored by
apol
on Mar 26 2019, 4:01 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
diff --git a/plugins/platforms/wayland/egl_wayland_backend.cpp b/plugins/platforms/wayland/egl_wayland_backend.cpp
index 9113a96f3..74f285bfb 100644
--- a/plugins/platforms/wayland/egl_wayland_backend.cpp
+++ b/plugins/platforms/wayland/egl_wayland_backend.cpp
@@ -289,7 +289,10 @@ void EglWaylandBackend::present()
void EglWaylandBackend::presentOnSurface(EglWaylandOutput *output)
{
output->m_waylandOutput->surface()->setupFrameCallback();
- Compositor::self()->aboutToSwapBuffers();
+ if (!m_swapping) {
+ m_swapping = true;
+ Compositor::self()->aboutToSwapBuffers();
+ }
if (supportsBufferAge()) {
eglSwapBuffers(eglDisplay(), output->m_eglSurface);
@@ -321,6 +324,7 @@ QRegion EglWaylandBackend::prepareRenderingFrame()
{
eglWaitNative(EGL_CORE_NATIVE_ENGINE);
startRenderTimer();
+ m_swapping = false;
return QRegion();
}
diff --git a/plugins/platforms/wayland/egl_wayland_backend.h b/plugins/platforms/wayland/egl_wayland_backend.h
index 86b5c74e5..98a31b64c 100644
--- a/plugins/platforms/wayland/egl_wayland_backend.h
+++ b/plugins/platforms/wayland/egl_wayland_backend.h
@@ -109,6 +109,7 @@ private:
WaylandBackend *m_backend;
QVector<EglWaylandOutput*> m_outputs;
bool m_havePlatformBase;
+ bool m_swapping = false;
friend class EglWaylandTexture;
};
apol
edited the content of this paste.
(Show Details)
Mar 26 2019, 4:01 PM
apol
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
Log In to Comment