summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2020-05-04 10:24:12 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2020-05-05 14:20:18 +0200
commit9b21cff6f46d8e98b85996111bd8187ef2e45577 (patch)
tree59ccae04b674ae2696e95cc1c1f125c31a3d72fd /src/core
parent45a3e4c5b6e3953a8afcfafcfc83eef23b6400aa (diff)
Fix upside-down render passes with software scenegraph (again)
Originally, in 2017, this same issue was fixed by vertically mirroring the texture used for the render pass (a311b7bc9d). At this time we were using QSGSoftwareInternalImageNode for the scenegraph node and QSGSoftwareLayer for the layer texture. Then, in 2018, the implementation of QSGSoftwareInternalImageNode was changed to automatically mirror its texture IF the texture is a QSGSoftwareLayer. This was not a problem because the layer was also changed to mirror its contents, i.e. the meaning QSGSoftwareLayer::setMirrorVertical was inverted. See 10c56615d in qtdeclarative. Finally, in 2019, we switched to using QSGSoftwareImageNode for the scenegraph node of a render pass. This caused the bug to return, since this node does not automatically mirror QSGSoftwareLayer textures. Fix it again by setting setMirrorVertical(false) on the layer. The default scenegraph is not affected by this change because the default image node uses the layer's normalizedTextureSubRect to automatically undo the effect of mirroring, i.e. mirroring the default layer has no effect on output. Fixes: QTBUG-83785 Change-Id: I3594c0c7f5364799af1f543d1e4e3de52a25cd2b Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/compositor/delegated_frame_node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/compositor/delegated_frame_node.cpp b/src/core/compositor/delegated_frame_node.cpp
index 4d74937d9..2dcdfe73e 100644
--- a/src/core/compositor/delegated_frame_node.cpp
+++ b/src/core/compositor/delegated_frame_node.cpp
@@ -680,7 +680,7 @@ void DelegatedFrameNode::commit(const viz::CompositorFrame &pendingFrame,
rpLayer->setSize(toQt(pass->output_rect.size()));
rpLayer->setFormat(pass->has_transparent_background ? GL_RGBA : GL_RGB);
rpLayer->setHasMipmaps(pass->generate_mipmap);
- rpLayer->setMirrorVertical(true);
+ rpLayer->setMirrorVertical(false);
scissorRect = pass->output_rect;
} else {
renderPassParent = this;