From a7c77bd46ef85bae624e829cb2a02110ec60b318 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 16 Nov 2011 12:17:04 +0100 Subject: Partially revert "Set the graphics system name in the graphics system factory." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This actually breaks runtime graphicssystem in all configurations as far as I can tell, but definitely in the following setup: -graphicssystem runtime -runtimegraphicssystem meego Qt creates the runtime graphicssystem, which then sees it should create a MeeGo GS instance. This then calls qgraphicssystemfactory::create("meego"), which was overwriting graphics_system_name (incorrectly!) Harmattan's Qt does not do this, and thus, is able to switch graphicssystems correctly. This partially reverts commit b595c2fbe0fa354190b713ef09dd1f348e22e2b6. Merge-request: 2718 Reviewed-by: Samuel Rødal --- src/gui/painting/qgraphicssystemfactory.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/painting/qgraphicssystemfactory.cpp b/src/gui/painting/qgraphicssystemfactory.cpp index 01ece09..b817a90 100644 --- a/src/gui/painting/qgraphicssystemfactory.cpp +++ b/src/gui/painting/qgraphicssystemfactory.cpp @@ -45,7 +45,6 @@ #include "qmutex.h" #include "qapplication.h" -#include #include "qgraphicssystem_raster_p.h" #include "qgraphicssystem_runtime_p.h" #include "qdebug.h" @@ -80,7 +79,6 @@ QGraphicsSystem *QGraphicsSystemFactory::create(const QString& key) } #endif - QApplicationPrivate::graphics_system_name = system; if (system == QLatin1String("raster")) return new QRasterGraphicsSystem; else if (system == QLatin1String("runtime")) -- cgit v0.12 From 0ceab866c76e0d9eb17bc1f3d42af06c0033560b Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 16 Nov 2011 12:17:05 +0100 Subject: Allow setting the runtime graphicssystem via QT_DEFAULT_RUNTIME_SYSTEM. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is useful on some SGX boards, where each GL context locks a huge chunk into RAM, but we don't want to set the default runtime system to 'meego' as this requires certain EGL extensions. Merge-request: 2718 Reviewed-by: Samuel Rødal --- src/gui/painting/qgraphicssystem_runtime.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index 19b29a1..6d3f16e 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -330,11 +330,15 @@ QRuntimeGraphicsSystem::QRuntimeGraphicsSystem() { QApplicationPrivate::runtime_graphics_system = true; + if (!qgetenv("QT_DEFAULT_RUNTIME_SYSTEM").isEmpty()) { + m_graphicsSystemName = QString::fromLocal8Bit(qgetenv("QT_DEFAULT_RUNTIME_SYSTEM")); + } else { #ifdef QT_DEFAULT_RUNTIME_SYSTEM - m_graphicsSystemName = QLatin1String(QT_DEFAULT_RUNTIME_SYSTEM); - if (m_graphicsSystemName.isNull()) + m_graphicsSystemName = QLatin1String(QT_DEFAULT_RUNTIME_SYSTEM); + if (m_graphicsSystemName.isNull()) #endif - m_graphicsSystemName = QLatin1String("raster"); + m_graphicsSystemName = QLatin1String("raster"); + } #ifdef Q_OS_SYMBIAN m_windowSurfaceDestroyPolicy = DestroyAfterFirstFlush; -- cgit v0.12