diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 12:30:27 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:10:33 +0200 |
commit | 920d96c4732ea2135553c843e811250d64fc977f (patch) | |
tree | acde1088c0b5e859c2dda8c58fb9cdb6b0580304 /src | |
parent | 99145c93def4210f9aca2d95331041e07e838780 (diff) |
Make sure to update the content fbo for QWaylandGLContext
Change-Id: I09f34fe3ea6bb3b57e49c63284f48d8af908ec1a
Diffstat (limited to 'src')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h | 1 | ||||
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h index 60722d168..400efcc8b 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h +++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h @@ -60,6 +60,7 @@ public: EGLSurface eglSurface() const; GLuint contentFBO() const; GLuint contentTexture() const; + bool needToUpdateContentFBO() const { return decoration() && (m_resize || !m_contentFBO); } QSurfaceFormat format() const; diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index 18ed1d61e..faaa6aef8 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -371,7 +371,7 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface) QWaylandEglWindow *window = static_cast<QWaylandEglWindow *>(surface); EGLSurface eglSurface = window->eglSurface(); - if (eglSurface != EGL_NO_SURFACE && eglGetCurrentContext() == m_context && eglGetCurrentSurface(EGL_DRAW) == eglSurface) + if (!window->needToUpdateContentFBO() && (eglSurface != EGL_NO_SURFACE && eglGetCurrentContext() == m_context && eglGetCurrentSurface(EGL_DRAW) == eglSurface)) return true; window->setCanResize(false); |