summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-10-16 22:00:12 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-10-16 22:00:12 (GMT)
commit6c8748a1f4738c49ba333023c190104a53a647a1 (patch)
treed212a9619438b995a444a38e82ad14c052b46cff /tools
parent0b47cfe1163598bbc3e867073fb1b7c5b238fe73 (diff)
parent1cc498e36725e4019afad367b08e992e5e497be4 (diff)
downloadQt-6c8748a1f4738c49ba333023c190104a53a647a1.zip
Qt-6c8748a1f4738c49ba333023c190104a53a647a1.tar.gz
Qt-6c8748a1f4738c49ba333023c190104a53a647a1.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'tools')
-rw-r--r--tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp6
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.cpp6
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp
index b9dbb2b..5e36631 100644
--- a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp
@@ -118,20 +118,20 @@ QImage* QMeeGoLivePixmap::lock()
void *data = NULL;
int pitch = 0;
+ QImage::Format format;
if (! QMeeGoRuntime::lockLiveTexture(d->handle)) {
qWarning("Failed to lock a live texture!");
return new QImage();
}
- QMeeGoRuntime::queryLiveTexture(d->handle, &data, &pitch);
+ QMeeGoRuntime::queryLiveTexture(d->handle, &data, &pitch, &format);
if (data == NULL || pitch == 0) {
qWarning("Failed to query the live texture!");
return new QImage();
}
- // FIXME Bug here! FIX FIX FIX FIX FIX FIX
- return new QImage((uchar *) data, width(), height(), QImage::Format_RGB16);
+ return new QImage((uchar *) data, width(), height(), format);
}
void QMeeGoLivePixmap::release(QImage *img)
diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
index 44f9f58..215dffc 100644
--- a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
@@ -62,7 +62,7 @@ typedef Qt::HANDLE (*QMeeGoLiveTextureCreateFunc) (int w, int h, QImage::Format
typedef bool (*QMeeGoLiveTextureLockFunc) (Qt::HANDLE h);
typedef bool (*QMeeGoLiveTextureUnlockFunc) (Qt::HANDLE h);
typedef void (*QMeeGoLiveTextureDestroyFunc) (Qt::HANDLE h);
-typedef void (*QMeeGoLiveTextureQueryFunc) (Qt::HANDLE h, void **data, int *pitch);
+typedef void (*QMeeGoLiveTextureQueryFunc) (Qt::HANDLE h, void **data, int *pitch, QImage::Format *format);
typedef Qt::HANDLE (*QMeeGoLiveTextureToEglImageFunc) (Qt::HANDLE h);
static QMeeGoImageToEglSharedImageFunc qt_meego_image_to_egl_shared_image = NULL;
@@ -216,11 +216,11 @@ void QMeeGoRuntime::destroyLiveTexture(Qt::HANDLE h)
qt_meego_live_texture_destroy(h);
}
-void QMeeGoRuntime::queryLiveTexture(Qt::HANDLE h, void **data, int *pitch)
+void QMeeGoRuntime::queryLiveTexture(Qt::HANDLE h, void **data, int *pitch, QImage::Format *format)
{
ENSURE_INITIALIZED;
Q_ASSERT(qt_meego_live_texture_query);
- qt_meego_live_texture_query(h, data, pitch);
+ qt_meego_live_texture_query(h, data, pitch, format);
}
Qt::HANDLE QMeeGoRuntime::liveTextureToEGLImage(Qt::HANDLE handle)
diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.h b/tools/qmeegographicssystemhelper/qmeegoruntime.h
index 048b9be..9f2d505 100644
--- a/tools/qmeegographicssystemhelper/qmeegoruntime.h
+++ b/tools/qmeegographicssystemhelper/qmeegoruntime.h
@@ -60,7 +60,7 @@ public:
static bool lockLiveTexture(Qt::HANDLE h);
static bool unlockLiveTexture(Qt::HANDLE h);
static void destroyLiveTexture(Qt::HANDLE h);
- static void queryLiveTexture(Qt::HANDLE h, void **data, int *pitch);
+ static void queryLiveTexture(Qt::HANDLE h, void **data, int *pitch, QImage::Format *format);
static Qt::HANDLE liveTextureToEGLImage(Qt::HANDLE);
private: