diff options
author | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-03-09 13:15:02 (GMT) |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-03-10 15:16:46 (GMT) |
commit | 555f52c498c3ba67041c880701a66224e7b321b0 (patch) | |
tree | 113703bdf342cf98f9d741185a4fb5193a78adc5 /src/gui/kernel/qwidget_s60.cpp | |
parent | 433e4380c98b9369a7d55894e9d34f8c87ba06e9 (diff) | |
download | Qt-555f52c498c3ba67041c880701a66224e7b321b0.zip Qt-555f52c498c3ba67041c880701a66224e7b321b0.tar.gz Qt-555f52c498c3ba67041c880701a66224e7b321b0.tar.bz2 |
Don't use EGL surfaces for translucency with 32MB GPU chip.
Add dynamic GPU chip detection on Symbian to decide if
translucent EGL surfaces can be used. With 32MB GPU memory
there is not enough memory to create for example transparent
video overlay widgets and that's why hw surfaces must not
be used.
Task-number: QTBUG-18024
Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index be212fb..62d09fe 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -813,17 +813,21 @@ void QWidgetPrivate::s60UpdateIsOpaque() RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow()); #ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE - window->SetSurfaceTransparency(!isOpaque); - extra->topextra->nativeWindowTransparencyEnabled = !isOpaque; -#else + if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces) { + window->SetSurfaceTransparency(!isOpaque); + extra->topextra->nativeWindowTransparencyEnabled = !isOpaque; + return; + } +#endif if (!isOpaque) { const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA)); if (window->SetTransparencyAlphaChannel() == KErrNone) { window->SetBackgroundColor(TRgb(255, 255, 255, 0)); extra->topextra->nativeWindowTransparencyEnabled = 1; - if (extra->topextra->backingStore.data() && - QApplicationPrivate::graphics_system_name == QLatin1String("openvg")) { + if (extra->topextra->backingStore.data() && ( + QApplicationPrivate::graphics_system_name == QLatin1String("openvg") + || QApplicationPrivate::graphics_system_name == QLatin1String("opengl"))) { // Semi-transparent EGL surfaces aren't supported. We need to // recreate backing store to get translucent surface (raster surface). extra->topextra->backingStore.create(q); @@ -834,7 +838,6 @@ void QWidgetPrivate::s60UpdateIsOpaque() window->SetTransparentRegion(TRegionFix<1>()); extra->topextra->nativeWindowTransparencyEnabled = 0; } -#endif } void QWidgetPrivate::setWindowIcon_sys(bool forceReset) |