aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/scenegraph/softwarecontext/context.cpp1
-rw-r--r--src/plugins/scenegraph/softwarecontext/context.h2
-rw-r--r--src/plugins/scenegraph/softwarecontext/softwarelayer.cpp1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/scenegraph/softwarecontext/context.cpp b/src/plugins/scenegraph/softwarecontext/context.cpp
index d25406ce2d..dafbfdaae9 100644
--- a/src/plugins/scenegraph/softwarecontext/context.cpp
+++ b/src/plugins/scenegraph/softwarecontext/context.cpp
@@ -147,6 +147,7 @@ void PixmapRenderer::render(QPixmap *target)
target->fill(clearColor());
QPainter painter(target);
painter.setRenderHint(QPainter::Antialiasing);
+ painter.setWindow(m_projectionRect);
RenderingVisitor(&painter).visitChildren(rootNode());
}
diff --git a/src/plugins/scenegraph/softwarecontext/context.h b/src/plugins/scenegraph/softwarecontext/context.h
index fc38e7d7e0..92a0f31d8a 100644
--- a/src/plugins/scenegraph/softwarecontext/context.h
+++ b/src/plugins/scenegraph/softwarecontext/context.h
@@ -66,6 +66,8 @@ public:
virtual void render();
void render(QPixmap *target);
+
+ QRect m_projectionRect;
};
class RenderContext : public QSGRenderContext
diff --git a/src/plugins/scenegraph/softwarecontext/softwarelayer.cpp b/src/plugins/scenegraph/softwarecontext/softwarelayer.cpp
index 037c73a08e..61f5aa031f 100644
--- a/src/plugins/scenegraph/softwarecontext/softwarelayer.cpp
+++ b/src/plugins/scenegraph/softwarecontext/softwarelayer.cpp
@@ -196,6 +196,7 @@ void SoftwareLayer::grab()
m_renderer->setDeviceRect(m_size);
m_renderer->setViewportRect(m_size);
+ m_renderer->m_projectionRect = m_rect.toRect();
m_renderer->setClearColor(Qt::transparent);
m_renderer->renderScene();