diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2020-04-03 12:40:27 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2020-04-09 08:37:00 +0200 |
commit | cee8776777e72f2820f04f1df00e2aeebbf9af49 (patch) | |
tree | 0e3398573b9b0ce51a4cde7bbadccef3337f046b | |
parent | 07788b74f3cd2d257abe70c13f38d2b0ebb230ba (diff) |
Fix DisplaySoftwareOutputSurface swap with transparent background
Change QPainter's compositing mode from the default SourceOver (alpha-blending)
to Source (copy).
Fixes: QTBUG-81250
Change-Id: I670772b77cdd89ec42de96808608693ad50f726a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | src/core/compositor/display_software_output_surface.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/compositor/display_software_output_surface.cpp b/src/core/compositor/display_software_output_surface.cpp index 5d3c7a6f6..ba99799f0 100644 --- a/src/core/compositor/display_software_output_surface.cpp +++ b/src/core/compositor/display_software_output_surface.cpp @@ -137,7 +137,9 @@ QSGNode *DisplaySoftwareOutputSurface::Device::updatePaintNode( skPixmap.rowBytes(), imageFormat(skPixmap.colorType())); if (m_image.size() == image.size()) { QRect damageRect = toQt(damage_rect_); - QPainter(&m_image).drawImage(damageRect, image, damageRect); + QPainter painter(&m_image); + painter.setCompositionMode(QPainter::CompositionMode_Source); + painter.drawImage(damageRect, image, damageRect); } else { m_image = image; m_image.detach(); |