Using the requested format (we don't have anything else since the platform
window is gone) is wrong on EGL implementations that offer a different set
of configurations for window and pbuffer surfaces, because we may end up
with a pbuffer surface that is incompatible with the context/window due to
having different color buffer sizes.
To be absolutely sure that the surface is compatible, store the actual
surface format so that it is available even after the platform window is
gone.
Change-Id: Id17c25439c463d4c37af95fc90f336d3f67c6427
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Window win;
win.window = window;
+ win.actualWindowFormat = window->format();
win.thread = new QSGRenderThread(this, QQuickWindowPrivate::get(window)->context);
win.timerId = 0;
win.updateDuringSync = false;
if (!window->handle()) {
QSG_GUI_DEBUG(w->window, " - using fallback surface");
fallback = new QOffscreenSurface();
- fallback->setFormat(window->requestedFormat());
+ fallback->setFormat(w->actualWindowFormat);
fallback->create();
}
struct Window {
QQuickWindow *window;
QSGRenderThread *thread;
+ QSurfaceFormat actualWindowFormat;
int timerId;
uint updateDuringSync : 1;
};