iOS: Create QIOSBackingStore paint device lazily in paintDevice()

Instead of constructor.

Change-Id: I98cddd3f39add3e6f787c858b4d629325cc0f852
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
bb10
Tor Arne Vestbø 2012-12-10 16:40:40 +01:00
parent a1c9f56552
commit 8dde67fcd3
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}