summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-12-10 16:40:40 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:55:50 +0100
commit8dde67fcd33fc35fe95262bd7acb6f7b5143fead (patch)
tree282c0426a2843681c6b8d256dc1cdf6ef5c81856 /src/plugins/platforms
parenta1c9f565521f971adbb1e6aad6b82d194f1a1905 (diff)
iOS: Create QIOSBackingStore paint device lazily in paintDevice()
Instead of constructor. Change-Id: I98cddd3f39add3e6f787c858b4d629325cc0f852 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/ios/qiosbackingstore.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/qiosbackingstore.mm b/src/plugins/platforms/ios/qiosbackingstore.mm
index 6cefc03377..dfa41f0003 100644
--- a/src/plugins/platforms/ios/qiosbackingstore.mm
+++ b/src/plugins/platforms/ios/qiosbackingstore.mm
@@ -69,12 +69,13 @@ void QIOSBackingStore::beginPaint(const QRegion &)
window()->setSurfaceType(QSurface::OpenGLSurface);
m_context->makeCurrent(window());
- if (!m_device)
- m_device = new QOpenGLPaintDevice(window()->size());
}
QPaintDevice *QIOSBackingStore::paintDevice()
{
+ if (!m_device)
+ m_device = new QOpenGLPaintDevice(window()->size());
+
return m_device;
}