diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-03-10 11:03:45 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-03-16 07:17:15 (GMT) |
commit | 7c99a5273bea6f071efcd8441bedc1b768cc1d7a (patch) | |
tree | e479d99c429ecd4e89e84887ef6b227b846e4375 /src/gui/painting | |
parent | f4244785cb8875b177274db485a346605f05ed7c (diff) | |
download | Qt-7c99a5273bea6f071efcd8441bedc1b768cc1d7a.zip Qt-7c99a5273bea6f071efcd8441bedc1b768cc1d7a.tar.gz Qt-7c99a5273bea6f071efcd8441bedc1b768cc1d7a.tar.bz2 |
Added automatic graphicssystem switching on meego when app is minimized.
When all top-level widgets are minimized we switch to raster to reduce
GPU memory consumption. We switch back to graphicssystem meego when at
least one top-level widget is shown normally again. The switching only
applies when the runtime graphicssystem is being used. The switching
only applies when the runtime graphicssystem is being used.
Task-number: QTBUG-18013
Reviewed-by: Armin Berres
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qgraphicssystem_runtime.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index 5841d40..33652ee 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -394,7 +394,10 @@ void QRuntimeGraphicsSystem::setGraphicsSystem(const QString &name) if(m_windowSurfaceDestroyPolicy == DestroyAfterFirstFlush) proxy->m_pendingWindowSurface.reset(proxy->m_windowSurface.take()); - proxy->m_windowSurface.reset(m_graphicsSystem->createWindowSurface(widget)); + QWindowSurface *newWindowSurface = m_graphicsSystem->createWindowSurface(widget); + newWindowSurface->setGeometry(proxy->geometry()); + + proxy->m_windowSurface.reset(newWindowSurface); qt_widget_private(widget)->invalidateBuffer(widget->rect()); } |