diff options
author | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-09-09 15:51:37 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-09-09 16:56:50 +0300 |
commit | ccc5a0357c9b046ea89b63b221d96f85bd0bcd00 (patch) | |
tree | 9d0853b3541f55326b9464a05bab974a1efd32ab /src/plugins/scenegraph/softwarecontext/softwarelayer.cpp | |
parent | fa8b3f078318c5a2aa0dd48348f518083f08d2f7 (diff) |
Fix rendering regressions with texture mirroring.
Change-Id: I8d48b9332712aa30857402a93a35c77f22fae221
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
Diffstat (limited to 'src/plugins/scenegraph/softwarecontext/softwarelayer.cpp')
-rw-r--r-- | src/plugins/scenegraph/softwarecontext/softwarelayer.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/scenegraph/softwarecontext/softwarelayer.cpp b/src/plugins/scenegraph/softwarecontext/softwarelayer.cpp index 13531c5549..8fcf3abc8f 100644 --- a/src/plugins/scenegraph/softwarecontext/softwarelayer.cpp +++ b/src/plugins/scenegraph/softwarecontext/softwarelayer.cpp @@ -216,12 +216,11 @@ void SoftwareLayer::grab() m_renderer->setDeviceRect(m_size); m_renderer->setViewportRect(m_size); - m_renderer->m_mirrorHorizontal = m_mirrorHorizontal; - m_renderer->m_mirrorVertical = m_mirrorVertical; - m_renderer->m_projectionRect = QRect(m_rect.x() * m_device_pixel_ratio, - m_rect.y() * m_device_pixel_ratio, - m_rect.width() * m_device_pixel_ratio, - m_rect.height() * m_device_pixel_ratio); + QRect mirrored(m_mirrorHorizontal ? m_rect.right() * m_device_pixel_ratio : m_rect.left() * m_device_pixel_ratio, + m_mirrorVertical ? m_rect.top() * m_device_pixel_ratio : m_rect.bottom() * m_device_pixel_ratio, + m_mirrorHorizontal ? -m_rect.width() * m_device_pixel_ratio : m_rect.width() * m_device_pixel_ratio, + m_mirrorVertical ? m_rect.height() * m_device_pixel_ratio : -m_rect.height() * m_device_pixel_ratio); + m_renderer->m_projectionRect = mirrored; m_renderer->setClearColor(Qt::transparent); m_renderer->renderScene(); |