aboutsummaryrefslogtreecommitdiff
path: root/mthemedaemon
diff options
context:
space:
mode:
authorArmin Berres <armin.berres@basyskom.de>2010-10-06 16:10:01 +0200
committerStanislav Ionascu <stanislav.ionascu@nokia.com>2010-10-26 13:34:45 +0300
commit631a84bc8489ded19757654f0251d8ba67890d12 (patch)
treed641c4be63ea514501e904f0a8cc7ccd46d88a9a /mthemedaemon
parent0f1b862a78251df8e66814af0ebf19d9c9d79572 (diff)
Changes: add support for the meego graphicssystem
RevBy: Michael Dominic K., Stanislav Ionascu, Daniel d'Andrada, Tomas Junnonen Details: The meego graphicssystem does not need a QGLWidget anymore to do hardware rendering. The QGLContext will be created automatically behind the scenes. Therefor when running with the meego graphcissystem the QGLWidget will not be created anymore. If the native graphicssystem is used everything works as before. Before theme assets have been shared between themedaemon and clients via X handles. With the meego graphicssystem a new way of sharing is introduced. A shared QPixmap will be backed up by two images: One texture used for hardware rendering and one so called soft image used if the pixmap us used for software rendering. The texture will be shared via a gl extension between the processed, the image is shared via shared memory. Ordinary pixmaps are not backed up by XPixmaps anymore, they will use raster now.
Diffstat (limited to 'mthemedaemon')
-rw-r--r--mthemedaemon/main.cpp5
-rw-r--r--mthemedaemon/mthemedaemon.pro8
-rw-r--r--mthemedaemon/mthemedaemonserver.cpp10
-rw-r--r--mthemedaemon/mthemedaemonserver.h2
4 files changed, 17 insertions, 8 deletions
diff --git a/mthemedaemon/main.cpp b/mthemedaemon/main.cpp
index 8705b0f5..f5576411 100644
--- a/mthemedaemon/main.cpp
+++ b/mthemedaemon/main.cpp
@@ -45,8 +45,9 @@ int main(int argc, char **argv)
signal(SIGINT, sigclose);
signal(SIGHUP, sighup);
- QApplication::setGraphicsSystem(QLatin1String("native"));
-
+ // make sure we are not loading the maemo6 qt style which
+ // could interfere with us
+ QApplication::setStyle("windows");
QApplication app(argc, argv);
// Apply custom server address, if the "-address" has been passed as argument
diff --git a/mthemedaemon/mthemedaemon.pro b/mthemedaemon/mthemedaemon.pro
index 98a78802..7331f0c8 100644
--- a/mthemedaemon/mthemedaemon.pro
+++ b/mthemedaemon/mthemedaemon.pro
@@ -13,6 +13,10 @@ DEPENDPATH += .
QT += svg network
+contains(DEFINES, HAVE_MEEGOGRAPHICSSYSTEM) {
+ QT += meegographicssystemhelper
+}
+
DEFINES += MTHEME_PRINT_DEBUG
#DEFINES += CLOSE_ON_ENTER
@@ -34,8 +38,10 @@ SOURCES += main.cpp \
../src/corelib/theme/mcommonpixmaps.cpp \
../src/corelib/theme/mimagedirectory.cpp \
../src/corelib/theme/mthemedaemonclient.cpp \
+ ../src/corelib/theme/mpixmaphandle.cpp \
../src/corelib/theme/mthemedaemonprotocol.cpp \
../src/corelib/core/mcpumonitor.cpp \
+ ../src/corelib/core/mgraphicssystemhelper.cpp \
contains(DEFINES, HAVE_GCONF) {
PKGCONFIG += gconf-2.0
@@ -49,10 +55,12 @@ HEADERS += \
../src/corelib/theme/mthemedaemon.h \
../src/corelib/theme/mcommonpixmaps.h \
../src/corelib/theme/mimagedirectory.h \
+ ../src/corelib/theme/mpixmaphandle.h \
../src/corelib/theme/mthemedaemonclient.h \
../src/corelib/theme/mthemedaemonprotocol.h \
../src/corelib/core/mgconfitem.h \
../src/corelib/core/mcpumonitor.h \
+ ../src/corelib/core/mgraphicssystemhelper.h \
keypresswaiter.h \
QMAKE_EXTRA_TARGETS += check
diff --git a/mthemedaemon/mthemedaemonserver.cpp b/mthemedaemon/mthemedaemonserver.cpp
index 9b551d68..dbfc8f3a 100644
--- a/mthemedaemon/mthemedaemonserver.cpp
+++ b/mthemedaemon/mthemedaemonserver.cpp
@@ -393,8 +393,8 @@ void MThemeDaemonServer::processOneQueueItem()
loadPixmapsQueue.erase(iter);
}
- Qt::HANDLE handle = 0;
- if (daemon.pixmap(item.client, item.pixmapId, handle)) {
+ MPixmapHandle handle;
+ if (daemon.pixmap(item.client, item.pixmapId, &handle)) {
if (slowDown > 0)
usleep(slowDown);
item.client->stream() << Packet(Packet::PixmapUpdatedPacket, item.sequenceNumber,
@@ -456,8 +456,8 @@ void MThemeDaemonServer::pixmapUsed(MThemeDaemonClient *client,
// release request, otherwise we increase the reference count
const QueueItem item (client, id, sequenceNumber);
if (!releasePixmapsQueue.removeOne(item)) {
- Qt::HANDLE handle;
- daemon.pixmap(item.client, item.pixmapId, handle);
+ MPixmapHandle handle;
+ daemon.pixmap(item.client, item.pixmapId, &handle);
}
}
@@ -475,7 +475,7 @@ void MThemeDaemonServer::pixmapRequested(MThemeDaemonClient *client,
// in case the resource is NULL, the pixmap is not loaded (it's not found from the current theme)
if (!resource) {
client->stream() << Packet(Packet::PixmapUpdatedPacket, sequenceNumber,
- new PixmapHandle(id, 0));
+ new PixmapHandle(id, MPixmapHandle()));
} else {
#ifndef Q_WS_MAC
client->stream() << Packet(Packet::PixmapUpdatedPacket, sequenceNumber,
diff --git a/mthemedaemon/mthemedaemonserver.h b/mthemedaemon/mthemedaemonserver.h
index 36b10304..071c1e8f 100644
--- a/mthemedaemon/mthemedaemonserver.h
+++ b/mthemedaemon/mthemedaemonserver.h
@@ -120,7 +120,7 @@ private:
QTimer processQueueTimer;
QList<MThemeDaemonClient*> clientsThatHaveNotYetAppliedThemeChange;
- QList<QPixmap*> pixmapsToDeleteWhenThemeChangeHasCompleted;
+ QList<PixmapCacheEntry*> pixmapsToDeleteWhenThemeChangeHasCompleted;
QHash<quint64, QList<MThemeDaemonClient*> > clientsThatHaveNotYetUpdatedMostUsed;
QHash<quint64, QList<M::MThemeDaemonProtocol::PixmapIdentifier> > pixmapsToDeleteWhenUpdatedMostUsed;