diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2018-01-10 17:00:21 +0100 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2018-01-12 09:59:51 +0000 |
commit | ceba0c6b9a0ac3b50f460572ba95bbbedbbaccae (patch) | |
tree | d5a2a80d36461bcda1d1b74d272bd4ed562d4915 /src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp | |
parent | bbf3c4715a1569b26a3aa029046e26989efd6edc (diff) |
QSGSoftwarePixmapRenderer: Fix incorrect background coordinates
The pixmap renderer sets up QPainter's window coordinates system but still
positions the background node in device coordinates. If the window rectangle is
QRect(x, y, w, h) then the background rectangle will be set to QRect(0, 0, w,
h). As the rendering output is clipped to the background rectangle, this means
that the image will be left with transparent bands of x pixels on the right and
y pixels on the bottom.
Task-number: QTBUG-62867
Change-Id: I3b2c18dafda4381b0daa64f849330f51bcc743b2
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp index cad826fb27..ddc7ec5d4c 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp @@ -112,7 +112,8 @@ void QSGSoftwareRenderer::render() QElapsedTimer renderTimer; setBackgroundColor(clearColor()); - setBackgroundSize(QSize(m_paintDevice->width() / m_paintDevice->devicePixelRatio(), + setBackgroundRect(QRect(0, 0, + m_paintDevice->width() / m_paintDevice->devicePixelRatio(), m_paintDevice->height() / m_paintDevice->devicePixelRatio())); // Build Renderlist |