diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-02-21 18:44:31 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-22 18:44:46 +0000 |
commit | d8bc88775dd13335ad8912e16e535dd34d813e67 (patch) | |
tree | 55807d0bd36dca4c63968c9c02f05952e6732d26 | |
parent | aab97fa528f52b3a11cd816194c4c02a9afe0981 (diff) |
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.
Change-Id: Iaabc6309cb42cfdd624321863a5504cdeb01275d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 167b22c7010363275f2895ff4965529b35c36eac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/quick/items/qquickrendercontrol.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp index b5f487ffc6..c4829d3514 100644 --- a/src/quick/items/qquickrendercontrol.cpp +++ b/src/quick/items/qquickrendercontrol.cpp @@ -330,6 +330,7 @@ bool QQuickRenderControl::initialize() params.initialSurfacePixelSize = d->window->size() * d->window->effectiveDevicePixelRatio(); params.maybeSurface = d->window; renderContext->initialize(¶ms); + d->initialized = true; } else { qWarning("QRhi is only compatible with default adaptation"); return false; |