From 9d88ff485e93e9701719263ce0a46cb86b0398ca Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Thu, 2 Sep 2010 13:03:50 +0100 Subject: Prevent null pointer dereference Task-number: QTBUG-13204 Reviewed-by: axis --- src/gui/kernel/qapplication_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 4ed4ba3..21f930e 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -129,7 +129,7 @@ void QS60Data::setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, boo statusPaneVisibilityChanged = (s->IsVisible() != statusPaneVisible); s->MakeVisible(statusPaneVisible); } - if (buttonGroupVisibilityChanged && !statusPaneVisibilityChanged) + if (buttonGroupVisibilityChanged && !statusPaneVisibilityChanged && QApplication::activeWindow()) // Ensure that control rectangle is updated static_cast(QApplication::activeWindow()->winId())->handleClientAreaChange(); } -- cgit v0.12 From 55b067d14d8c12bd29b03c17e0281a11a49f95ca Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Thu, 2 Sep 2010 13:07:59 +0100 Subject: Update QDesktopWidget geometry when S60 furniture visibility changes Task-number: QTBUG-13204 Reviewed-by: axis --- src/gui/kernel/qapplication_s60.cpp | 6 ++++++ src/gui/kernel/qwidget_s60.cpp | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 21f930e..e937918 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -129,6 +129,12 @@ void QS60Data::setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, boo statusPaneVisibilityChanged = (s->IsVisible() != statusPaneVisible); s->MakeVisible(statusPaneVisible); } + if (buttonGroupVisibilityChanged || statusPaneVisibilityChanged) { + const QSize size = qt_TRect2QRect(static_cast(S60->appUi())->ClientRect()).size(); + const QSize oldSize; // note that QDesktopWidget::resizeEvent ignores the QResizeEvent contents + QResizeEvent event(size, oldSize); + QApplication::instance()->sendEvent(QApplication::desktop(), &event); + } if (buttonGroupVisibilityChanged && !statusPaneVisibilityChanged && QApplication::activeWindow()) // Ensure that control rectangle is updated static_cast(QApplication::activeWindow()->winId())->handleClientAreaChange(); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index fc13c93..c98c05a 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -503,8 +503,10 @@ void QWidgetPrivate::show_sys() // Can't use AppUi directly because it privately inherits from MEikStatusPaneObserver. QSymbianControl *desktopControl = static_cast(QApplication::desktop()->winId()); S60->statusPane()->SetObserver(desktopControl); - if (isFullscreen) - S60->statusPane()->MakeVisible(false); + if (isFullscreen) { + const bool cbaVisible = S60->buttonGroupContainer() && S60->buttonGroupContainer()->IsVisible(); + S60->setStatusPaneAndButtonGroupVisibility(false, cbaVisible); + } } } } -- cgit v0.12 From f8c789a70ee3061dd81307ead82c47bb0f8041d5 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Thu, 2 Sep 2010 15:30:37 +0300 Subject: Document known limitations in UI performance on S60 5.0 based devices. Task-number: QTBUG-11333 Reviewed-by: axis --- doc/src/images/symbian-draw-pixmap-sequence.png | Bin 0 -> 5724 bytes doc/src/images/symbian-qt-draw-pixmap-sequence.png | Bin 0 -> 9141 bytes .../symbian-qt-rendering-stack-non-screenplay.png | Bin 0 -> 52802 bytes .../symbian-rendering-stack-non-screenplay.png | Bin 0 -> 44655 bytes doc/src/platforms/platform-notes.qdoc | 50 +++++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 doc/src/images/symbian-draw-pixmap-sequence.png create mode 100644 doc/src/images/symbian-qt-draw-pixmap-sequence.png create mode 100644 doc/src/images/symbian-qt-rendering-stack-non-screenplay.png create mode 100644 doc/src/images/symbian-rendering-stack-non-screenplay.png diff --git a/doc/src/images/symbian-draw-pixmap-sequence.png b/doc/src/images/symbian-draw-pixmap-sequence.png new file mode 100644 index 0000000..05e3739 Binary files /dev/null and b/doc/src/images/symbian-draw-pixmap-sequence.png differ diff --git a/doc/src/images/symbian-qt-draw-pixmap-sequence.png b/doc/src/images/symbian-qt-draw-pixmap-sequence.png new file mode 100644 index 0000000..f7546f4 Binary files /dev/null and b/doc/src/images/symbian-qt-draw-pixmap-sequence.png differ diff --git a/doc/src/images/symbian-qt-rendering-stack-non-screenplay.png b/doc/src/images/symbian-qt-rendering-stack-non-screenplay.png new file mode 100644 index 0000000..9e1997d Binary files /dev/null and b/doc/src/images/symbian-qt-rendering-stack-non-screenplay.png differ diff --git a/doc/src/images/symbian-rendering-stack-non-screenplay.png b/doc/src/images/symbian-rendering-stack-non-screenplay.png new file mode 100644 index 0000000..80cb078 Binary files /dev/null and b/doc/src/images/symbian-rendering-stack-non-screenplay.png differ diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 94b9856..6f533ae 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -526,6 +526,56 @@ platform in use. If available, it is loaded in preference over the MMF plugin. If the Helix plugin fails to load, the MMF plugin, if present on the device, will be loaded instead. + + \section1 UI Performance in devices prior to Symbian^3 + + Qt uses the QPainter class to perform low-level painting on widgets and + other paint devices. QPainter provides functions to draw complex shapes, + aligned text and pixmaps. It can also do vector path clipping, coordinate + transformations and Porter-Duff composition. If the underlying graphics + architecture does not support all of these operations then Qt uses the + raster graphics system for rendering. + + Most of the Symbian devices prior to Symbian^3 use a non-ScreenPlay + graphics architecture which does not have native support for all functions + provided by QPainter. In non-ScreenPlay devices Qt uses the raster + graphics system by default which has a performance penalty when compared + to native Symbian rendering. + + In order to be able to perform all functions provided by QPainter, the + raster graphics system needs to have pixel level framebuffer access. To + make this possible in non-ScreenPlay devices Qt has to create an + additional offscreen buffer that is the target for all Qt rendering + operations. Qt renders the widget tree to the offscreen buffer and the + offscreen buffer is blitted to the framebuffer via Symbian Window Server. + + The following table shows the rendering stacks of native Symbian and Qt in + non-ScreenPlay devices. + + \table + \header \o Symbian + \o Qt + \row \o \image symbian-rendering-stack-non-screenplay.png + \o \image symbian-qt-rendering-stack-non-screenplay.png + \endtable + + The following diagrams show a simplified sequence of drawing a pixmap in + a non-ScreenPlay device. + + \table + \header \o Symbian + \row \o \image symbian-draw-pixmap-sequence.png + \endtable + + \table + \header \o Qt + \row \o \image symbian-qt-draw-pixmap-sequence.png + \endtable + + When compared to a native Symbian application, Qt does an additional blit + to the offscreen buffer before drawing to the framebuffer. That is the + performance penalty which needs to be paid to get all functionality + provided by QPainter in non-ScreenPlay architecture. */ /*! -- cgit v0.12