Make tst_QOpenGLWindow pass on platforms where the default FBO != 0

The test would fail on Wayland with window decorations enabled because there
window content is drawn to an FBO before it's blended with the window
decorations (also drawn by the client).

Task-number: QTBUG-51741
Change-Id: I7c74ad235c6a2d50231a9f863da1810675dd4eae
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
bb10
Johan Klokkhammer Helsing 2017-12-12 16:58:53 +01:00 committed by Paul Olav Tvete
parent 9e99dba4a2
commit 13f09acb66
1 changed files with 3 additions and 3 deletions

View File

@ -252,7 +252,7 @@ public:
GLuint fbo = 0xFFFF;
QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *) &fbo);
QCOMPARE(fbo, GLuint(0));
QCOMPARE(fbo, QOpenGLContext::currentContext()->defaultFramebufferObject());
}
void paintGL() override {
@ -264,7 +264,7 @@ public:
// Using PartialUpdateBlend so paintGL() targets a user fbo, not the default.
GLuint fbo = 0xFFFF;
QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *) &fbo);
QVERIFY(fbo != 0);
QVERIFY(fbo != QOpenGLContext::currentContext()->defaultFramebufferObject());
QCOMPARE(fbo, defaultFramebufferObject());
}
@ -276,7 +276,7 @@ public:
GLuint fbo = 0xFFFF;
QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *) &fbo);
QCOMPARE(fbo, GLuint(0));
QCOMPARE(fbo, QOpenGLContext::currentContext()->defaultFramebufferObject());
}
};