diff options
| author | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-10-21 12:01:26 +0200 |
|---|---|---|
| committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-10-21 15:36:26 +0200 |
| commit | d59b2fde5eef39cc1735cadf2327f99ca6055306 (patch) | |
| tree | 2a9b8aa995f8ab4ef7b8da309fb224796dd901b0 /src | |
| parent | 65279d6e9dfbccf1b97884a1c19111d6ebb3828f (diff) | |
Fix texture-based native child widget stretching
The new rhi-based approach to compositing has a difference in transform
calculation which becomes relevant with native child widgets (so when
the flush offset is > 0). This is incorrect, so restore how 6.3 and
earlier did this calculation.
Pick-to: 6.4
Fixes: QTBUG-107814
Change-Id: I98fe866d6c857343f25f39450ee60fd307bcdb63
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/gui/painting/qbackingstoredefaultcompositor.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/painting/qbackingstoredefaultcompositor.cpp b/src/gui/painting/qbackingstoredefaultcompositor.cpp index 8f624210da0..076ae3e9848 100644 --- a/src/gui/painting/qbackingstoredefaultcompositor.cpp +++ b/src/gui/painting/qbackingstoredefaultcompositor.cpp @@ -508,8 +508,7 @@ QPlatformBackingStore::FlushResult QBackingStoreDefaultCompositor::flush(QPlatfo if (m_texture) { // The backingstore is for the entire tlw. // In case of native children offset tells the position relative to the tlw. - const QRect textureRect = QRect(QPoint(), m_texture->pixelSize()); - const QRect srcRect = toBottomLeftRect(textureRect.translated(deviceWindowOffset), m_texture->pixelSize().height()); + const QRect srcRect = toBottomLeftRect(deviceWindowRect.translated(deviceWindowOffset), m_texture->pixelSize().height()); const QMatrix3x3 source = sourceTransform(srcRect, m_texture->pixelSize(), origin); QMatrix4x4 target; // identity if (invertTargetY) |
