summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ham <christopher.ham@nokia.com>2012-01-25 10:50:13 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-10 07:24:29 +0100
commitb06f7aa36c9c80211e662b30d248a1e5192b0460 (patch)
tree18395d61bdb34d236e0ec43603a2f63a51b8d9b9
parentba102bece5052c7f04c1ebf8b1f3d0973793dfe0 (diff)
Fix for QTBUG-23862 - Blank screen in Viewport
This patch fixes an issue that causes Qt3D's Viewport to be blank when its renderMode property is set to BufferedRender. (QSGPainterNode's RenderTarget is set to FramebufferObject) Task-number: QTBUG-23862 Change-Id: Ic7a333f79ecf1aa153ef42e213644a17243a3580 Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
-rw-r--r--src/quick/scenegraph/util/qsgpainternode.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/quick/scenegraph/util/qsgpainternode.cpp b/src/quick/scenegraph/util/qsgpainternode.cpp
index d1a1accd5b..d4a810c30a 100644
--- a/src/quick/scenegraph/util/qsgpainternode.cpp
+++ b/src/quick/scenegraph/util/qsgpainternode.cpp
@@ -154,13 +154,12 @@ void QSGPainterNode::paint()
{
QRect dirtyRect = m_dirtyRect.isNull() ? QRect(0, 0, m_size.width(), m_size.height()) : m_dirtyRect;
- if (m_image.isNull())
- return;
-
QPainter painter;
- if (m_actualRenderTarget == QQuickPaintedItem::Image)
+ if (m_actualRenderTarget == QQuickPaintedItem::Image) {
+ if (m_image.isNull())
+ return;
painter.begin(&m_image);
- else {
+ } else {
if (!m_gl_device) {
m_gl_device = new QOpenGLPaintDevice(m_fboSize);
m_gl_device->setPaintFlipped(true);