Fix tracking of sg initialized state in rendercontrol

The initialized = true statement either went missing or it never was
there. This has zero effect on the common usage where the client does
not bother with invalidate(), but rather destroys the
QQuickRenderControl. However, more complex usages, such as in
QQuickWidget do need to invalidate for various reasons, without
destroying the entire QQuickRenderControl.

Pick-to: 6.3 6.2
Change-Id: Iaabc6309cb42cfdd624321863a5504cdeb01275d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
Laszlo Agocs 2022-02-21 18:44:31 +01:00
parent c27e32def2
commit 167b22c701
1 changed files with 1 additions and 0 deletions

View File

@ -331,6 +331,7 @@ bool QQuickRenderControl::initialize()
params.initialSurfacePixelSize = d->window->size() * d->window->effectiveDevicePixelRatio();
params.maybeSurface = d->window;
renderContext->initialize(&params);
d->initialized = true;
} else {
qWarning("QRhi is only compatible with default adaptation");
return false;