diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-10-07 17:12:59 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-10-09 17:15:06 +0200 |
commit | b2de7f8583a9a2e73f0de507534158354a86ce7d (patch) | |
tree | 6aca8d5c14cf8e93988ff9c9a0b4cf4c1403499c /src/gui/rhi/qrhinull.cpp | |
parent | 8f44da1f551a94d99b6772c8c459436e455ca8cd (diff) |
rhi: Autotest rendering a textured quad
Task-number: QTBUG-78971
Change-Id: I0e7e0f3c00f9509031f7b4a8a389e51c915f01c2
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhinull.cpp')
-rw-r--r-- | src/gui/rhi/qrhinull.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhinull.cpp b/src/gui/rhi/qrhinull.cpp index 2eb55e705b..3027faa397 100644 --- a/src/gui/rhi/qrhinull.cpp +++ b/src/gui/rhi/qrhinull.cpp @@ -397,6 +397,7 @@ void QRhiNull::simulateTextureUpload(const QRhiResourceUpdateBatchPrivate::Textu QPainter painter(&texD->image[layer][level]); const QSize srcSize = subresDesc.sourceSize().isEmpty() ? src.size() : subresDesc.sourceSize(); + painter.setCompositionMode(QPainter::CompositionMode_Source); painter.drawImage(subresDesc.destinationTopLeft(), src, QRect(subresDesc.sourceTopLeft(), srcSize)); } else if (!subresDesc.data().isEmpty()) { @@ -435,6 +436,7 @@ void QRhiNull::simulateTextureCopy(const QRhiResourceUpdateBatchPrivate::Texture const QPoint srcPos = u.desc.sourceTopLeft(); QPainter painter(&dstImage); + painter.setCompositionMode(QPainter::CompositionMode_Source); painter.drawImage(QRect(dstPos, size), srcImage, QRect(srcPos, size)); } |