diff options
author | Jani Hautakangas <ext-jani.hautakangas@nokia.com> | 2010-08-19 19:33:31 (GMT) |
---|---|---|
committer | Jani Hautakangas <ext-jani.hautakangas@nokia.com> | 2010-08-20 06:16:02 (GMT) |
commit | a68ad8cea58fd3bcbcf4ab5c6708896073c476b2 (patch) | |
tree | 4aa31f882b12142229ab7bcc373527e041726a94 /src/gui | |
parent | d129112034d600ea925a4199d8bad72388444335 (diff) | |
download | Qt-a68ad8cea58fd3bcbcf4ab5c6708896073c476b2.zip Qt-a68ad8cea58fd3bcbcf4ab5c6708896073c476b2.tar.gz Qt-a68ad8cea58fd3bcbcf4ab5c6708896073c476b2.tar.bz2 |
Introduce QtOpenGL module for Symbian.
Task-number: QT-2139
Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 9 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 13 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 2 |
3 files changed, 17 insertions, 7 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 670bf34..7c5e790 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1107,17 +1107,19 @@ void QSymbianControl::Draw(const TRect& controlRect) const CFbsBitmap *bitmap = s60Surface->symbianBitmap(); CWindowGc &gc = SystemGc(); - switch(qwidget->d_func()->extraData()->nativePaintMode) { + QWExtra::NativePaintMode nativePaintMode = qwidget->d_func()->extraData()->nativePaintMode; + if(qwidget->d_func()->paintOnScreen()) + nativePaintMode = QWExtra::Disable; + + switch(nativePaintMode) { case QWExtra::Disable: // Do nothing break; - case QWExtra::Blit: if (qwidget->d_func()->isOpaque) gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); gc.BitBlt(controlRect.iTl, bitmap, backingStoreRect); break; - case QWExtra::ZeroFill: if (Window().DisplayMode() == EColor16MA || Window().DisplayMode() == Q_SYMBIAN_ECOLOR16MAP) { @@ -1130,7 +1132,6 @@ void QSymbianControl::Draw(const TRect& controlRect) const gc.Clear(controlRect); }; break; - default: Q_ASSERT(false); } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index dad4848..8b8641f 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1274,7 +1274,16 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) q->setAttribute(Qt::WA_WState_Hidden); //give potential windows a bigger "pre-initial" size; create_sys() will give them a new size later +#ifdef Q_OS_SYMBIAN + if(q->inherits("QGLWidget")) { + // Don't waste GPU mem for unnecessary large egl surface + data.crect = parentWidget ? QRect(0,0,2,2) : QRect(0,0,2,2); + } else { + data.crect = parentWidget ? QRect(0,0,100,30) : QRect(0,0,360,640); + } +#else data.crect = parentWidget ? QRect(0,0,100,30) : QRect(0,0,640,480); +#endif focus_next = focus_prev = q; @@ -9957,7 +9966,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) desktopWidget = parent; bool newParent = (parent != parentWidget()) || !wasCreated || desktopWidget; -#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC) +#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN) if (newParent && parent && !desktopWidget) { if (testAttribute(Qt::WA_NativeWindow) && !qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)) parent->d_func()->enforceNativeChildren(); @@ -10611,7 +10620,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) } case Qt::WA_PaintOnScreen: d->updateIsOpaque(); -#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN) // Recreate the widget if it's already created as an alien widget and // WA_PaintOnScreen is enabled. Paint on screen widgets must have win id. // So must their children. diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 7ab9fbc..7494f92 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -486,7 +486,7 @@ void QWidgetPrivate::show_sys() #ifdef Q_WS_S60 // Lazily initialize the S60 screen furniture when the first window is shown. - if (!QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) + if (q->isWindow() && !QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) && !S60->buttonGroupContainer() && !S60->statusPane()) { if (!q->testAttribute(Qt::WA_DontShowOnScreen)) { |