Rename QPixmapData to QPlatformPixmap.
authorSamuel Rødal <samuel.rodal@nokia.com>
Fri, 15 Jul 2011 12:07:12 +0000 (14:07 +0200)
committerJørgen Lind <jorgen.lind@nokia.com>
Tue, 19 Jul 2011 07:50:37 +0000 (09:50 +0200)
Makes the API symmetric with the other Lighthouse APIs.

Change-Id: I8a399f3c968ea35d4624711b31f2ac5bb94b7893
Reviewed-on: http://codereview.qt.nokia.com/1735
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
92 files changed:
examples/painting/shared/arthurwidgets.cpp
src/gui/egl/qegl_x11.cpp
src/gui/egl/qeglcontext_p.h
src/gui/image/image.pri
src/gui/image/qbitmap.cpp
src/gui/image/qbitmap.h
src/gui/image/qimage.cpp
src/gui/image/qimage.h
src/gui/image/qimagepixmapcleanuphooks.cpp
src/gui/image/qimagepixmapcleanuphooks_p.h
src/gui/image/qpixmap.cpp
src/gui/image/qpixmap.h
src/gui/image/qpixmap_blitter.cpp
src/gui/image/qpixmap_blitter_p.h
src/gui/image/qpixmap_raster.cpp
src/gui/image/qpixmap_raster_p.h
src/gui/image/qpixmapcache_p.h
src/gui/image/qpixmapdatafactory.cpp [deleted file]
src/gui/image/qpixmapdatafactory_p.h [deleted file]
src/gui/image/qplatformpixmap.cpp [moved from src/gui/image/qpixmapdata.cpp with 72% similarity]
src/gui/image/qplatformpixmap_qpa.h [moved from src/gui/image/qpixmapdata_p.h with 92% similarity]
src/gui/image/qvolatileimage.cpp
src/gui/kernel/qplatformintegration_qpa.cpp
src/gui/kernel/qplatformintegration_qpa.h
src/gui/painting/qpaintengine.h
src/gui/painting/qpaintengine_blitter.cpp
src/gui/painting/qpaintengine_blitter_p.h
src/gui/painting/qpaintengine_raster.cpp
src/opengl/qgl.cpp
src/opengl/qgl_egl.cpp
src/opengl/qgl_p.h
src/opengl/qgl_symbian.cpp
src/opengl/qgl_x11.cpp
src/opengl/qgl_x11egl.cpp
src/opengl/qglpixmapfilter.cpp
src/plugins/platforms/cocoa/qcocoaintegration.h
src/plugins/platforms/cocoa/qcocoaintegration.mm
src/plugins/platforms/directfb/qdirectfbblitter.cpp
src/plugins/platforms/directfb/qdirectfbblitter.h
src/plugins/platforms/directfb/qdirectfbconvenience.cpp
src/plugins/platforms/directfb/qdirectfbconvenience.h
src/plugins/platforms/directfb/qdirectfbcursor.cpp
src/plugins/platforms/directfb/qdirectfbintegration.cpp
src/plugins/platforms/directfb/qdirectfbintegration.h
src/plugins/platforms/directfb/qdirectfbwindowsurface.cpp
src/plugins/platforms/directfb/qdirectfbwindowsurface.h
src/plugins/platforms/eglfs/qeglfsintegration.cpp
src/plugins/platforms/eglfs/qeglfsintegration.h
src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
src/plugins/platforms/linuxfb/qlinuxfbintegration.h
src/plugins/platforms/minimal/qminimalintegration.cpp
src/plugins/platforms/minimal/qminimalintegration.h
src/plugins/platforms/openkode/qopenkodeintegration.cpp
src/plugins/platforms/openkode/qopenkodeintegration.h
src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp
src/plugins/platforms/openvglite/qgraphicssystem_vglite.h
src/plugins/platforms/qvfb/qvfbintegration.cpp
src/plugins/platforms/qvfb/qvfbintegration.h
src/plugins/platforms/uikit/quikitintegration.h
src/plugins/platforms/uikit/quikitintegration.mm
src/plugins/platforms/vnc/qvncintegration.cpp
src/plugins/platforms/vnc/qvncintegration.h
src/plugins/platforms/wayland/qwaylandintegration.cpp
src/plugins/platforms/wayland/qwaylandintegration.h
src/plugins/platforms/xcb/qxcbintegration.cpp
src/plugins/platforms/xcb/qxcbintegration.h
src/plugins/platforms/xlib/qxlibintegration.cpp
src/plugins/platforms/xlib/qxlibintegration.h
src/widgets/effects/qpixmapfilter_p.h
src/widgets/platforms/mac/qpaintdevice_mac.cpp
src/widgets/platforms/mac/qpixmap_mac.cpp
src/widgets/platforms/mac/qpixmap_mac_p.h
src/widgets/platforms/s60/qapplication_s60.cpp
src/widgets/platforms/s60/qpaintengine_s60.cpp
src/widgets/platforms/s60/qpaintengine_s60_p.h
src/widgets/platforms/s60/qpixmap_s60.cpp
src/widgets/platforms/s60/qpixmap_s60_p.h
src/widgets/platforms/win/qpixmap_win.cpp
src/widgets/platforms/x11/qcursor_x11.cpp
src/widgets/platforms/x11/qfontengine_x11.cpp
src/widgets/platforms/x11/qpaintengine_x11.cpp
src/widgets/platforms/x11/qpixmap_x11.cpp
src/widgets/platforms/x11/qpixmap_x11_p.h
src/widgets/platforms/x11/qwidget_x11.cpp
src/widgets/platforms/x11/qx11info_x11.h
src/widgets/styles/qs60style_s60.cpp
tests/auto/nativeimagehandleprovider/tst_nativeimagehandleprovider.cpp
tests/auto/qgl/tst_qgl.cpp
tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
tests/auto/qpixmap/tst_qpixmap.cpp
tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp

index b3c75f0..2b8d6eb 100644 (file)
@@ -86,7 +86,7 @@ ArthurFrame::ArthurFrame(QWidget *parent)
 
 #ifdef Q_WS_X11
     QPixmap xRenderPixmap(1, 1);
-    m_prefer_image = xRenderPixmap.pixmapData()->classId() == QPixmapData::X11Class && !xRenderPixmap.x11PictureHandle();
+    m_prefer_image = xRenderPixmap.handle()->classId() == QPlatformPixmap::X11Class && !xRenderPixmap.x11PictureHandle();
 #endif
 }
 
index c0f8a24..4fd8a15 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <QtGui/private/qt_x11_p.h>
 #include <QtGui/qx11info_x11.h>
-#include <QtGui/private/qpixmapdata_p.h>
+#include <QtGui/qplatformpixmap_qpa.h>
 #include <QtGui/private/qpixmap_x11_p.h>
 #include <QtGui/private/qimagepixmapcleanuphooks_p.h>
 
@@ -339,14 +339,14 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg
         return EGL_NO_SURFACE;
     }
 
-    QX11PixmapData *x11PixmapData = 0;
+    QX11PlatformPixmap *x11PlatformPixmap = 0;
     if (devType == QInternal::Pixmap) {
-        QPixmapData *pmd = static_cast<QPixmap*>(device)->data_ptr().data();
-        if (pmd->classId() == QPixmapData::X11Class)
-            x11PixmapData = static_cast<QX11PixmapData*>(pmd);
+        QPlatformPixmap *pmd = static_cast<QPixmap*>(device)->data_ptr().data();
+        if (pmd->classId() == QPlatformPixmap::X11Class)
+            x11PlatformPixmap = static_cast<QX11PlatformPixmap*>(pmd);
         else {
-            // TODO: Replace the pixmap's data with a new QX11PixmapData
-            qWarning("WARNING: Creating an EGL surface on a QPixmap is only supported for QX11PixmapData");
+            // TODO: Replace the pixmap's data with a new QX11PlatformPixmap
+            qWarning("WARNING: Creating an EGL surface on a QPixmap is only supported for QX11PlatformPixmap");
             return EGL_NO_SURFACE;
         }
     } else if ((devType != QInternal::Widget) && (devType != QInternal::Pbuffer)) {
@@ -426,11 +426,11 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg
         return surf;
     }
 
-    if (x11PixmapData) {
+    if (x11PlatformPixmap) {
         // X11 Pixmaps are only created with a depth, so that's all we need to check
         EGLint configDepth;
         eglGetConfigAttrib(QEgl::display(), config, EGL_BUFFER_SIZE , &configDepth);
-        if (x11PixmapData->depth() != configDepth) {
+        if (x11PlatformPixmap->depth() != configDepth) {
             // The bit depths are wrong which means the EGLConfig isn't compatable with
             // this pixmap. So we need to replace the pixmap's existing data with a new
             // one which is created with the correct depth:
@@ -438,13 +438,13 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg
 #ifndef QT_NO_XRENDER
             if (configDepth == 32) {
                 qWarning("Warning: EGLConfig's depth (32) != pixmap's depth (%d), converting to ARGB32",
-                         x11PixmapData->depth());
-                x11PixmapData->convertToARGB32(true);
+                         x11PlatformPixmap->depth());
+                x11PlatformPixmap->convertToARGB32(true);
             } else
 #endif
             {
                 qWarning("Warning: EGLConfig's depth (%d) != pixmap's depth (%d)",
-                         configDepth, x11PixmapData->depth());
+                         configDepth, x11PlatformPixmap->depth());
             }
         }
 
@@ -458,10 +458,10 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg
             surfaceAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB);
 
         EGLSurface surf = eglCreatePixmapSurface(QEgl::display(), config,
-                                                 (EGLNativePixmapType) x11PixmapData->handle(),
+                                                 (EGLNativePixmapType) x11PlatformPixmap->handle(),
                                                  surfaceAttribs.properties());
-        x11PixmapData->gl_surface = (void*)surf;
-        QImagePixmapCleanupHooks::enableCleanupHooks(x11PixmapData);
+        x11PlatformPixmap->gl_surface = (void*)surf;
+        QImagePixmapCleanupHooks::enableCleanupHooks(x11PlatformPixmap);
         return surf;
     }
 
index 6cd76b3..16da430 100644 (file)
@@ -109,7 +109,7 @@ private:
     static void setCurrentContext(QEgl::API api, QEglContext *context);
 
     friend class QMeeGoGraphicsSystem;
-    friend class QMeeGoPixmapData;
+    friend class QMeeGoPlatformPixmap;
 };
 
 QT_END_NAMESPACE
index 27aac41..a2bf90c 100644 (file)
@@ -21,8 +21,7 @@ HEADERS += \
         image/qpixmap_blitter_p.h \
         image/qpixmapcache.h \
         image/qpixmapcache_p.h \
-        image/qpixmapdata_p.h \
-        image/qpixmapdatafactory_p.h \
+        image/qplatformpixmap_qpa.h \
         image/qimagepixmapcleanuphooks_p.h \
         image/qvolatileimage_p.h \
         image/qvolatileimagedata_p.h \
@@ -39,8 +38,7 @@ SOURCES += \
         image/qpictureformatplugin.cpp \
         image/qpixmap.cpp \
         image/qpixmapcache.cpp \
-        image/qpixmapdata.cpp \
-        image/qpixmapdatafactory.cpp \
+        image/qplatformpixmap.cpp \
         image/qmovie.cpp \
         image/qpixmap_raster.cpp \
         image/qpixmap_blitter.cpp \
index 59b8bb0..c614ba1 100644 (file)
@@ -40,7 +40,7 @@
 ****************************************************************************/
 
 #include "qbitmap.h"
-#include "qpixmapdata_p.h"
+#include "qplatformpixmap_qpa.h"
 #include "qimage.h"
 #include "qvariant.h"
 #include <qpainter.h>
@@ -101,7 +101,7 @@ QT_BEGIN_NAMESPACE
     \sa QPixmap::isNull()
 */
 QBitmap::QBitmap()
-    : QPixmap(QSize(0, 0), QPixmapData::BitmapType)
+    : QPixmap(QSize(0, 0), QPlatformPixmap::BitmapType)
 {
 }
 
@@ -115,7 +115,7 @@ QBitmap::QBitmap()
 */
 
 QBitmap::QBitmap(int w, int h)
-    : QPixmap(QSize(w, h), QPixmapData::BitmapType)
+    : QPixmap(QSize(w, h), QPlatformPixmap::BitmapType)
 {
 }
 
@@ -127,7 +127,7 @@ QBitmap::QBitmap(int w, int h)
 */
 
 QBitmap::QBitmap(const QSize &size)
-    : QPixmap(size, QPixmapData::BitmapType)
+    : QPixmap(size, QPlatformPixmap::BitmapType)
 {
 }
 
@@ -172,7 +172,7 @@ QBitmap::QBitmap(const QPixmap &pixmap)
 */
 
 QBitmap::QBitmap(const QString& fileName, const char *format)
-    : QPixmap(QSize(0, 0), QPixmapData::BitmapType)
+    : QPixmap(QSize(0, 0), QPlatformPixmap::BitmapType)
 {
     load(fileName, format, Qt::MonoOnly);
 }
@@ -260,7 +260,7 @@ QBitmap QBitmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
         img.setColor(1, c0);
     }
 
-    QScopedPointer<QPixmapData> data(QGuiApplicationPrivate::platformIntegration()->createPixmapData(QPixmapData::BitmapType));
+    QScopedPointer<QPlatformPixmap> data(QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(QPlatformPixmap::BitmapType));
 
     data->fromImage(img, flags | Qt::MonoOnly);
     return QPixmap(data.take());
index f58e6b5..a3104f5 100644 (file)
@@ -75,7 +75,7 @@ public:
     QBitmap transformed(const QMatrix &) const;
     QBitmap transformed(const QTransform &matrix) const;
 
-    typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr;
+    typedef QExplicitlySharedDataPointer<QPlatformPixmap> DataPtr;
 };
 Q_DECLARE_SHARED(QBitmap)
 
index 3e251ba..2dbb2f4 100644 (file)
@@ -54,9 +54,9 @@
 #include <stdlib.h>
 #include <limits.h>
 #include <math.h>
+#include <qplatformpixmap_qpa.h>
 #include <private/qdrawhelper_p.h>
 #include <private/qmemrotate_p.h>
-#include <private/qpixmapdata_p.h>
 #include <private/qimagescale_p.h>
 #include <private/qsimd_p.h>
 
index c5168fa..7e8a0a2 100644 (file)
@@ -288,8 +288,8 @@ private:
     friend class QWSOnScreenSurface;
     QImageData *d;
 
-    friend class QRasterPixmapData;
-    friend class QBlittablePixmapData;
+    friend class QRasterPlatformPixmap;
+    friend class QBlittablePlatformPixmap;
     friend class QPixmapCacheEntry;
     friend Q_GUI_EXPORT qint64 qt_image_id(const QImage &image);
     friend const QVector<QRgb> *qt_image_colortable(const QImage &image);
index aa1bf80..7901045 100644 (file)
@@ -40,7 +40,7 @@
 ****************************************************************************/
 
 #include "qimagepixmapcleanuphooks_p.h"
-#include "private/qpixmapdata_p.h"
+#include "qplatformpixmap_qpa.h"
 #include "private/qimage_p.h"
 
 
@@ -62,12 +62,12 @@ QImagePixmapCleanupHooks *QImagePixmapCleanupHooks::instance()
     return qt_image_and_pixmap_cleanup_hooks();
 }
 
-void QImagePixmapCleanupHooks::addPixmapDataModificationHook(_qt_pixmap_cleanup_hook_pmd hook)
+void QImagePixmapCleanupHooks::addPlatformPixmapModificationHook(_qt_pixmap_cleanup_hook_pmd hook)
 {
     pixmapModificationHooks.append(hook);
 }
 
-void QImagePixmapCleanupHooks::addPixmapDataDestructionHook(_qt_pixmap_cleanup_hook_pmd hook)
+void QImagePixmapCleanupHooks::addPlatformPixmapDestructionHook(_qt_pixmap_cleanup_hook_pmd hook)
 {
     pixmapDestructionHooks.append(hook);
 }
@@ -78,12 +78,12 @@ void QImagePixmapCleanupHooks::addImageHook(_qt_image_cleanup_hook_64 hook)
     imageHooks.append(hook);
 }
 
-void QImagePixmapCleanupHooks::removePixmapDataModificationHook(_qt_pixmap_cleanup_hook_pmd hook)
+void QImagePixmapCleanupHooks::removePlatformPixmapModificationHook(_qt_pixmap_cleanup_hook_pmd hook)
 {
     pixmapModificationHooks.removeAll(hook);
 }
 
-void QImagePixmapCleanupHooks::removePixmapDataDestructionHook(_qt_pixmap_cleanup_hook_pmd hook)
+void QImagePixmapCleanupHooks::removePlatformPixmapDestructionHook(_qt_pixmap_cleanup_hook_pmd hook)
 {
     pixmapDestructionHooks.removeAll(hook);
 }
@@ -93,7 +93,7 @@ void QImagePixmapCleanupHooks::removeImageHook(_qt_image_cleanup_hook_64 hook)
     imageHooks.removeAll(hook);
 }
 
-void QImagePixmapCleanupHooks::executePixmapDataModificationHooks(QPixmapData* pmd)
+void QImagePixmapCleanupHooks::executePlatformPixmapModificationHooks(QPlatformPixmap* pmd)
 {
     QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks();
     // the global destructor for the pixmap and image hooks might have
@@ -108,7 +108,7 @@ void QImagePixmapCleanupHooks::executePixmapDataModificationHooks(QPixmapData* p
         qt_pixmap_cleanup_hook_64(pmd->cacheKey());
 }
 
-void QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(QPixmapData* pmd)
+void QImagePixmapCleanupHooks::executePlatformPixmapDestructionHooks(QPlatformPixmap* pmd)
 {
     QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks();
     // the global destructor for the pixmap and image hooks might have
@@ -133,9 +133,9 @@ void QImagePixmapCleanupHooks::executeImageHooks(qint64 key)
 }
 
 
-void QImagePixmapCleanupHooks::enableCleanupHooks(QPixmapData *pixmapData)
+void QImagePixmapCleanupHooks::enableCleanupHooks(QPlatformPixmap *handle)
 {
-    pixmapData->is_cached = true;
+    handle->is_cached = true;
 }
 
 void QImagePixmapCleanupHooks::enableCleanupHooks(const QPixmap &pixmap)
index fe49ea0..c98da61 100644 (file)
@@ -58,7 +58,7 @@
 QT_BEGIN_NAMESPACE
 
 typedef void (*_qt_image_cleanup_hook_64)(qint64);
-typedef void (*_qt_pixmap_cleanup_hook_pmd)(QPixmapData*);
+typedef void (*_qt_pixmap_cleanup_hook_pmd)(QPlatformPixmap*);
 
 
 class QImagePixmapCleanupHooks;
@@ -70,26 +70,26 @@ public:
 
     static void enableCleanupHooks(const QImage &image);
     static void enableCleanupHooks(const QPixmap &pixmap);
-    static void enableCleanupHooks(QPixmapData *pixmapData);
+    static void enableCleanupHooks(QPlatformPixmap *handle);
 
     static bool isImageCached(const QImage &image);
     static bool isPixmapCached(const QPixmap &pixmap);
 
     // Gets called when a pixmap data is about to be modified:
-    void addPixmapDataModificationHook(_qt_pixmap_cleanup_hook_pmd);
+    void addPlatformPixmapModificationHook(_qt_pixmap_cleanup_hook_pmd);
 
     // Gets called when a pixmap data is about to be destroyed:
-    void addPixmapDataDestructionHook(_qt_pixmap_cleanup_hook_pmd);
+    void addPlatformPixmapDestructionHook(_qt_pixmap_cleanup_hook_pmd);
 
     // Gets called when an image is about to be modified or destroyed:
     void addImageHook(_qt_image_cleanup_hook_64);
 
-    void removePixmapDataModificationHook(_qt_pixmap_cleanup_hook_pmd);
-    void removePixmapDataDestructionHook(_qt_pixmap_cleanup_hook_pmd);
+    void removePlatformPixmapModificationHook(_qt_pixmap_cleanup_hook_pmd);
+    void removePlatformPixmapDestructionHook(_qt_pixmap_cleanup_hook_pmd);
     void removeImageHook(_qt_image_cleanup_hook_64);
 
-    static void executePixmapDataModificationHooks(QPixmapData*);
-    static void executePixmapDataDestructionHooks(QPixmapData*);
+    static void executePlatformPixmapModificationHooks(QPlatformPixmap*);
+    static void executePlatformPixmapDestructionHooks(QPlatformPixmap*);
     static void executeImageHooks(qint64 key);
 
 private:
index 9757724..af27bae 100644 (file)
@@ -42,7 +42,7 @@
 #include <qglobal.h>
 
 #include "qpixmap.h"
-#include "qpixmapdata_p.h"
+#include "qplatformpixmap_qpa.h"
 #include "qimagepixmapcleanuphooks_p.h"
 
 #include "qbitmap.h"
@@ -95,8 +95,8 @@ static bool qt_pixmap_thread_test()
 
 void QPixmap::init(int w, int h, int type)
 {
-    if ((w > 0 && h > 0) || type == QPixmapData::BitmapType)
-        data = QPixmapData::create(w, h, (QPixmapData::PixelType) type);
+    if ((w > 0 && h > 0) || type == QPlatformPixmap::BitmapType)
+        data = QPlatformPixmap::create(w, h, (QPlatformPixmap::PixelType) type);
     else
         data = 0;
 }
@@ -127,7 +127,7 @@ QPixmap::QPixmap()
     : QPaintDevice()
 {
     (void) qt_pixmap_thread_test();
-    init(0, 0, QPixmapData::PixmapType);
+    init(0, 0, QPlatformPixmap::PixmapType);
 }
 
 /*!
@@ -148,9 +148,9 @@ QPixmap::QPixmap(int w, int h)
     : QPaintDevice()
 {
     if (!qt_pixmap_thread_test())
-        init(0, 0, QPixmapData::PixmapType);
+        init(0, 0, QPlatformPixmap::PixmapType);
     else
-        init(w, h, QPixmapData::PixmapType);
+        init(w, h, QPlatformPixmap::PixmapType);
 }
 
 /*!
@@ -167,9 +167,9 @@ QPixmap::QPixmap(const QSize &size)
     : QPaintDevice()
 {
     if (!qt_pixmap_thread_test())
-        init(0, 0, QPixmapData::PixmapType);
+        init(0, 0, QPlatformPixmap::PixmapType);
     else
-        init(size.width(), size.height(), QPixmapData::PixmapType);
+        init(size.width(), size.height(), QPlatformPixmap::PixmapType);
 }
 
 /*!
@@ -178,15 +178,15 @@ QPixmap::QPixmap(const QSize &size)
 QPixmap::QPixmap(const QSize &s, int type)
 {
     if (!qt_pixmap_thread_test())
-        init(0, 0, static_cast<QPixmapData::PixelType>(type));
+        init(0, 0, static_cast<QPlatformPixmap::PixelType>(type));
     else
-        init(s.width(), s.height(), static_cast<QPixmapData::PixelType>(type));
+        init(s.width(), s.height(), static_cast<QPlatformPixmap::PixelType>(type));
 }
 
 /*!
     \internal
 */
-QPixmap::QPixmap(QPixmapData *d)
+QPixmap::QPixmap(QPlatformPixmap *d)
     : QPaintDevice(), data(d)
 {
 }
@@ -223,7 +223,7 @@ QPixmap::QPixmap(QPixmapData *d)
 QPixmap::QPixmap(const QString& fileName, const char *format, Qt::ImageConversionFlags flags)
     : QPaintDevice()
 {
-    init(0, 0, QPixmapData::PixmapType);
+    init(0, 0, QPlatformPixmap::PixmapType);
     if (!qt_pixmap_thread_test())
         return;
 
@@ -240,7 +240,7 @@ QPixmap::QPixmap(const QPixmap &pixmap)
     : QPaintDevice()
 {
     if (!qt_pixmap_thread_test()) {
-        init(0, 0, QPixmapData::PixmapType);
+        init(0, 0, QPlatformPixmap::PixmapType);
         return;
     }
     if (pixmap.paintingActive()) {                // make a deep copy
@@ -269,13 +269,13 @@ QPixmap::QPixmap(const QPixmap &pixmap)
 QPixmap::QPixmap(const char * const xpm[])
     : QPaintDevice()
 {
-    init(0, 0, QPixmapData::PixmapType);
+    init(0, 0, QPlatformPixmap::PixmapType);
     if (!xpm)
         return;
 
     QImage image(xpm);
     if (!image.isNull()) {
-        if (data && data->pixelType() == QPixmapData::BitmapType)
+        if (data && data->pixelType() == QPlatformPixmap::BitmapType)
             *this = QBitmap::fromImage(image);
         else
             *this = fromImage(image);
@@ -330,7 +330,7 @@ QPixmap QPixmap::copy(const QRect &rect) const
     if (!rect.isEmpty())
         r = r.intersected(rect);
 
-    QPixmapData *d = data->createCompatiblePixmapData();
+    QPlatformPixmap *d = data->createCompatiblePlatformPixmap();
     d->copy(data.data(), r);
     return QPixmap(d);
 }
@@ -507,7 +507,7 @@ QMatrix QPixmap::trueMatrix(const QMatrix &m, int w, int h)
 
 bool QPixmap::isQBitmap() const
 {
-    return data->type == QPixmapData::BitmapType;
+    return data->type == QPlatformPixmap::BitmapType;
 }
 
 /*!
@@ -782,7 +782,7 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers
                   % info.absoluteFilePath()
                   % HexString<uint>(info.lastModified().toTime_t())
                   % HexString<quint64>(info.size())
-                  % HexString<uint>(data ? data->pixelType() : QPixmapData::PixmapType);
+                  % HexString<uint>(data ? data->pixelType() : QPlatformPixmap::PixmapType);
 
     // Note: If no extension is provided, we try to match the
     // file against known plugin extensions
@@ -792,7 +792,7 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers
     if (QPixmapCache::find(key, *this))
         return true;
 
-    QScopedPointer<QPixmapData> tmp(QPixmapData::create(0, 0, data ? data->type : QPixmapData::PixmapType));
+    QScopedPointer<QPlatformPixmap> tmp(QPlatformPixmap::create(0, 0, data ? data->type : QPlatformPixmap::PixmapType));
     if (tmp->fromFile(fileName, format, flags)) {
         data = tmp.take();
         QPixmapCache::insert(key, *this);
@@ -827,7 +827,7 @@ bool QPixmap::loadFromData(const uchar *buf, uint len, const char *format, Qt::I
         return false;
 
     if (!data)
-        data = QPixmapData::create(0, 0, QPixmapData::PixmapType);
+        data = QPlatformPixmap::create(0, 0, QPlatformPixmap::PixmapType);
 
     return data->fromData(buf, len, format, flags);
 }
@@ -941,7 +941,7 @@ void QPixmap::fill(const QColor &color)
     } else {
         // Don't bother to make a copy of the data object, since
         // it will be filled with new pixel data anyway.
-        QPixmapData *d = data->createCompatiblePixmapData();
+        QPlatformPixmap *d = data->createCompatiblePlatformPixmap();
         d->resize(data->width(), data->height());
         data = d;
     }
@@ -1704,17 +1704,17 @@ void QPixmap::detach()
     if (!data)
         return;
 
-    // QPixmap.data member may be QRuntimePixmapData so use pixmapData() function to get
+    // QPixmap.data member may be QRuntimePlatformPixmap so use handle() function to get
     // the actual underlaying runtime pixmap data.
-    QPixmapData *pd = pixmapData();
-    QPixmapData::ClassId id = pd->classId();
-    if (id == QPixmapData::RasterClass) {
-        QRasterPixmapData *rasterData = static_cast<QRasterPixmapData*>(pd);
+    QPlatformPixmap *pd = handle();
+    QPlatformPixmap::ClassId id = pd->classId();
+    if (id == QPlatformPixmap::RasterClass) {
+        QRasterPlatformPixmap *rasterData = static_cast<QRasterPlatformPixmap*>(pd);
         rasterData->image.detach();
     }
 
     if (data->is_cached && data->ref == 1)
-        QImagePixmapCleanupHooks::executePixmapDataModificationHooks(data.data());
+        QImagePixmapCleanupHooks::executePlatformPixmapModificationHooks(data.data());
 
     if (data->ref != 1) {
         *this = copy();
@@ -1742,7 +1742,7 @@ QPixmap QPixmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
     if (image.isNull())
         return QPixmap();
 
-    QScopedPointer<QPixmapData> data(QGuiApplicationPrivate::platformIntegration()->createPixmapData(QPixmapData::PixmapType));
+    QScopedPointer<QPlatformPixmap> data(QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(QPlatformPixmap::PixmapType));
     data->fromImage(image, flags);
     return QPixmap(data.take());
 }
@@ -1761,7 +1761,7 @@ QPixmap QPixmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
 */
 QPixmap QPixmap::fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags)
 {
-    QScopedPointer<QPixmapData> data(QGuiApplicationPrivate::platformIntegration()->createPixmapData(QPixmapData::PixmapType));
+    QScopedPointer<QPlatformPixmap> data(QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(QPlatformPixmap::PixmapType));
     data->fromImageReader(imageReader, flags);
     return QPixmap(data.take());
 }
@@ -1810,7 +1810,7 @@ QPixmap QPixmap::fromImageReader(QImageReader *imageReader, Qt::ImageConversionF
 /*!
   \internal
 */
-QPixmapData* QPixmap::pixmapData() const
+QPlatformPixmap* QPixmap::handle() const
 {
     return data.data();
 }
index 084e5d5..642556e 100644 (file)
@@ -61,13 +61,13 @@ class QImageReader;
 class QColor;
 class QVariant;
 class QX11Info;
-class QPixmapData;
+class QPlatformPixmap;
 
 class Q_GUI_EXPORT QPixmap : public QPaintDevice
 {
 public:
     QPixmap();
-    explicit QPixmap(QPixmapData *data);
+    explicit QPixmap(QPlatformPixmap *data);
     QPixmap(int w, int h);
     QPixmap(const QSize &);
     QPixmap(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
@@ -168,7 +168,7 @@ protected:
     int metric(PaintDeviceMetric) const;
 
 private:
-    QExplicitlySharedDataPointer<QPixmapData> data;
+    QExplicitlySharedDataPointer<QPlatformPixmap> data;
 
     bool doImageIO(QImageWriter *io, int quality) const;
 
@@ -176,7 +176,7 @@ private:
     void init(int, int, int);
     void deref();
     Q_DUMMY_COMPARISON_OPERATOR(QPixmap)
-    friend class QPixmapData;
+    friend class QPlatformPixmap;
     friend class QBitmap;
     friend class QPaintDevice;
     friend class QPainter;
@@ -188,10 +188,10 @@ private:
 #endif
 
 public:
-    QPixmapData* pixmapData() const;
+    QPlatformPixmap* handle() const;
 
 public:
-    typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr;
+    typedef QExplicitlySharedDataPointer<QPlatformPixmap> DataPtr;
     inline DataPtr &data_ptr() { return data; }
 };
 
index 465bc40..4387641 100644 (file)
@@ -55,8 +55,8 @@ QT_BEGIN_NAMESPACE
 
 static int global_ser_no = 0;
 
-QBlittablePixmapData::QBlittablePixmapData()
-    : QPixmapData(QPixmapData::PixmapType,BlitterClass), m_engine(0), m_blittable(0)
+QBlittablePlatformPixmap::QBlittablePlatformPixmap()
+    : QPlatformPixmap(QPlatformPixmap::PixmapType,BlitterClass), m_engine(0), m_blittable(0)
 #ifdef QT_BLITTER_RASTEROVERLAY
     ,m_rasterOverlay(0), m_unmergedCopy(0)
 #endif //QT_BLITTER_RASTEROVERLAY
@@ -64,7 +64,7 @@ QBlittablePixmapData::QBlittablePixmapData()
     setSerialNumber(++global_ser_no);
 }
 
-QBlittablePixmapData::~QBlittablePixmapData()
+QBlittablePlatformPixmap::~QBlittablePlatformPixmap()
 {
     delete m_blittable;
     delete m_engine;
@@ -74,23 +74,23 @@ QBlittablePixmapData::~QBlittablePixmapData()
 #endif //QT_BLITTER_RASTEROVERLAY
 }
 
-QBlittable *QBlittablePixmapData::blittable() const
+QBlittable *QBlittablePlatformPixmap::blittable() const
 {
     if (!m_blittable) {
-        QBlittablePixmapData *that = const_cast<QBlittablePixmapData *>(this);
+        QBlittablePlatformPixmap *that = const_cast<QBlittablePlatformPixmap *>(this);
         that->m_blittable = this->createBlittable(QSize(w,h));
     }
 
     return m_blittable;
 }
 
-void QBlittablePixmapData::setBlittable(QBlittable *blittable)
+void QBlittablePlatformPixmap::setBlittable(QBlittable *blittable)
 {
     resize(blittable->size().width(),blittable->size().height());
     m_blittable = blittable;
 }
 
-void QBlittablePixmapData::resize(int width, int height)
+void QBlittablePlatformPixmap::resize(int width, int height)
 {
 
     delete m_blittable;
@@ -105,7 +105,7 @@ void QBlittablePixmapData::resize(int width, int height)
     is_null = (w <= 0 || h <= 0);
 }
 
-int QBlittablePixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
+int QBlittablePlatformPixmap::metric(QPaintDevice::PaintDeviceMetric metric) const
 {
     switch (metric) {
     case QPaintDevice::PdmWidth:
@@ -125,14 +125,14 @@ int QBlittablePixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
     case QPaintDevice::PdmPhysicalDpiY:
         return qt_defaultDpiY();
     default:
-        qWarning("QRasterPixmapData::metric(): Unhandled metric type %d", metric);
+        qWarning("QRasterPlatformPixmap::metric(): Unhandled metric type %d", metric);
         break;
     }
 
     return 0;
 }
 
-void QBlittablePixmapData::fill(const QColor &color)
+void QBlittablePlatformPixmap::fill(const QColor &color)
 {
     //jlind: todo: change when blittables can support non opaque fillRects
     if (color.alpha() == 255 && blittable()->capabilities() & QBlittable::SolidRectCapability) {
@@ -166,22 +166,22 @@ void QBlittablePixmapData::fill(const QColor &color)
 
 }
 
-QImage *QBlittablePixmapData::buffer()
+QImage *QBlittablePlatformPixmap::buffer()
 {
     return blittable()->lock();
 }
 
-QImage QBlittablePixmapData::toImage() const
+QImage QBlittablePlatformPixmap::toImage() const
 {
     return blittable()->lock()->copy();
 }
 
-bool QBlittablePixmapData::hasAlphaChannel() const
+bool QBlittablePlatformPixmap::hasAlphaChannel() const
 {
     return blittable()->lock()->hasAlphaChannel();
 }
 
-void QBlittablePixmapData::fromImage(const QImage &image,
+void QBlittablePlatformPixmap::fromImage(const QImage &image,
                                      Qt::ImageConversionFlags flags)
 {
     resize(image.width(),image.height());
@@ -203,10 +203,10 @@ void QBlittablePixmapData::fromImage(const QImage &image,
     }
 }
 
-QPaintEngine *QBlittablePixmapData::paintEngine() const
+QPaintEngine *QBlittablePlatformPixmap::paintEngine() const
 {
     if (!m_engine) {
-        QBlittablePixmapData *that = const_cast<QBlittablePixmapData *>(this);
+        QBlittablePlatformPixmap *that = const_cast<QBlittablePlatformPixmap *>(this);
         that->m_engine = new QBlitterPaintEngine(that);
     }
     return m_engine;
@@ -216,7 +216,7 @@ QPaintEngine *QBlittablePixmapData::paintEngine() const
 
 static bool showRasterOverlay = !qgetenv("QT_BLITTER_RASTEROVERLAY").isEmpty();
 
-void QBlittablePixmapData::mergeOverlay()
+void QBlittablePlatformPixmap::mergeOverlay()
 {
     if (m_unmergedCopy || !showRasterOverlay)
         return;
@@ -227,7 +227,7 @@ void QBlittablePixmapData::mergeOverlay()
     p.end();
 }
 
-void QBlittablePixmapData::unmergeOverlay()
+void QBlittablePlatformPixmap::unmergeOverlay()
 {
     if (!m_unmergedCopy || !showRasterOverlay)
         return;
@@ -240,7 +240,7 @@ void QBlittablePixmapData::unmergeOverlay()
     m_unmergedCopy = 0;
 }
 
-QImage *QBlittablePixmapData::overlay()
+QImage *QBlittablePlatformPixmap::overlay()
 {
     if (!m_rasterOverlay||
         m_rasterOverlay->size() != QSize(w,h)){
@@ -254,7 +254,7 @@ QImage *QBlittablePixmapData::overlay()
     return m_rasterOverlay;
 }
 
-void QBlittablePixmapData::markRasterOverlayImpl(const QRectF &rect)
+void QBlittablePlatformPixmap::markRasterOverlayImpl(const QRectF &rect)
 {
     if (!showRasterOverlay)
         return;
@@ -267,7 +267,7 @@ void QBlittablePixmapData::markRasterOverlayImpl(const QRectF &rect)
     }
 }
 
-void QBlittablePixmapData::unmarkRasterOverlayImpl(const QRectF &rect)
+void QBlittablePlatformPixmap::unmarkRasterOverlayImpl(const QRectF &rect)
 {
     if (!showRasterOverlay)
         return;
@@ -281,7 +281,7 @@ void QBlittablePixmapData::unmarkRasterOverlayImpl(const QRectF &rect)
     }
 }
 
-QRectF QBlittablePixmapData::clipAndTransformRect(const QRectF &rect) const
+QRectF QBlittablePlatformPixmap::clipAndTransformRect(const QRectF &rect) const
 {
     QRectF transformationRect = rect;
     paintEngine();
index 07791e5..3ab5cb3 100644 (file)
 #ifndef QPIXMAP_BLITTER_P_H
 #define QPIXMAP_BLITTER_P_H
 
-#include <private/qpixmapdata_p.h>
+#include <qplatformpixmap_qpa.h>
 #include <private/qpaintengine_blitter_p.h>
 
 #ifndef QT_NO_BLITTABLE
 QT_BEGIN_NAMESPACE
 
-class Q_GUI_EXPORT  QBlittablePixmapData : public QPixmapData
+class Q_GUI_EXPORT  QBlittablePlatformPixmap : public QPlatformPixmap
 {
-//     Q_DECLARE_PRIVATE(QBlittablePixmapData);
+//     Q_DECLARE_PRIVATE(QBlittablePlatformPixmap);
 public:
-    QBlittablePixmapData();
-    ~QBlittablePixmapData();
+    QBlittablePlatformPixmap();
+    ~QBlittablePlatformPixmap();
 
     virtual QBlittable *createBlittable(const QSize &size) const = 0;
     QBlittable *blittable() const;
@@ -98,7 +98,7 @@ protected:
 
 };
 
-inline void QBlittablePixmapData::markRasterOverlay(const QRectF &rect)
+inline void QBlittablePlatformPixmap::markRasterOverlay(const QRectF &rect)
 {
 #ifdef QT_BLITTER_RASTEROVERLAY
     markRasterOverlayImpl(rect);
@@ -107,7 +107,7 @@ inline void QBlittablePixmapData::markRasterOverlay(const QRectF &rect)
 #endif
 }
 
-inline void QBlittablePixmapData::markRasterOverlay(const QVectorPath &path)
+inline void QBlittablePlatformPixmap::markRasterOverlay(const QVectorPath &path)
 {
 #ifdef QT_BLITTER_RASTEROVERLAY
     markRasterOverlayImpl(path.convertToPainterPath().boundingRect());
@@ -116,7 +116,7 @@ inline void QBlittablePixmapData::markRasterOverlay(const QVectorPath &path)
 #endif
 }
 
-inline void QBlittablePixmapData::markRasterOverlay(const QPointF &pos, const QTextItem &ti)
+inline void QBlittablePlatformPixmap::markRasterOverlay(const QPointF &pos, const QTextItem &ti)
 {
 #ifdef QT_BLITTER_RASTEROVERLAY
     QFontMetricsF fm(ti.font());
@@ -129,7 +129,7 @@ inline void QBlittablePixmapData::markRasterOverlay(const QPointF &pos, const QT
 #endif
 }
 
-inline void QBlittablePixmapData::markRasterOverlay(const QRect *rects, int rectCount)
+inline void QBlittablePlatformPixmap::markRasterOverlay(const QRect *rects, int rectCount)
 {
 #ifdef QT_BLITTER_RASTEROVERLAY
     for (int i = 0; i < rectCount; i++) {
@@ -140,7 +140,7 @@ inline void QBlittablePixmapData::markRasterOverlay(const QRect *rects, int rect
     Q_UNUSED(rectCount)
 #endif
 }
-inline void QBlittablePixmapData::markRasterOverlay(const QRectF *rects, int rectCount)
+inline void QBlittablePlatformPixmap::markRasterOverlay(const QRectF *rects, int rectCount)
 {
 #ifdef QT_BLITTER_RASTEROVERLAY
     for (int i = 0; i < rectCount; i++) {
@@ -152,7 +152,7 @@ inline void QBlittablePixmapData::markRasterOverlay(const QRectF *rects, int rec
 #endif
 }
 
-inline void QBlittablePixmapData::unmarkRasterOverlay(const QRectF &rect)
+inline void QBlittablePlatformPixmap::unmarkRasterOverlay(const QRectF &rect)
 {
 #ifdef QT_BLITTER_RASTEROVERLAY
     unmarkRasterOverlayImpl(rect);
index a0ae88d..ce7d660 100644 (file)
@@ -60,10 +60,10 @@ QT_BEGIN_NAMESPACE
 
 QPixmap qt_toRasterPixmap(const QImage &image)
 {
-    QPixmapData *data =
-        new QRasterPixmapData(image.depth() == 1
-                           ? QPixmapData::BitmapType
-                           : QPixmapData::PixmapType);
+    QPlatformPixmap *data =
+        new QRasterPlatformPixmap(image.depth() == 1
+                           ? QPlatformPixmap::BitmapType
+                           : QPlatformPixmap::PixmapType);
 
     data->fromImage(image, Qt::AutoColor);
 
@@ -75,27 +75,27 @@ QPixmap qt_toRasterPixmap(const QPixmap &pixmap)
     if (pixmap.isNull())
         return QPixmap();
 
-    if (QPixmap(pixmap).data_ptr()->classId() == QPixmapData::RasterClass)
+    if (QPixmap(pixmap).data_ptr()->classId() == QPlatformPixmap::RasterClass)
         return pixmap;
 
     return qt_toRasterPixmap(pixmap.toImage());
 }
 
-QRasterPixmapData::QRasterPixmapData(PixelType type)
-    : QPixmapData(type, RasterClass)
+QRasterPlatformPixmap::QRasterPlatformPixmap(PixelType type)
+    : QPlatformPixmap(type, RasterClass)
 {
 }
 
-QRasterPixmapData::~QRasterPixmapData()
+QRasterPlatformPixmap::~QRasterPlatformPixmap()
 {
 }
 
-QPixmapData *QRasterPixmapData::createCompatiblePixmapData() const
+QPlatformPixmap *QRasterPlatformPixmap::createCompatiblePlatformPixmap() const
 {
-    return new QRasterPixmapData(pixelType());
+    return new QRasterPlatformPixmap(pixelType());
 }
 
-void QRasterPixmapData::resize(int width, int height)
+void QRasterPlatformPixmap::resize(int width, int height)
 {
     QImage::Format format;
 #ifdef Q_WS_QWS
@@ -130,7 +130,7 @@ void QRasterPixmapData::resize(int width, int height)
     setSerialNumber(image.serialNumber());
 }
 
-bool QRasterPixmapData::fromData(const uchar *buffer, uint len, const char *format,
+bool QRasterPlatformPixmap::fromData(const uchar *buffer, uint len, const char *format,
                       Qt::ImageConversionFlags flags)
 {
     QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buffer), len);
@@ -144,7 +144,7 @@ bool QRasterPixmapData::fromData(const uchar *buffer, uint len, const char *form
     return !isNull();
 }
 
-void QRasterPixmapData::fromImage(const QImage &sourceImage,
+void QRasterPlatformPixmap::fromImage(const QImage &sourceImage,
                                   Qt::ImageConversionFlags flags)
 {
     Q_UNUSED(flags);
@@ -152,7 +152,7 @@ void QRasterPixmapData::fromImage(const QImage &sourceImage,
     createPixmapForImage(image, flags, /* inplace = */false);
 }
 
-void QRasterPixmapData::fromImageReader(QImageReader *imageReader,
+void QRasterPlatformPixmap::fromImageReader(QImageReader *imageReader,
                                         Qt::ImageConversionFlags flags)
 {
     Q_UNUSED(flags);
@@ -166,19 +166,19 @@ void QRasterPixmapData::fromImageReader(QImageReader *imageReader,
 // from qwindowsurface.cpp
 extern void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset);
 
-void QRasterPixmapData::copy(const QPixmapData *data, const QRect &rect)
+void QRasterPlatformPixmap::copy(const QPlatformPixmap *data, const QRect &rect)
 {
     fromImage(data->toImage(rect).copy(), Qt::NoOpaqueDetection);
 }
 
-bool QRasterPixmapData::scroll(int dx, int dy, const QRect &rect)
+bool QRasterPlatformPixmap::scroll(int dx, int dy, const QRect &rect)
 {
     if (!image.isNull())
         qt_scrollRectInImage(image, rect, QPoint(dx, dy));
     return true;
 }
 
-void QRasterPixmapData::fill(const QColor &color)
+void QRasterPlatformPixmap::fill(const QColor &color)
 {
     uint pixel;
 
@@ -262,12 +262,12 @@ void QRasterPixmapData::fill(const QColor &color)
     image.fill(pixel);
 }
 
-bool QRasterPixmapData::hasAlphaChannel() const
+bool QRasterPlatformPixmap::hasAlphaChannel() const
 {
     return image.hasAlphaChannel();
 }
 
-QImage QRasterPixmapData::toImage() const
+QImage QRasterPlatformPixmap::toImage() const
 {
     if (!image.isNull()) {
         QImageData *data = const_cast<QImage &>(image).data_ptr();
@@ -281,7 +281,7 @@ QImage QRasterPixmapData::toImage() const
     return image;
 }
 
-QImage QRasterPixmapData::toImage(const QRect &rect) const
+QImage QRasterPlatformPixmap::toImage(const QRect &rect) const
 {
     if (rect.isNull())
         return image;
@@ -295,12 +295,12 @@ QImage QRasterPixmapData::toImage(const QRect &rect) const
         return image.copy(clipped);
 }
 
-QPaintEngine* QRasterPixmapData::paintEngine() const
+QPaintEngine* QRasterPlatformPixmap::paintEngine() const
 {
     return image.paintEngine();
 }
 
-int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
+int QRasterPlatformPixmap::metric(QPaintDevice::PaintDeviceMetric metric) const
 {
     QImageData *d = image.d;
     if (!d)
@@ -327,14 +327,14 @@ int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
     case QPaintDevice::PdmPhysicalDpiY:
         return qt_defaultDpiY();
     default:
-        qWarning("QRasterPixmapData::metric(): Unhandled metric type %d", metric);
+        qWarning("QRasterPlatformPixmap::metric(): Unhandled metric type %d", metric);
         break;
     }
 
     return 0;
 }
 
-void QRasterPixmapData::createPixmapForImage(QImage &sourceImage, Qt::ImageConversionFlags flags, bool inPlace)
+void QRasterPlatformPixmap::createPixmapForImage(QImage &sourceImage, Qt::ImageConversionFlags flags, bool inPlace)
 {
     QImage::Format format;
     if (flags & Qt::NoFormatConversion)
@@ -436,7 +436,7 @@ void QRasterPixmapData::createPixmapForImage(QImage &sourceImage, Qt::ImageConve
     setSerialNumber(image.serialNumber());
 }
 
-QImage* QRasterPixmapData::buffer()
+QImage* QRasterPlatformPixmap::buffer()
 {
     return &image;
 }
index e8d1b39..c451a94 100644 (file)
@@ -53,8 +53,7 @@
 // We mean it.
 //
 
-#include <QtGui/private/qpixmapdata_p.h>
-#include <QtGui/private/qpixmapdatafactory_p.h>
+#include <QtGui/qplatformpixmap_qpa.h>
 
 #ifdef Q_WS_WIN
 # include "qt_windows.h"
 
 QT_BEGIN_NAMESPACE
 
-class Q_GUI_EXPORT QRasterPixmapData : public QPixmapData
+class Q_GUI_EXPORT QRasterPlatformPixmap : public QPlatformPixmap
 {
 public:
-    QRasterPixmapData(PixelType type);
-    ~QRasterPixmapData();
+    QRasterPlatformPixmap(PixelType type);
+    ~QRasterPlatformPixmap();
 
-    QPixmapData *createCompatiblePixmapData() const;
+    QPlatformPixmap *createCompatiblePlatformPixmap() const;
 
     void resize(int width, int height);
     void fromFile(const QString &filename, Qt::ImageConversionFlags flags);
@@ -76,7 +75,7 @@ public:
     void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
     void fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags);
 
-    void copy(const QPixmapData *data, const QRect &rect);
+    void copy(const QPlatformPixmap *data, const QRect &rect);
     bool scroll(int dx, int dy, const QRect &rect);
     void fill(const QColor &color);
     bool hasAlphaChannel() const;
index 336c0f0..7b96f5a 100644 (file)
@@ -81,9 +81,9 @@ class QPixmapCacheEntry : public QPixmap
 public:
     QPixmapCacheEntry(const QPixmapCache::Key &key, const QPixmap &pix) : QPixmap(pix), key(key)
     {
-        QPixmapData *pd = pixmapData();
-        if (pd && pd->classId() == QPixmapData::RasterClass) {
-            QRasterPixmapData *d = static_cast<QRasterPixmapData*>(pd);
+        QPlatformPixmap *pd = handle();
+        if (pd && pd->classId() == QPlatformPixmap::RasterClass) {
+            QRasterPlatformPixmap *d = static_cast<QRasterPlatformPixmap*>(pd);
             if (!d->image.isNull() && d->image.d->paintEngine
                 && !d->image.d->paintEngine->isActive())
             {
diff --git a/src/gui/image/qpixmapdatafactory.cpp b/src/gui/image/qpixmapdatafactory.cpp
deleted file mode 100644 (file)
index ceb7a67..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qpixmapdatafactory_p.h"
-
-#ifdef Q_WS_QWS
-# include <QtGui/qscreen_qws.h>
-#endif
-#ifdef Q_WS_X11
-# include <private/qpixmap_x11_p.h>
-#endif
-#if defined(Q_WS_WIN)
-# include <private/qpixmap_raster_p.h>
-#endif
-#ifdef Q_WS_MAC
-# include <private/qpixmap_mac_p.h>
-#endif
-#ifdef Q_WS_QPA
-# include <private/qpixmap_raster_p.h>
-#endif
-#ifdef Q_OS_SYMBIAN
-# include <private/qpixmap_s60_p.h>
-#endif
-
-#include "private/qguiapplication_p.h"
-
-QT_BEGIN_NAMESPACE
-
-#if !defined(Q_WS_QWS)
-
-class QSimplePixmapDataFactory : public QPixmapDataFactory
-{
-public:
-    ~QSimplePixmapDataFactory() {}
-    QPixmapData* create(QPixmapData::PixelType type);
-};
-
-QPixmapData* QSimplePixmapDataFactory::create(QPixmapData::PixelType type)
-{
-    // ### should we always use Raster instead?
-    return QGuiApplicationPrivate::platformIntegration()->createPixmapData(type);
-}
-
-Q_GLOBAL_STATIC(QSimplePixmapDataFactory, factory)
-
-#endif // !defined(Q_WS_QWS)
-
-QPixmapDataFactory::~QPixmapDataFactory()
-{
-}
-
-QPixmapDataFactory* QPixmapDataFactory::instance(int screen)
-{
-    Q_UNUSED(screen);
-#ifdef Q_WS_QWS
-    return QScreen::instance()->pixmapDataFactory();
-#else
-    return factory();
-#endif
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/image/qpixmapdatafactory_p.h b/src/gui/image/qpixmapdatafactory_p.h
deleted file mode 100644 (file)
index a539d67..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPIXMAPDATAFACTORY_P_H
-#define QPIXMAPDATAFACTORY_P_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qstring.h>
-#include <QtGui/qimage.h>
-#include <QtGui/private/qpixmapdata_p.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Gui)
-
-class QPixmapData;
-
-class QPixmapDataFactory
-{
-public:
-    static QPixmapDataFactory* instance(int screen = 0);
-    virtual ~QPixmapDataFactory();
-
-    virtual QPixmapData* create(QPixmapData::PixelType type) = 0;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QPIXMAPDATAFACTORY_P_H
similarity index 72%
rename from src/gui/image/qpixmapdata.cpp
rename to src/gui/image/qplatformpixmap.cpp
index e63e7aa..7fb1bd6 100644 (file)
@@ -39,7 +39,7 @@
 **
 ****************************************************************************/
 
-#include "qpixmapdata_p.h"
+#include "qplatformpixmap_qpa.h"
 #include <QtCore/qbuffer.h>
 #include <QtGui/qbitmap.h>
 #include <QtGui/qimagereader.h>
 
 QT_BEGIN_NAMESPACE
 
-QPixmapData *QPixmapData::create(int w, int h, PixelType type)
+QPlatformPixmap *QPlatformPixmap::create(int w, int h, PixelType type)
 {
-    QPixmapData *data = QGuiApplicationPrivate::platformIntegration()->createPixmapData(static_cast<QPixmapData::PixelType>(type));
+    QPlatformPixmap *data = QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(static_cast<QPlatformPixmap::PixelType>(type));
     data->resize(w, h);
     return data;
 }
 
 
-QPixmapData::QPixmapData(PixelType pixelType, int objectId)
+QPlatformPixmap::QPlatformPixmap(PixelType pixelType, int objectId)
     : w(0),
       h(0),
       d(0),
@@ -70,29 +70,29 @@ QPixmapData::QPixmapData(PixelType pixelType, int objectId)
 {
 }
 
-QPixmapData::~QPixmapData()
+QPlatformPixmap::~QPlatformPixmap()
 {
     // Sometimes the pixmap cleanup hooks will be called from derrived classes, which will
     // then set is_cached to false. For example, on X11 QtOpenGL needs to delete the GLXPixmap
     // or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted,
-    // otherwise some drivers will leak the GL surface. In this case, QX11PixmapData will
+    // otherwise some drivers will leak the GL surface. In this case, QX11PlatformPixmap will
     // call the cleanup hooks itself before deleting the native pixmap and set is_cached to
     // false.
     if (is_cached) {
-        QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(this);
+        QImagePixmapCleanupHooks::executePlatformPixmapDestructionHooks(this);
         is_cached = false;
     }
 }
 
-QPixmapData *QPixmapData::createCompatiblePixmapData() const
+QPlatformPixmap *QPlatformPixmap::createCompatiblePlatformPixmap() const
 {
-    QPixmapData *d = QGuiApplicationPrivate::platformIntegration()->createPixmapData(pixelType());
+    QPlatformPixmap *d = QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(pixelType());
     return d;
 }
 
-static QImage makeBitmapCompliantIfNeeded(QPixmapData *d, const QImage &image, Qt::ImageConversionFlags flags)
+static QImage makeBitmapCompliantIfNeeded(QPlatformPixmap *d, const QImage &image, Qt::ImageConversionFlags flags)
 {
-    if (d->pixelType() == QPixmapData::BitmapType) {
+    if (d->pixelType() == QPlatformPixmap::BitmapType) {
         QImage img = image.convertToFormat(QImage::Format_MonoLSB, flags);
 
         // make sure image.color(0) == Qt::color0 (white)
@@ -110,14 +110,14 @@ static QImage makeBitmapCompliantIfNeeded(QPixmapData *d, const QImage &image, Q
     return image;
 }
 
-void QPixmapData::fromImageReader(QImageReader *imageReader,
+void QPlatformPixmap::fromImageReader(QImageReader *imageReader,
                                   Qt::ImageConversionFlags flags)
 {
     const QImage image = imageReader->read();
     fromImage(image, flags);
 }
 
-bool QPixmapData::fromFile(const QString &fileName, const char *format,
+bool QPlatformPixmap::fromFile(const QString &fileName, const char *format,
                            Qt::ImageConversionFlags flags)
 {
     QImage image = QImageReader(fileName, format).read();
@@ -127,7 +127,7 @@ bool QPixmapData::fromFile(const QString &fileName, const char *format,
     return !isNull();
 }
 
-bool QPixmapData::fromData(const uchar *buf, uint len, const char *format, Qt::ImageConversionFlags flags)
+bool QPlatformPixmap::fromData(const uchar *buf, uint len, const char *format, Qt::ImageConversionFlags flags)
 {
     QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buf), len);
     QBuffer b(&a);
@@ -137,12 +137,12 @@ bool QPixmapData::fromData(const uchar *buf, uint len, const char *format, Qt::I
     return !isNull();
 }
 
-void QPixmapData::copy(const QPixmapData *data, const QRect &rect)
+void QPlatformPixmap::copy(const QPlatformPixmap *data, const QRect &rect)
 {
     fromImage(data->toImage(rect), Qt::NoOpaqueDetection);
 }
 
-bool QPixmapData::scroll(int dx, int dy, const QRect &rect)
+bool QPlatformPixmap::scroll(int dx, int dy, const QRect &rect)
 {
     Q_UNUSED(dx);
     Q_UNUSED(dy);
@@ -150,18 +150,18 @@ bool QPixmapData::scroll(int dx, int dy, const QRect &rect)
     return false;
 }
 
-QPixmap QPixmapData::transformed(const QTransform &matrix,
-                                 Qt::TransformationMode mode) const
+QPixmap QPlatformPixmap::transformed(const QTransform &matrix,
+                                     Qt::TransformationMode mode) const
 {
     return QPixmap::fromImage(toImage().transformed(matrix, mode));
 }
 
-void QPixmapData::setSerialNumber(int serNo)
+void QPlatformPixmap::setSerialNumber(int serNo)
 {
     ser_no = serNo;
 }
 
-QImage QPixmapData::toImage(const QRect &rect) const
+QImage QPlatformPixmap::toImage(const QRect &rect) const
 {
     if (rect.contains(QRect(0, 0, w, h)))
         return toImage();
@@ -169,18 +169,18 @@ QImage QPixmapData::toImage(const QRect &rect) const
         return toImage().copy(rect);
 }
 
-QImage* QPixmapData::buffer()
+QImage* QPlatformPixmap::buffer()
 {
     return 0;
 }
 
 #if defined(Q_OS_SYMBIAN)
-void* QPixmapData::toNativeType(NativeType /* type */)
+void* QPlatformPixmap::toNativeType(NativeType /* type */)
 {
     return 0;
 }
 
-void QPixmapData::fromNativeType(void* /* pixmap */, NativeType /* typre */)
+void QPlatformPixmap::fromNativeType(void* /* pixmap */, NativeType /* typre */)
 {
     return;
 }
similarity index 92%
rename from src/gui/image/qpixmapdata_p.h
rename to src/gui/image/qplatformpixmap_qpa.h
index ea3e03b..5f5b903 100644 (file)
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
 
 class QImageReader;
 
-class Q_GUI_EXPORT QPixmapData
+class Q_GUI_EXPORT QPlatformPixmap
 {
 public:
     enum PixelType {
@@ -72,10 +72,10 @@ public:
     enum ClassId { RasterClass, DirectFBClass,
                    BlitterClass, CustomClass = 1024 };
 
-    QPixmapData(PixelType pixelType, int classId);
-    virtual ~QPixmapData();
+    QPlatformPixmap(PixelType pixelType, int classId);
+    virtual ~QPlatformPixmap();
 
-    virtual QPixmapData *createCompatiblePixmapData() const;
+    virtual QPlatformPixmap *createCompatiblePlatformPixmap() const;
 
     virtual void resize(int width, int height) = 0;
     virtual void fromImage(const QImage &image,
@@ -88,7 +88,7 @@ public:
     virtual bool fromData(const uchar *buffer, uint len, const char *format,
                           Qt::ImageConversionFlags flags);
 
-    virtual void copy(const QPixmapData *data, const QRect &rect);
+    virtual void copy(const QPlatformPixmap *data, const QRect &rect);
     virtual bool scroll(int dx, int dy, const QRect &rect);
 
     virtual int metric(QPaintDevice::PaintDeviceMetric metric) const = 0;
@@ -123,7 +123,7 @@ public:
                 | ((qint64) detach_no));
     }
 
-    static QPixmapData *create(int w, int h, PixelType type);
+    static QPlatformPixmap *create(int w, int h, PixelType type);
 
 protected:
 
@@ -137,7 +137,7 @@ private:
     friend class QPixmap;
     friend class QImagePixmapCleanupHooks; // Needs to set is_cached
     friend class QGLTextureCache; //Needs to check the reference count
-    friend class QExplicitlySharedDataPointer<QPixmapData>;
+    friend class QExplicitlySharedDataPointer<QPlatformPixmap>;
 
     QAtomicInt ref;
     int detach_no;
index 4f139f8..f7fe70c 100644 (file)
@@ -42,7 +42,7 @@
 #include "qvolatileimage_p.h"
 #include "qvolatileimagedata_p.h"
 #include <QtGui/private/qpaintengine_raster_p.h>
-#include <QtGui/private/qpixmapdata_p.h>
+#include <QtGui/qplatformpixmap_qpa.h>
 
 QT_BEGIN_NAMESPACE
 
@@ -236,7 +236,7 @@ void QVolatileImage::copyFrom(QVolatileImage *source, const QRect &rect)
 }
 
 /*!
-    To be called from the PixmapData's paintEngine().
+    To be called from the PlatformPixmap's paintEngine().
   */
 QPaintEngine *QVolatileImage::paintEngine()
 {
@@ -275,7 +275,7 @@ bool QVolatileImagePaintEngine::end()
 void QVolatileImagePaintEngine::drawPixmap(const QPointF &p, const QPixmap &pm)
 {
 #ifdef Q_OS_SYMBIAN
-    void *nativeData = pm.pixmapData()->toNativeType(QPixmapData::VolatileImage);
+    void *nativeData = pm.handle()->toNativeType(QPlatformPixmap::VolatileImage);
     if (nativeData) {
         QVolatileImage *img = static_cast<QVolatileImage *>(nativeData);
         img->beginDataAccess();
@@ -292,7 +292,7 @@ void QVolatileImagePaintEngine::drawPixmap(const QPointF &p, const QPixmap &pm)
 void QVolatileImagePaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
 {
 #ifdef Q_OS_SYMBIAN
-    void *nativeData = pm.pixmapData()->toNativeType(QPixmapData::VolatileImage);
+    void *nativeData = pm.handle()->toNativeType(QPlatformPixmap::VolatileImage);
     if (nativeData) {
         QVolatileImage *img = static_cast<QVolatileImage *>(nativeData);
         img->beginDataAccess();
index c519246..ab0d510 100644 (file)
@@ -142,10 +142,10 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const
 */
 
 /*!
-    \fn QPixmapData *QPlatformIntegration::createPixmapData(QPixmapData::PixelType type) const
+    \fn QPlatformPixmap *QPlatformIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 
-    Factory function for QPixmapData. PixelType can be either PixmapType or BitmapType.
-    \sa QPixmapData
+    Factory function for QPlatformPixmap. PixelType can be either PixmapType or BitmapType.
+    \sa QPlatformPixmap
 */
 
 /*!
index a74ff29..092186c 100644 (file)
@@ -43,7 +43,7 @@
 #define QPLATFORMINTEGRATION_H
 
 #include <QtGui/qwindowdefs.h>
-#include <QtGui/private/qpixmapdata_p.h>
+#include <QtGui/qplatformpixmap_qpa.h>
 #include <QtGui/qplatformscreen_qpa.h>
 #include <QtGui/qsurfaceformat.h>
 
@@ -79,7 +79,7 @@ public:
     virtual bool hasCapability(Capability cap) const;
 
 // GraphicsSystem functions
-    virtual QPixmapData *createPixmapData(QPixmapData::PixelType type) const = 0;
+    virtual QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const = 0;
     virtual QPlatformWindow *createPlatformWindow(QWindow *window) const = 0;
     virtual QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const = 0;
     virtual QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &format, QPlatformGLContext *share) const;
index 6befdd8..49ceb2a 100644 (file)
@@ -282,7 +282,7 @@ private:
     friend class QWin32PaintEnginePrivate;
     friend class QMacCGContext;
     friend class QPreviewPaintEngine;
-    friend class QX11GLPixmapData;
+    friend class QX11GLPlatformPixmap;
 };
 
 
index f8bc3f1..0e9a17a 100644 (file)
@@ -111,7 +111,7 @@ public:
 
     bool canBlitterDrawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) const
     {
-        if (pm.pixmapData()->classId() != QPixmapData::BlitterClass)
+        if (pm.handle()->classId() != QPlatformPixmap::BlitterClass)
             return false;
         if (checkStateAgainstMask(capabillitiesState,drawPixmapMask)) {
             if (m_capabilities & (QBlittable::SourceOverPixmapCapability
@@ -190,7 +190,7 @@ class QBlitterPaintEnginePrivate : public QPaintEngineExPrivate
 {
     Q_DECLARE_PUBLIC(QBlitterPaintEngine);
 public:
-    QBlitterPaintEnginePrivate(QBlittablePixmapData *p)
+    QBlitterPaintEnginePrivate(QBlittablePlatformPixmap *p)
             : QPaintEngineExPrivate(),
               pmData(p),
               isBlitterLocked(false),
@@ -280,7 +280,7 @@ public:
 
     QRasterPaintEngine *raster;
 
-    QBlittablePixmapData *pmData;
+    QBlittablePlatformPixmap *pmData;
     bool isBlitterLocked;
 
     CapabilitiesToStateMask *capabillities;
@@ -288,7 +288,7 @@ public:
     uint hasXForm;
 };
 
-QBlitterPaintEngine::QBlitterPaintEngine(QBlittablePixmapData *p)
+QBlitterPaintEngine::QBlitterPaintEngine(QBlittablePlatformPixmap *p)
     : QPaintEngineEx(*(new QBlitterPaintEnginePrivate(p)))
 {
 }
index afd7486..1acc647 100644 (file)
 QT_BEGIN_NAMESPACE
 
 class QBlitterPaintEnginePrivate;
-class QBlittablePixmapData;
+class QBlittablePlatformPixmap;
 class QBlittable;
 
 class Q_GUI_EXPORT QBlitterPaintEngine : public QPaintEngineEx
 {
     Q_DECLARE_PRIVATE(QBlitterPaintEngine);
 public:
-    QBlitterPaintEngine(QBlittablePixmapData *p);
+    QBlitterPaintEngine(QBlittablePlatformPixmap *p);
     ~QBlitterPaintEngine();
 
     virtual QPainterState *createState(QPainterState *orig) const;
index 09ffc8e..b6b24d6 100644 (file)
@@ -438,8 +438,8 @@ bool QRasterPaintEngine::begin(QPaintDevice *device)
 
     if (device->devType() == QInternal::Pixmap) {
         QPixmap *pixmap = static_cast<QPixmap *>(device);
-        QPixmapData *pd = pixmap->pixmapData();
-        if (pd->classId() == QPixmapData::RasterClass || pd->classId() == QPixmapData::BlitterClass)
+        QPlatformPixmap *pd = pixmap->handle();
+        if (pd->classId() == QPlatformPixmap::RasterClass || pd->classId() == QPlatformPixmap::BlitterClass)
             d->device = pd->buffer();
     } else {
         d->device = device;
@@ -1989,9 +1989,9 @@ void QRasterPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pixmap)
     qDebug() << " - QRasterPaintEngine::drawPixmap(), pos=" << pos << " pixmap=" << pixmap.size() << "depth=" << pixmap.depth();
 #endif
 
-    QPixmapData *pd = pixmap.pixmapData();
-    if (pd->classId() == QPixmapData::RasterClass) {
-        const QImage &image = static_cast<QRasterPixmapData *>(pd)->image;
+    QPlatformPixmap *pd = pixmap.handle();
+    if (pd->classId() == QPlatformPixmap::RasterClass) {
+        const QImage &image = static_cast<QRasterPlatformPixmap *>(pd)->image;
         if (image.depth() == 1) {
             Q_D(QRasterPaintEngine);
             QRasterPaintEngineState *s = state();
@@ -2030,9 +2030,9 @@ void QRasterPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap, cons
     qDebug() << " - QRasterPaintEngine::drawPixmap(), r=" << r << " sr=" << sr << " pixmap=" << pixmap.size() << "depth=" << pixmap.depth();
 #endif
 
-    QPixmapData* pd = pixmap.pixmapData();
-    if (pd->classId() == QPixmapData::RasterClass) {
-        const QImage &image = static_cast<QRasterPixmapData *>(pd)->image;
+    QPlatformPixmap* pd = pixmap.handle();
+    if (pd->classId() == QPlatformPixmap::RasterClass) {
+        const QImage &image = static_cast<QRasterPlatformPixmap *>(pd)->image;
         if (image.depth() == 1) {
             Q_D(QRasterPaintEngine);
             QRasterPaintEngineState *s = state();
@@ -2425,9 +2425,9 @@ void QRasterPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap,
 
     QImage image;
 
-    QPixmapData *pd = pixmap.pixmapData();
-    if (pd->classId() == QPixmapData::RasterClass) {
-        image = static_cast<QRasterPixmapData *>(pd)->image;
+    QPlatformPixmap *pd = pixmap.handle();
+    if (pd->classId() == QPlatformPixmap::RasterClass) {
+        image = static_cast<QRasterPlatformPixmap *>(pd)->image;
     } else {
         image = pixmap.toImage();
     }
index 31a4b77..d045bf5 100644 (file)
@@ -84,7 +84,7 @@
 #include <qglframebufferobject.h>
 
 #include <private/qimage_p.h>
-#include <private/qpixmapdata_p.h>
+#include <qplatformpixmap_qpa.h>
 #include <private/qglpixelbuffer_p.h>
 #include <private/qimagepixmapcleanuphooks_p.h>
 #include "qcolormap.h"
@@ -1836,15 +1836,15 @@ Q_GLOBAL_STATIC(QGLTextureCache, qt_gl_texture_cache)
 QGLTextureCache::QGLTextureCache()
     : m_cache(64*1024) // cache ~64 MB worth of textures - this is not accurate though
 {
-    QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(cleanupTexturesForPixampData);
-    QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(cleanupBeforePixmapDestruction);
+    QImagePixmapCleanupHooks::instance()->addPlatformPixmapModificationHook(cleanupTexturesForPixampData);
+    QImagePixmapCleanupHooks::instance()->addPlatformPixmapDestructionHook(cleanupBeforePixmapDestruction);
     QImagePixmapCleanupHooks::instance()->addImageHook(cleanupTexturesForCacheKey);
 }
 
 QGLTextureCache::~QGLTextureCache()
 {
-    QImagePixmapCleanupHooks::instance()->removePixmapDataModificationHook(cleanupTexturesForPixampData);
-    QImagePixmapCleanupHooks::instance()->removePixmapDataDestructionHook(cleanupBeforePixmapDestruction);
+    QImagePixmapCleanupHooks::instance()->removePlatformPixmapModificationHook(cleanupTexturesForPixampData);
+    QImagePixmapCleanupHooks::instance()->removePlatformPixmapDestructionHook(cleanupBeforePixmapDestruction);
     QImagePixmapCleanupHooks::instance()->removeImageHook(cleanupTexturesForCacheKey);
 }
 
@@ -1903,18 +1903,18 @@ void QGLTextureCache::cleanupTexturesForCacheKey(qint64 cacheKey)
 }
 
 
-void QGLTextureCache::cleanupTexturesForPixampData(QPixmapData* pmd)
+void QGLTextureCache::cleanupTexturesForPixampData(QPlatformPixmap* pmd)
 {
     cleanupTexturesForCacheKey(pmd->cacheKey());
 }
 
-void QGLTextureCache::cleanupBeforePixmapDestruction(QPixmapData* pmd)
+void QGLTextureCache::cleanupBeforePixmapDestruction(QPlatformPixmap* pmd)
 {
     // Remove any bound textures first:
     cleanupTexturesForPixampData(pmd);
 
 #if defined(Q_WS_X11)
-    if (pmd->classId() == QPixmapData::X11Class) {
+    if (pmd->classId() == QPlatformPixmap::X11Class) {
         Q_ASSERT(pmd->ref == 0); // Make sure reference counting isn't broken
         QGLContextPrivate::destroyGlSurfaceForPixmap(pmd);
     }
@@ -2582,7 +2582,7 @@ QGLTexture *QGLContextPrivate::textureCacheLookup(const qint64 key, GLenum targe
 QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, QGLContext::BindOptions options)
 {
     Q_Q(QGLContext);
-    QPixmapData *pd = pixmap.pixmapData();
+    QPlatformPixmap *pd = pixmap.handle();
     Q_UNUSED(pd);
 
     const qint64 key = pixmap.cacheKey();
@@ -2601,7 +2601,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
 #if defined(Q_WS_X11)
     // Try to use texture_from_pixmap
     const QX11Info *xinfo = qt_x11Info(paintDevice);
-    if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType
+    if (pd->classId() == QPlatformPixmap::X11Class && pd->pixelType() == QPlatformPixmap::PixmapType
         && xinfo && xinfo->screen() == pixmap.x11Info().screen()
         && target == GL_TEXTURE_2D
         && QApplication::instance()->thread() == QThread::currentThread())
@@ -4442,7 +4442,7 @@ QPixmap QGLWidget::renderPixmap(int w, int h, bool useContext)
     int old_depth = qt_x11_preferred_pixmap_depth;
     qt_x11_preferred_pixmap_depth = x11Info().depth();
 
-    QPixmapData *data = new QX11PixmapData(QPixmapData::PixmapType);
+    QPlatformPixmap *data = new QX11PlatformPixmap(QPlatformPixmap::PixmapType);
     data->resize(sz.width(), sz.height());
     QPixmap pm(data);
     qt_x11_preferred_pixmap_depth = old_depth;
index 34b448e..dcf340f 100644 (file)
@@ -280,16 +280,16 @@ void QGLContextPrivate::destroyEglSurfaceForDevice()
 
 EGLSurface QGLContextPrivate::eglSurfaceForDevice() const
 {
-    // If a QPixmapData had to create the QGLContext, we don't have a paintDevice
+    // If a QPlatformPixmap had to create the QGLContext, we don't have a paintDevice
     if (!paintDevice)
         return eglSurface;
 
 #ifdef Q_WS_X11
     if (paintDevice->devType() == QInternal::Pixmap) {
-        QPixmapData *pmd = static_cast<QPixmap*>(paintDevice)->data_ptr().data();
-        if (pmd->classId() == QPixmapData::X11Class) {
-            QX11PixmapData* x11PixmapData = static_cast<QX11PixmapData*>(pmd);
-            return (EGLSurface)x11PixmapData->gl_surface;
+        QPlatformPixmap *pmd = static_cast<QPixmap*>(paintDevice)->data_ptr().data();
+        if (pmd->classId() == QPlatformPixmap::X11Class) {
+            QX11PlatformPixmap* x11PlatformPixmap = static_cast<QX11PlatformPixmap*>(pmd);
+            return (EGLSurface)x11PlatformPixmap->gl_surface;
         }
     }
 #endif
index 5b69cae..f2590e8 100644 (file)
@@ -382,11 +382,11 @@ public:
     void* pbuf;
     quint32 gpm;
     int screen;
-    QHash<QPixmapData*, QPixmap> boundPixmaps;
+    QHash<QPlatformPixmap*, QPixmap> boundPixmaps;
     QGLTexture *bindTextureFromNativePixmap(QPixmap*, const qint64 key,
                                             QGLContext::BindOptions options);
-    static void destroyGlSurfaceForPixmap(QPixmapData*);
-    static void unbindPixmapFromTexture(QPixmapData*);
+    static void destroyGlSurfaceForPixmap(QPlatformPixmap*);
+    static void unbindPixmapFromTexture(QPlatformPixmap*);
 #endif
 #if defined(Q_WS_MAC)
     bool update;
@@ -502,18 +502,18 @@ class Q_OPENGL_EXPORT QGLTextureDestroyer : public QObject
 public:
     QGLTextureDestroyer() : QObject() {
         qRegisterMetaType<GLuint>("GLuint");
-        connect(this, SIGNAL(freeTexture(QGLContext *, QPixmapData *, GLuint)),
-                this, SLOT(freeTexture_slot(QGLContext *, QPixmapData *, GLuint)));
+        connect(this, SIGNAL(freeTexture(QGLContext *, QPlatformPixmap *, GLuint)),
+                this, SLOT(freeTexture_slot(QGLContext *, QPlatformPixmap *, GLuint)));
     }
-    void emitFreeTexture(QGLContext *context, QPixmapData *boundPixmap, GLuint id) {
+    void emitFreeTexture(QGLContext *context, QPlatformPixmap *boundPixmap, GLuint id) {
         emit freeTexture(context, boundPixmap, id);
     }
 
 Q_SIGNALS:
-    void freeTexture(QGLContext *context, QPixmapData *boundPixmap, GLuint id);
+    void freeTexture(QGLContext *context, QPlatformPixmap *boundPixmap, GLuint id);
 
 private slots:
-    void freeTexture_slot(QGLContext *context, QPixmapData *boundPixmap, GLuint id) {
+    void freeTexture_slot(QGLContext *context, QPlatformPixmap *boundPixmap, GLuint id) {
         Q_UNUSED(boundPixmap);
 #if defined(Q_WS_X11)
         if (boundPixmap) {
@@ -565,7 +565,7 @@ public:
         if (options & QGLContext::MemoryManagedBindOption) {
             Q_ASSERT(context);
 #if !defined(Q_WS_X11)
-            QPixmapData *boundPixmap = 0;
+            QPlatformPixmap *boundPixmap = 0;
 #endif
             context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id);
         }
@@ -578,7 +578,7 @@ public:
     QGLContext::BindOptions options;
 
 #if defined(Q_WS_X11)
-    QPixmapData* boundPixmap;
+    QPlatformPixmap* boundPixmap;
 #endif
 
     bool canBindCompressedTexture
@@ -623,8 +623,8 @@ public:
     void removeContextTextures(QGLContext *ctx);
     static QGLTextureCache *instance();
     static void cleanupTexturesForCacheKey(qint64 cacheKey);
-    static void cleanupTexturesForPixampData(QPixmapData* pixmap);
-    static void cleanupBeforePixmapDestruction(QPixmapData* pixmap);
+    static void cleanupTexturesForPixampData(QPlatformPixmap* pixmap);
+    static void cleanupBeforePixmapDestruction(QPlatformPixmap* pixmap);
 
 private:
     QCache<QGLTextureCacheKey, QGLTexture> m_cache;
index bc65bcd..de44607 100644 (file)
@@ -50,7 +50,7 @@
 #include <private/qwidget_p.h> // to access QWExtra
 #include <private/qnativeimagehandleprovider_p.h>
 #include "qgl_egl_p.h"
-#include "qpixmapdata_gl_p.h"
+#include "qplatformpixmap_gl_p.h"
 #include "qgltexturepool_p.h"
 #include "qcolormap.h"
 #include <QDebug>
@@ -381,9 +381,9 @@ static inline bool knownGoodFormat(QImage::Format format)
     }
 }
 
-void QGLPixmapData::fromNativeType(void* pixmap, NativeType type)
+void QGLPlatformPixmap::fromNativeType(void* pixmap, NativeType type)
 {
-    if (type == QPixmapData::FbsBitmap) {
+    if (type == QPlatformPixmap::FbsBitmap) {
         CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap *>(pixmap);
         QSize size(bitmap->SizeInPixels().iWidth, bitmap->SizeInPixels().iHeight);
         if (size.width() == w && size.height() == h)
@@ -402,7 +402,7 @@ void QGLPixmapData::fromNativeType(void* pixmap, NativeType type)
         m_hasFillColor = false;
         m_dirty = true;
 
-    } else if (type == QPixmapData::VolatileImage && pixmap) {
+    } else if (type == QPlatformPixmap::VolatileImage && pixmap) {
         // Support QS60Style in more efficient skin graphics retrieval.
         QVolatileImage *img = static_cast<QVolatileImage *>(pixmap);
         if (img->width() == w && img->height() == h)
@@ -412,7 +412,7 @@ void QGLPixmapData::fromNativeType(void* pixmap, NativeType type)
         m_hasAlpha = m_source.hasAlphaChannel();
         m_hasFillColor = false;
         m_dirty = true;
-    } else if (type == QPixmapData::NativeImageHandleProvider && pixmap) {
+    } else if (type == QPlatformPixmap::NativeImageHandleProvider && pixmap) {
         destroyTexture();
         nativeImageHandleProvider = static_cast<QNativeImageHandleProvider *>(pixmap);
         // Cannot defer the retrieval, we need at least the size right away.
@@ -420,9 +420,9 @@ void QGLPixmapData::fromNativeType(void* pixmap, NativeType type)
     }
 }
 
-void* QGLPixmapData::toNativeType(NativeType type)
+void* QGLPlatformPixmap::toNativeType(NativeType type)
 {
-    if (type == QPixmapData::FbsBitmap) {
+    if (type == QPlatformPixmap::FbsBitmap) {
         if (m_source.isNull())
             m_source = QVolatileImage(w, h, QImage::Format_ARGB32_Premultiplied);
         return m_source.duplicateNativeImage();
@@ -431,19 +431,19 @@ void* QGLPixmapData::toNativeType(NativeType type)
     return 0;
 }
 
-bool QGLPixmapData::initFromNativeImageHandle(void *handle, const QString &type)
+bool QGLPlatformPixmap::initFromNativeImageHandle(void *handle, const QString &type)
 {
     if (type == QLatin1String("RSgImage")) {
-        fromNativeType(handle, QPixmapData::SgImage);
+        fromNativeType(handle, QPlatformPixmap::SgImage);
         return true;
     } else if (type == QLatin1String("CFbsBitmap")) {
-        fromNativeType(handle, QPixmapData::FbsBitmap);
+        fromNativeType(handle, QPlatformPixmap::FbsBitmap);
         return true;
     }
     return false;
 }
 
-void QGLPixmapData::createFromNativeImageHandleProvider()
+void QGLPlatformPixmap::createFromNativeImageHandleProvider()
 {
     void *handle = 0;
     QString type;
@@ -453,14 +453,14 @@ void QGLPixmapData::createFromNativeImageHandleProvider()
             nativeImageHandle = handle;
             nativeImageType = type;
         } else {
-            qWarning("QGLPixmapData: Unknown native image type '%s'", qPrintable(type));
+            qWarning("QGLPlatformPixmap: Unknown native image type '%s'", qPrintable(type));
         }
     } else {
-        qWarning("QGLPixmapData: Native handle is null");
+        qWarning("QGLPlatformPixmap: Native handle is null");
     }
 }
 
-void QGLPixmapData::releaseNativeImageHandle()
+void QGLPlatformPixmap::releaseNativeImageHandle()
 {
     if (nativeImageHandleProvider && nativeImageHandle) {
         nativeImageHandleProvider->release(nativeImageHandle, nativeImageType);
index 18b6eaa..1fd9e37 100644 (file)
@@ -1769,17 +1769,17 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
 
     Q_Q(QGLContext);
 
-    QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pixmap->data_ptr().data());
-    Q_ASSERT(pixmapData->classId() == QPixmapData::X11Class);
+    QX11PlatformPixmap *handle = static_cast<QX11PlatformPixmap*>(pixmap->data_ptr().data());
+    Q_ASSERT(handle->classId() == QPlatformPixmap::X11Class);
 
     // We can't use TFP if the pixmap has a separate X11 mask
-    if (pixmapData->x11_mask)
+    if (handle->x11_mask)
         return 0;
 
     if (!qt_resolveTextureFromPixmap(paintDevice))
         return 0;
 
-    const QX11Info &x11Info = pixmapData->xinfo;
+    const QX11Info &x11Info = handle->xinfo;
 
     // Store the configs (Can be static because configs aren't dependent on current context)
     static GLXFBConfig glxRGBPixmapConfig = 0;
@@ -1787,7 +1787,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
     static GLXFBConfig glxRGBAPixmapConfig = 0;
     static bool RGBAConfigInverted = false;
 
-    bool hasAlpha = pixmapData->hasAlphaChannel();
+    bool hasAlpha = handle->hasAlphaChannel();
 
     // Check to see if we need a config
     if ( (hasAlpha && !glxRGBAPixmapConfig) || (!hasAlpha && !glxRGBPixmapConfig) ) {
@@ -1822,15 +1822,15 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
     }
 
     // Check to see if the surface is still valid
-    if (pixmapData->gl_surface &&
-        hasAlpha != (pixmapData->flags & QX11PixmapData::GlSurfaceCreatedWithAlpha))
+    if (handle->gl_surface &&
+        hasAlpha != (handle->flags & QX11PlatformPixmap::GlSurfaceCreatedWithAlpha))
     {
         // Surface is invalid!
-        destroyGlSurfaceForPixmap(pixmapData);
+        destroyGlSurfaceForPixmap(handle);
     }
 
     // Check to see if we need a surface
-    if (!pixmapData->gl_surface) {
+    if (!handle->gl_surface) {
         GLXPixmap glxPixmap;
         int pixmapAttribs[] = {
             GLX_TEXTURE_FORMAT_EXT, hasAlpha ? GLX_TEXTURE_FORMAT_RGBA_EXT : GLX_TEXTURE_FORMAT_RGB_EXT,
@@ -1842,21 +1842,21 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
         // Wrap the X Pixmap into a GLXPixmap:
         glxPixmap = glXCreatePixmap(x11Info.display(),
                                     hasAlpha ? glxRGBAPixmapConfig : glxRGBPixmapConfig,
-                                    pixmapData->handle(), pixmapAttribs);
+                                    handle->handle(), pixmapAttribs);
 
         if (!glxPixmap)
             return 0;
 
-        pixmapData->gl_surface = (void*)glxPixmap;
+        handle->gl_surface = (void*)glxPixmap;
 
         // Make sure the cleanup hook gets called so we can delete the glx pixmap
-        QImagePixmapCleanupHooks::enableCleanupHooks(pixmapData);
+        QImagePixmapCleanupHooks::enableCleanupHooks(handle);
     }
 
     GLuint textureId;
     glGenTextures(1, &textureId);
     glBindTexture(GL_TEXTURE_2D, textureId);
-    glXBindTexImageEXT(x11Info.display(), (GLXPixmap)pixmapData->gl_surface, GLX_FRONT_LEFT_EXT, 0);
+    glXBindTexImageEXT(x11Info.display(), (GLXPixmap)handle->gl_surface, GLX_FRONT_LEFT_EXT, 0);
 
     glBindTexture(GL_TEXTURE_2D, textureId);
     GLuint filtering = (options & QGLContext::LinearFilteringBindOption) ? GL_LINEAR : GL_NEAREST;
@@ -1868,7 +1868,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
 
     QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, options);
     if (texture->options & QGLContext::InvertedYBindOption)
-        pixmapData->flags |= QX11PixmapData::InvertedWhenBoundToTexture;
+        handle->flags |= QX11PlatformPixmap::InvertedWhenBoundToTexture;
 
     // We assume the cost of bound pixmaps is zero
     QGLTextureCache::instance()->insert(q, key, texture, 0);
@@ -1878,26 +1878,26 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
 }
 
 
-void QGLContextPrivate::destroyGlSurfaceForPixmap(QPixmapData* pmd)
+void QGLContextPrivate::destroyGlSurfaceForPixmap(QPlatformPixmap* pmd)
 {
 #if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX)
-    Q_ASSERT(pmd->classId() == QPixmapData::X11Class);
-    QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd);
-    if (pixmapData->gl_surface) {
-        glXDestroyPixmap(QX11Info::display(), (GLXPixmap)pixmapData->gl_surface);
-        pixmapData->gl_surface = 0;
+    Q_ASSERT(pmd->classId() == QPlatformPixmap::X11Class);
+    QX11PlatformPixmap *handle = static_cast<QX11PlatformPixmap*>(pmd);
+    if (handle->gl_surface) {
+        glXDestroyPixmap(QX11Info::display(), (GLXPixmap)handle->gl_surface);
+        handle->gl_surface = 0;
     }
 #endif
 }
 
-void QGLContextPrivate::unbindPixmapFromTexture(QPixmapData* pmd)
+void QGLContextPrivate::unbindPixmapFromTexture(QPlatformPixmap* pmd)
 {
 #if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX)
-    Q_ASSERT(pmd->classId() == QPixmapData::X11Class);
+    Q_ASSERT(pmd->classId() == QPlatformPixmap::X11Class);
     Q_ASSERT(QGLContext::currentContext());
-    QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd);
-    if (pixmapData->gl_surface)
-        glXReleaseTexImageEXT(QX11Info::display(), (GLXPixmap)pixmapData->gl_surface, GLX_FRONT_LEFT_EXT);
+    QX11PlatformPixmap *handle = static_cast<QX11PlatformPixmap*>(pmd);
+    if (handle->gl_surface)
+        glXReleaseTexImageEXT(QX11Info::display(), (GLXPixmap)handle->gl_surface, GLX_FRONT_LEFT_EXT);
 #endif
 }
 
index a491bef..e852041 100644 (file)
@@ -171,13 +171,13 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
 
     int devType = device()->devType();
 
-    QX11PixmapData *x11PixmapData = 0;
+    QX11PlatformPixmap *x11PlatformPixmap = 0;
     if (devType == QInternal::Pixmap) {
-        QPixmapData *pmd = static_cast<QPixmap*>(device())->data_ptr().data();
-        if (pmd->classId() == QPixmapData::X11Class)
-            x11PixmapData = static_cast<QX11PixmapData*>(pmd);
+        QPlatformPixmap *pmd = static_cast<QPixmap*>(device())->data_ptr().data();
+        if (pmd->classId() == QPlatformPixmap::X11Class)
+            x11PlatformPixmap = static_cast<QX11PlatformPixmap*>(pmd);
         else {
-            // TODO: Replace the pixmap's data with a new QX11PixmapData
+            // TODO: Replace the pixmap's data with a new QX11PlatformPixmap
             qWarning("WARNING: Creating a QGLContext on a QPixmap is only supported for X11 pixmap backend");
             return false;
         }
@@ -234,7 +234,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
     // Do don't create the EGLSurface for everything.
     //    QWidget - yes, create the EGLSurface and store it in QGLContextPrivate::eglSurface
     //    QGLWidget - yes, create the EGLSurface and store it in QGLContextPrivate::eglSurface
-    //    QPixmap - yes, create the EGLSurface but store it in QX11PixmapData::gl_surface
+    //    QPixmap - yes, create the EGLSurface but store it in QX11PlatformPixmap::gl_surface
     //    QGLPixelBuffer - no, it creates the surface itself and stores it in QGLPixelBufferPrivate::pbuf
 
     if (devType == QInternal::Widget) {
@@ -246,12 +246,12 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
         setWindowCreated(true);
     }
 
-    if (x11PixmapData) {
+    if (x11PlatformPixmap) {
         // TODO: Actually check to see if the existing surface can be re-used
-        if (x11PixmapData->gl_surface)
-            eglDestroySurface(d->eglContext->display(), (EGLSurface)x11PixmapData->gl_surface);
+        if (x11PlatformPixmap->gl_surface)
+            eglDestroySurface(d->eglContext->display(), (EGLSurface)x11PlatformPixmap->gl_surface);
 
-        x11PixmapData->gl_surface = (void*)QEgl::createSurface(device(), d->eglContext->config());
+        x11PlatformPixmap->gl_surface = (void*)QEgl::createSurface(device(), d->eglContext->config());
     }
 
     return true;
@@ -415,17 +415,17 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
         return 0;
 
 
-    QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pixmap->data_ptr().data());
-    Q_ASSERT(pixmapData->classId() == QPixmapData::X11Class);
-    bool hasAlpha = pixmapData->hasAlphaChannel();
+    QX11PlatformPixmap *handle = static_cast<QX11PlatformPixmap*>(pixmap->data_ptr().data());
+    Q_ASSERT(handle->classId() == QPlatformPixmap::X11Class);
+    bool hasAlpha = handle->hasAlphaChannel();
     bool pixmapHasValidSurface = false;
     bool textureIsBound = false;
     GLuint textureId;
     glGenTextures(1, &textureId);
     glBindTexture(GL_TEXTURE_2D, textureId);
 
-    if (haveTFP && pixmapData->gl_surface &&
-        hasAlpha == (pixmapData->flags & QX11PixmapData::GlSurfaceCreatedWithAlpha))
+    if (haveTFP && handle->gl_surface &&
+        hasAlpha == (handle->flags & QX11PlatformPixmap::GlSurfaceCreatedWithAlpha))
     {
         pixmapHasValidSurface = true;
     }
@@ -433,11 +433,11 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
     // If we already have a valid EGL surface for the pixmap, we should use it
     if (pixmapHasValidSurface) {
         EGLBoolean success;
-        success = eglBindTexImage(QEgl::display(), (EGLSurface)pixmapData->gl_surface, EGL_BACK_BUFFER);
+        success = eglBindTexImage(QEgl::display(), (EGLSurface)handle->gl_surface, EGL_BACK_BUFFER);
         if (success == EGL_FALSE) {
             qWarning() << "eglBindTexImage() failed:" << QEgl::errorString();
-            eglDestroySurface(QEgl::display(), (EGLSurface)pixmapData->gl_surface);
-            pixmapData->gl_surface = (void*)EGL_NO_SURFACE;
+            eglDestroySurface(QEgl::display(), (EGLSurface)handle->gl_surface);
+            handle->gl_surface = (void*)EGL_NO_SURFACE;
         } else
             textureIsBound = true;
     }
@@ -469,29 +469,29 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
 
     if (!textureIsBound && haveTFP) {
         // Check to see if the surface is still valid
-        if (pixmapData->gl_surface &&
-            hasAlpha != (pixmapData->flags & QX11PixmapData::GlSurfaceCreatedWithAlpha))
+        if (handle->gl_surface &&
+            hasAlpha != (handle->flags & QX11PlatformPixmap::GlSurfaceCreatedWithAlpha))
         {
             // Surface is invalid!
-            destroyGlSurfaceForPixmap(pixmapData);
+            destroyGlSurfaceForPixmap(handle);
         }
 
-        if (pixmapData->gl_surface == 0) {
+        if (handle->gl_surface == 0) {
             EGLConfig config = QEgl::defaultConfig(QInternal::Pixmap,
                                                    QEgl::OpenGL,
                                                    hasAlpha ? QEgl::Translucent : QEgl::NoOptions);
 
-            pixmapData->gl_surface = (void*)QEgl::createSurface(pixmap, config);
-            if (pixmapData->gl_surface == (void*)EGL_NO_SURFACE)
+            handle->gl_surface = (void*)QEgl::createSurface(pixmap, config);
+            if (handle->gl_surface == (void*)EGL_NO_SURFACE)
                 return false;
         }
 
         EGLBoolean success;
-        success = eglBindTexImage(QEgl::display(), (EGLSurface)pixmapData->gl_surface, EGL_BACK_BUFFER);
+        success = eglBindTexImage(QEgl::display(), (EGLSurface)handle->gl_surface, EGL_BACK_BUFFER);
         if (success == EGL_FALSE) {
             qWarning() << "eglBindTexImage() failed:" << QEgl::errorString();
-            eglDestroySurface(QEgl::display(), (EGLSurface)pixmapData->gl_surface);
-            pixmapData->gl_surface = (void*)EGL_NO_SURFACE;
+            eglDestroySurface(QEgl::display(), (EGLSurface)handle->gl_surface);
+            handle->gl_surface = (void*)EGL_NO_SURFACE;
             haveTFP = false; // If TFP isn't working, disable it's use
         } else
             textureIsBound = true;
@@ -501,7 +501,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
 
     if (textureIsBound) {
         texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, options);
-        pixmapData->flags |= QX11PixmapData::InvertedWhenBoundToTexture;
+        handle->flags |= QX11PlatformPixmap::InvertedWhenBoundToTexture;
 
         // We assume the cost of bound pixmaps is zero
         QGLTextureCache::instance()->insert(q, key, texture, 0);
@@ -514,29 +514,29 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
 }
 
 
-void QGLContextPrivate::destroyGlSurfaceForPixmap(QPixmapData* pmd)
+void QGLContextPrivate::destroyGlSurfaceForPixmap(QPlatformPixmap* pmd)
 {
-    Q_ASSERT(pmd->classId() == QPixmapData::X11Class);
-    QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd);
-    if (pixmapData->gl_surface) {
+    Q_ASSERT(pmd->classId() == QPlatformPixmap::X11Class);
+    QX11PlatformPixmap *handle = static_cast<QX11PlatformPixmap*>(pmd);
+    if (handle->gl_surface) {
         EGLBoolean success;
-        success = eglDestroySurface(QEgl::display(), (EGLSurface)pixmapData->gl_surface);
+        success = eglDestroySurface(QEgl::display(), (EGLSurface)handle->gl_surface);
         if (success == EGL_FALSE) {
             qWarning() << "destroyGlSurfaceForPixmap() - Error deleting surface: "
                        << QEgl::errorString();
         }
-        pixmapData->gl_surface = 0;
+        handle->gl_surface = 0;
     }
 }
 
-void QGLContextPrivate::unbindPixmapFromTexture(QPixmapData* pmd)
+void QGLContextPrivate::unbindPixmapFromTexture(QPlatformPixmap* pmd)
 {
-    Q_ASSERT(pmd->classId() == QPixmapData::X11Class);
-    QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd);
-    if (pixmapData->gl_surface) {
+    Q_ASSERT(pmd->classId() == QPlatformPixmap::X11Class);
+    QX11PlatformPixmap *handle = static_cast<QX11PlatformPixmap*>(pmd);
+    if (handle->gl_surface) {
         EGLBoolean success;
         success = eglReleaseTexImage(QEgl::display(),
-                                     (EGLSurface)pixmapData->gl_surface,
+                                     (EGLSurface)handle->gl_surface,
                                      EGL_BACK_BUFFER);
         if (success == EGL_FALSE) {
             qWarning() << "unbindPixmapFromTexture() - Unable to release bound texture: "
index c9815ec..6c80724 100644 (file)
@@ -42,7 +42,7 @@
 #include "private/qpixmapfilter_p.h"
 #include "private/qpaintengineex_opengl2_p.h"
 #include "private/qglengineshadermanager_p.h"
-#include "private/qpixmapdata_p.h"
+#include "qplatformpixmap_qpa.h"
 #include "private/qimagepixmapcleanuphooks_p.h"
 #include "qglpixmapfilter_p.h"
 #include "qpaintengine_opengl_p.h"
@@ -324,7 +324,7 @@ public:
     void timerEvent(QTimerEvent *event);
 
 private:
-    static void pixmapDestroyed(QPixmapData *pixmap);
+    static void pixmapDestroyed(QPlatformPixmap *pixmap);
 
     QCache<quint64, QGLBlurTextureInfo > cache;
 
@@ -380,8 +380,8 @@ void QGLBlurTextureCache::insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTe
 {
     static bool hookAdded = false;
     if (!hookAdded) {
-        QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(pixmapDestroyed);
-        QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(pixmapDestroyed);
+        QImagePixmapCleanupHooks::instance()->addPlatformPixmapDestructionHook(pixmapDestroyed);
+        QImagePixmapCleanupHooks::instance()->addPlatformPixmapModificationHook(pixmapDestroyed);
         hookAdded = true;
     }
 
@@ -394,7 +394,7 @@ void QGLBlurTextureCache::insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTe
     timerId = startTimer(8000);
 }
 
-void QGLBlurTextureCache::pixmapDestroyed(QPixmapData *pmd)
+void QGLBlurTextureCache::pixmapDestroyed(QPlatformPixmap *pmd)
 {
     foreach (QGLBlurTextureCache *cache, blurTextureCaches) {
         if (cache->hasBlurTextureInfo(pmd->cacheKey()))
index 031d405..a3895d0 100644 (file)
@@ -76,7 +76,7 @@ public:
     ~QCocoaIntegration();
 
     bool hasCapability(QPlatformIntegration::Capability cap) const;
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWindow *window) const;
     QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
     QPlatformBackingStore *createPlatformBackingStore(QWindow *widget) const;
index 4d01aa0..95794cf 100644 (file)
@@ -103,9 +103,9 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
 
 
 
-QPixmapData *QCocoaIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QCocoaIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QPlatformWindow *QCocoaIntegration::createPlatformWindow(QWindow *window) const
index 86a8bf7..a4da2d8 100644 (file)
@@ -92,10 +92,10 @@ void QDirectFbBlitter::fillRect(const QRectF &rect, const QColor &color)
 
 void QDirectFbBlitter::drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &srcRect)
 {
-    QPixmapData *data = pixmap.pixmapData();
+    QPlatformPixmap *data = pixmap.handle();
     Q_ASSERT(data->width() && data->height());
-    Q_ASSERT(data->classId() == QPixmapData::BlitterClass);
-    QBlittablePixmapData *blitPm = static_cast<QBlittablePixmapData*>(data);
+    Q_ASSERT(data->classId() == QPlatformPixmap::BlitterClass);
+    QBlittablePlatformPixmap *blitPm = static_cast<QBlittablePlatformPixmap*>(data);
     QDirectFbBlitter *dfbBlitter = static_cast<QDirectFbBlitter *>(blitPm->blittable());
     dfbBlitter->unlock();
 
index 16d7599..2dcb2be 100644 (file)
@@ -67,7 +67,7 @@ protected:
     friend class QDirectFbConvenience;
 };
 
-class QDirectFbBlitterPixmapData : public QBlittablePixmapData
+class QDirectFbBlitterPlatformPixmap : public QBlittablePlatformPixmap
 {
 public:
     QBlittable *createBlittable(const QSize &size) const { return new QDirectFbBlitter(size); }
index 37810dc..38130c8 100644 (file)
@@ -106,9 +106,9 @@ int QDirectFbConvenience::colorDepthForSurface(const DFBSurfacePixelFormat forma
     return ((0x1f << 7) & format) >> 7;
 }
 
-IDirectFBSurface *QDirectFbConvenience::dfbSurfaceForPixmapData(QPixmapData *pixmapData)
+IDirectFBSurface *QDirectFbConvenience::dfbSurfaceForPlatformPixmap(QPlatformPixmap *handle)
 {
-    QBlittablePixmapData *blittablePmData = static_cast<QBlittablePixmapData *>(pixmapData);
+    QBlittablePlatformPixmap *blittablePmData = static_cast<QBlittablePlatformPixmap *>(handle);
     if (blittablePmData) {
         QBlittable *blittable = blittablePmData->blittable();
         QDirectFbBlitter *dfbBlitter = static_cast<QDirectFbBlitter *>(blittable);
index c82bea8..93d47f3 100644 (file)
@@ -67,7 +67,7 @@ public:
     static IDirectFB *dfbInterface();
     static IDirectFBDisplayLayer *dfbDisplayLayer(int display = DLID_PRIMARY);
 
-    static IDirectFBSurface *dfbSurfaceForPixmapData(QPixmapData *);
+    static IDirectFBSurface *dfbSurfaceForPlatformPixmap(QPlatformPixmap *);
 
     static Qt::MouseButton mouseButton(DFBInputDeviceButtonIdentifier identifier);
     static Qt::MouseButtons mouseButtons(DFBInputDeviceButtonMask mask);
index 8a38bc4..0a2a872 100644 (file)
@@ -70,7 +70,7 @@ void QDirectFBCursor::changeCursor(QCursor * cursor, QWidget * widget)
         map = cursor->pixmap();
     }
 
-    IDirectFBSurface *surface = QDirectFbConvenience::dfbSurfaceForPixmapData(map.pixmapData());
+    IDirectFBSurface *surface = QDirectFbConvenience::dfbSurfaceForPlatformPixmap(map.handle());
 
     if (m_layer->SetCooperativeLevel(m_layer, DLSCL_ADMINISTRATIVE) != DFB_OK) {
         return;
index 018a5d9..ed8e42f 100644 (file)
@@ -53,7 +53,7 @@
 #include <private/qpixmap_raster_p.h>
 
 #include <QtGui/private/qpixmap_blitter_p.h>
-#include <QtGui/private/qpixmapdata_p.h>
+#include <QtGui/qplatformpixmap_qpa.h>
 #include <QtCore/QCoreApplication>
 #include <QtCore/QThread>
 #include <QtCore/QAbstractEventDispatcher>
@@ -118,12 +118,12 @@ QDirectFbIntegration::~QDirectFbIntegration()
     delete mInput;
 }
 
-QPixmapData *QDirectFbIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QDirectFbIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    if (type == QPixmapData::BitmapType)
-        return new QRasterPixmapData(type);
+    if (type == QPlatformPixmap::BitmapType)
+        return new QRasterPlatformPixmap(type);
     else
-        return new QDirectFbBlitterPixmapData;
+        return new QDirectFbBlitterPlatformPixmap;
 }
 
 QPlatformWindow *QDirectFbIntegration::createPlatformWindow(QWidget *widget, WId winId) const
index 8195ebd..c303003 100644 (file)
@@ -85,7 +85,7 @@ public:
     QDirectFbIntegration();
     ~QDirectFbIntegration();
 
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId = 0) const;
     QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
     QAbstractEventDispatcher *createEventDispatcher() const;
index 730f01f..0cb3261 100644 (file)
@@ -63,7 +63,7 @@ QDirectFbWindowSurface::QDirectFbWindowSurface(QWidget *window, WId wId)
     dfbWindow->GetSurface(dfbWindow,&m_dfbSurface);
 //WRONGSIZE
     QDirectFbBlitter *blitter = new QDirectFbBlitter(window->rect().size(), m_dfbSurface);
-    m_pmdata = new QDirectFbBlitterPixmapData;
+    m_pmdata = new QDirectFbBlitterPlatformPixmap;
     m_pmdata->setBlittable(blitter);
     m_pixmap = new QPixmap(m_pmdata);
 }
index 7f1140d..5a631ca 100644 (file)
@@ -67,7 +67,7 @@ private:
     void lockSurfaceToImage();
 
     QPixmap *m_pixmap;
-    QBlittablePixmapData *m_pmdata;
+    QBlittablePlatformPixmap *m_pmdata;
 
     IDirectFBSurface *m_dfbSurface;
 };
index 9e8596f..716ae8a 100644 (file)
@@ -73,12 +73,12 @@ bool QEglFSIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
     }
 }
 
-QPixmapData *QEglFSIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QEglFSIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
 #ifdef QEGL_EXTRA_DEBUG
-    qWarning("QEglIntegration::createPixmapData %d\n", type);
+    qWarning("QEglIntegration::createPlatformPixmap %d\n", type);
 #endif
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QPlatformWindow *QEglFSIntegration::createPlatformWindow(QWidget *widget, WId winId) const
index 6252a9c..9b86a04 100644 (file)
@@ -57,7 +57,7 @@ public:
     QEglFSIntegration();
 
     bool hasCapability(QPlatformIntegration::Capability cap) const;
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId) const;
     QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
 
index c2388ce..1c098a0 100644 (file)
@@ -792,9 +792,9 @@ bool QLinuxFbIntegration::hasCapability(QPlatformIntegration::Capability cap) co
 }
 
 
-QPixmapData *QLinuxFbIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QLinuxFbIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QWindowSurface *QLinuxFbIntegration::createWindowSurface(QWidget *widget, WId) const
index 62c2a59..f972a30 100644 (file)
@@ -80,7 +80,7 @@ public:
 
     bool hasCapability(QPlatformIntegration::Capability cap) const;
 
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWidget *widget, WId WinId) const;
     QWindowSurface *createWindowSurface(QWidget *widget, WId WinId) const;
     QAbstractEventDispatcher *createEventDispatcher() const;
index d9f4801..71bdda7 100644 (file)
@@ -69,9 +69,9 @@ bool QMinimalIntegration::hasCapability(QPlatformIntegration::Capability cap) co
     }
 }
 
-QPixmapData *QMinimalIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QMinimalIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QPlatformWindow *QMinimalIntegration::createPlatformWindow(QWindow *window) const
index dc11175..52e4c0a 100644 (file)
@@ -71,7 +71,7 @@ public:
 
     bool hasCapability(QPlatformIntegration::Capability cap) const;
 
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWindow *window) const;
      QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
     QAbstractEventDispatcher *createEventDispatcher() const;
index 89475db..38c4325 100644 (file)
@@ -43,7 +43,7 @@
 #include "qopenkodewindow.h"
 #include "qopenkodeeventloopintegration.h"
 
-#include <QtOpenGL/private/qpixmapdata_gl_p.h>
+#include <QtOpenGL/qplatformpixmap_gl_p.h>
 #include <QtOpenGL/private/qwindowsurface_gl_p.h>
 
 #include <QtGui/private/qpixmap_raster_p.h>
@@ -197,9 +197,9 @@ bool QOpenKODEIntegration::hasCapability(QPlatformIntegration::Capability cap) c
     }
 }
 
-QPixmapData *QOpenKODEIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QOpenKODEIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QGLPixmapData(type);
+    return new QGLPlatformPixmap(type);
 }
 
 QPlatformWindow *QOpenKODEIntegration::createPlatformWindow(QWidget *tlw, WId ) const
index 0f001c9..fb68e12 100644 (file)
@@ -92,7 +92,7 @@ public:
 
     bool hasCapability(QPlatformIntegration::Capability cap) const;
 
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId = 0) const;
     QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
 
index 203896f..d8e4cc9 100644 (file)
@@ -41,7 +41,7 @@
 
 #include "qgraphicssystem_vglite.h"
 #include "qwindowsurface_vglite.h"
-#include <QtOpenVG/private/qpixmapdata_vg_p.h>
+#include <QtOpenVG/qplatformpixmap_vg_p.h>
 #include <QtGui/private/qegl_p.h>
 #include <QtCore/qdebug.h>
 #ifdef OPENVG_USBHP_INIT
@@ -163,16 +163,16 @@ QVGLiteGraphicsSystem::~QVGLiteGraphicsSystem()
 {
 }
 
-QPixmapData *QVGLiteGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QVGLiteGraphicsSystem::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
 #if !defined(QVGLite_NO_SINGLE_CONTEXT) && !defined(QVGLite_NO_PIXMAP_DATA)
-    // Pixmaps can use QVGLitePixmapData; bitmaps must use raster.
-    if (type == QPixmapData::PixmapType)
-        return new QVGPixmapData(type);
+    // Pixmaps can use QVGLitePlatformPixmap; bitmaps must use raster.
+    if (type == QPlatformPixmap::PixmapType)
+        return new QVGPlatformPixmap(type);
     else
-        return new QRasterPixmapData(type);
+        return new QRasterPlatformPixmap(type);
 #else
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 #endif
 }
 
index 41b1d28..6dc6a38 100644 (file)
@@ -57,7 +57,7 @@ public:
     QVGLiteGraphicsSystem();
     ~QVGLiteGraphicsSystem();
 
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QWindowSurface *createWindowSurface(QWidget *widget) const;
     QList<QGraphicsSystemScreen *> screens() const { return mScreens; }
 
index 214f6a8..d4d8183 100644 (file)
@@ -423,9 +423,9 @@ QVFbIntegration::QVFbIntegration(const QStringList &paramList)
     mScreens.append(mPrimaryScreen);
 }
 
-QPixmapData *QVFbIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QVFbIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QWindowSurface *QVFbIntegration::createWindowSurface(QWidget *widget, WId) const
index aaf20a3..1c736c2 100644 (file)
@@ -79,7 +79,7 @@ class QVFbIntegration : public QPlatformIntegration
 public:
     QVFbIntegration(const QStringList &paramList);
 
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId) const;
     QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
     QAbstractEventDispatcher *createEventDispatcher() const;
index 92247fd..b8a15b3 100644 (file)
@@ -52,7 +52,7 @@ public:
     QUIKitIntegration();
     ~QUIKitIntegration();
 
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId = 0) const;
     QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
 
index 737fa40..37ba2b9 100644 (file)
@@ -64,9 +64,9 @@ QUIKitIntegration::~QUIKitIntegration()
 {
 }
 
-QPixmapData *QUIKitIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QUIKitIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QPlatformWindow *QUIKitIntegration::createPlatformWindow(QWidget *widget, WId winId) const
index 459eefd..7506bff 100644 (file)
@@ -161,9 +161,9 @@ bool QVNCIntegration::hasCapability(QPlatformIntegration::Capability cap) const
 }
 
 
-QPixmapData *QVNCIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QVNCIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QWindowSurface *QVNCIntegration::createWindowSurface(QWidget *widget, WId) const
index dbdac51..9787a59 100644 (file)
@@ -82,7 +82,7 @@ public:
     QVNCIntegration(const QStringList& paramList);
 
     bool hasCapability(QPlatformIntegration::Capability cap) const;
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId) const;
     QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
     QAbstractEventDispatcher createEventDispatcher() const;
index 9a581c2..800f1fc 100644 (file)
@@ -92,9 +92,9 @@ bool QWaylandIntegration::hasCapability(QPlatformIntegration::Capability cap) co
     }
 }
 
-QPixmapData *QWaylandIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QWaylandIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) const
index c08c040..b9a01da 100644 (file)
@@ -56,7 +56,7 @@ public:
     QWaylandIntegration();
 
     bool hasCapability(QPlatformIntegration::Capability cap) const;
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWindow *window) const;
     QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
     QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
index fcc17b2..924077f 100644 (file)
@@ -102,9 +102,9 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const
     }
 }
 
-QPixmapData *QXcbIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QXcbIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const
index a89ffc8..725db7a 100644 (file)
@@ -57,7 +57,7 @@ public:
     ~QXcbIntegration();
 
     bool hasCapability(Capability cap) const;
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWindow *window) const;
     QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
     QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
index f659d43..bf3f06b 100644 (file)
@@ -59,7 +59,7 @@
 #include <EGL/egl.h>
 #endif //!defined(QT_OPENGL_ES_2)
 #include <private/qwindowsurface_gl_p.h>
-#include <private/qpixmapdata_gl_p.h>
+#include <qplatformpixmap_gl_p.h>
 #endif //QT_NO_OPENGL
 
 QT_BEGIN_NAMESPACE
@@ -83,13 +83,13 @@ bool QXlibIntegration::hasCapability(QPlatformIntegration::Capability cap) const
     }
 }
 
-QPixmapData *QXlibIntegration::createPixmapData(QPixmapData::PixelType type) const
+QPlatformPixmap *QXlibIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
 {
 #ifndef QT_NO_OPENGL
     if (mUseOpenGL)
-        return new QGLPixmapData(type);
+        return new QGLPlatformPixmap(type);
 #endif
-    return new QRasterPixmapData(type);
+    return new QRasterPlatformPixmap(type);
 }
 
 QWindowSurface *QXlibIntegration::createWindowSurface(QWidget *widget, WId) const
index ce5f35a..3261e1a 100644 (file)
@@ -61,7 +61,7 @@ public:
     QXlibIntegration(bool useOpenGL = false);
 
     bool hasCapability(Capability cap) const;
-    QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+    QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
     QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId) const;
     QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
     QAbstractEventDispatcher *createEventDispatcher() const;
index 5b06656..b0edd8d 100644 (file)
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
 QT_MODULE(Gui)
 
 class QPainter;
-class QPixmapData;
+class QPlatformPixmap;
 
 class QPixmapFilterPrivate;
 
index d29047b..50bd4b8 100644 (file)
@@ -121,16 +121,16 @@ Q_WIDGETS_EXPORT CGContextRef qt_mac_cg_context(const QPaintDevice *pdev)
         CGContextRef ret = 0;
 
         // It would make sense to put this into a mac #ifdef'ed
-        // virtual function in the QPixmapData at some point
-        if (pm->data->classId() == QPixmapData::MacClass) {
-            const QMacPixmapData *pmData = static_cast<const QMacPixmapData*>(pm->data.data());
+        // virtual function in the QPlatformPixmap at some point
+        if (pm->data->classId() == QPlatformPixmap::MacClass) {
+            const QMacPlatformPixmap *pmData = static_cast<const QMacPlatformPixmap*>(pm->data.data());
             ret = CGBitmapContextCreate(pmData->pixels, pmData->w, pmData->h,
                                                      8, pmData->bytesPerRow, colorspace,
                                                      flags);
             if(!ret)
                 qWarning("QPaintDevice: Unable to create context for pixmap (%d/%d/%d)",
                          pmData->w, pmData->h, (pmData->bytesPerRow * pmData->h));
-        } else if (pm->data->classId() == QPixmapData::RasterClass) {
+        } else if (pm->data->classId() == QPlatformPixmap::RasterClass) {
             QImage *image = pm->data->buffer();
             ret = CGBitmapContextCreate(image->bits(), image->width(), image->height(),
                                         8, image->bytesPerLine(), colorspace, flags);
index da08878..05f0138 100644 (file)
@@ -75,26 +75,26 @@ static int qt_pixmap_serial = 0;
 Q_WIDGETS_EXPORT quint32 *qt_mac_pixmap_get_base(const QPixmap *pix)
 {
     if (QApplicationPrivate::graphics_system_name == QLatin1String("raster"))
-        return reinterpret_cast<quint32 *>(static_cast<QRasterPixmapData*>(pix->data.data())->buffer()->bits());
+        return reinterpret_cast<quint32 *>(static_cast<QRasterPlatformPixmap*>(pix->data.data())->buffer()->bits());
     else
-        return static_cast<QMacPixmapData*>(pix->data.data())->pixels;
+        return static_cast<QMacPlatformPixmap*>(pix->data.data())->pixels;
 }
 
 Q_WIDGETS_EXPORT int qt_mac_pixmap_get_bytes_per_line(const QPixmap *pix)
 {
     if (QApplicationPrivate::graphics_system_name == QLatin1String("raster"))
-        return static_cast<QRasterPixmapData*>(pix->data.data())->buffer()->bytesPerLine();
+        return static_cast<QRasterPlatformPixmap*>(pix->data.data())->buffer()->bytesPerLine();
     else
-        return static_cast<QMacPixmapData*>(pix->data.data())->bytesPerRow;
+        return static_cast<QMacPlatformPixmap*>(pix->data.data())->bytesPerRow;
 }
 
 void qt_mac_cgimage_data_free(void *info, const void *memoryToFree, size_t)
 {
-    QMacPixmapData *pmdata = static_cast<QMacPixmapData *>(info);
+    QMacPlatformPixmap *pmdata = static_cast<QMacPlatformPixmap *>(info);
     if (!pmdata) {
         free(const_cast<void *>(memoryToFree));
     } else {
-        if (QMacPixmapData::validDataPointers.contains(pmdata) == false) {
+        if (QMacPlatformPixmap::validDataPointers.contains(pmdata) == false) {
             free(const_cast<void *>(memoryToFree));
             return;
         }
@@ -163,26 +163,26 @@ static inline QRgb qt_conv16ToRgb(ushort c) {
     return qRgb(tr,tg,tb);
 }
 
-QSet<QMacPixmapData*> QMacPixmapData::validDataPointers;
+QSet<QMacPlatformPixmap*> QMacPlatformPixmap::validDataPointers;
 
-QMacPixmapData::QMacPixmapData(PixelType type)
-    : QPixmapData(type, MacClass), has_alpha(0), has_mask(0),
+QMacPlatformPixmap::QMacPlatformPixmap(PixelType type)
+    : QPlatformPixmap(type, MacClass), has_alpha(0), has_mask(0),
       uninit(true), pixels(0), pixelsSize(0), pixelsToFree(0),
       bytesPerRow(0), cg_data(0), cg_dataBeingReleased(0), cg_mask(0),
       pengine(0)
 {
 }
 
-QPixmapData *QMacPixmapData::createCompatiblePixmapData() const
+QPlatformPixmap *QMacPlatformPixmap::createCompatiblePlatformPixmap() const
 {
-    return new QMacPixmapData(pixelType());
+    return new QMacPlatformPixmap(pixelType());
 }
 
 #define BEST_BYTE_ALIGNMENT 16
 #define COMPTUE_BEST_BYTES_PER_ROW(bpr) \
     (((bpr) + (BEST_BYTE_ALIGNMENT - 1)) & ~(BEST_BYTE_ALIGNMENT - 1))
 
-void QMacPixmapData::resize(int width, int height)
+void QMacPlatformPixmap::resize(int width, int height)
 {
     setSerialNumber(++qt_pixmap_serial);
 
@@ -214,7 +214,7 @@ void QMacPixmapData::resize(int width, int height)
 
 #undef COMPUTE_BEST_BYTES_PER_ROW
 
-void QMacPixmapData::fromImage(const QImage &img,
+void QMacPlatformPixmap::fromImage(const QImage &img,
                                Qt::ImageConversionFlags flags)
 {
     setSerialNumber(++qt_pixmap_serial);
@@ -371,7 +371,7 @@ int get_index(QImage * qi,QRgb mycol)
     return qi->colorCount();
 }
 
-QImage QMacPixmapData::toImage() const
+QImage QMacPlatformPixmap::toImage() const
 {
     QImage::Format format = QImage::Format_MonoLSB;
     if (d != 1) //Doesn't support index color modes
@@ -405,7 +405,7 @@ QImage QMacPixmapData::toImage() const
     return image;
 }
 
-void QMacPixmapData::fill(const QColor &fillColor)
+void QMacPlatformPixmap::fill(const QColor &fillColor)
 
 {
     { //we don't know what backend to use so we cannot paint here
@@ -427,39 +427,39 @@ void QMacPixmapData::fill(const QColor &fillColor)
         macSetHasAlpha(true);
 }
 
-QPixmap QMacPixmapData::alphaChannel() const
+QPixmap QMacPlatformPixmap::alphaChannel() const
 {
     if (!has_alpha)
         return QPixmap();
 
-    QMacPixmapData *alpha = new QMacPixmapData(PixmapType);
+    QMacPlatformPixmap *alpha = new QMacPlatformPixmap(PixmapType);
     alpha->resize(w, h);
     macGetAlphaChannel(alpha, false);
     return QPixmap(alpha);
 }
 
-void QMacPixmapData::setAlphaChannel(const QPixmap &alpha)
+void QMacPlatformPixmap::setAlphaChannel(const QPixmap &alpha)
 {
     has_mask = true;
-    QMacPixmapData *alphaData = static_cast<QMacPixmapData*>(alpha.data.data());
+    QMacPlatformPixmap *alphaData = static_cast<QMacPlatformPixmap*>(alpha.data.data());
     macSetAlphaChannel(alphaData, false);
 }
 
-QBitmap QMacPixmapData::mask() const
+QBitmap QMacPlatformPixmap::mask() const
 {
     if (!has_mask && !has_alpha)
         return QBitmap();
 
-    QMacPixmapData *mask = new QMacPixmapData(BitmapType);
+    QMacPlatformPixmap *mask = new QMacPlatformPixmap(BitmapType);
     mask->resize(w, h);
     macGetAlphaChannel(mask, true);
     return QPixmap(mask);
 }
 
-void QMacPixmapData::setMask(const QBitmap &mask)
+void QMacPlatformPixmap::setMask(const QBitmap &mask)
 {
     if (mask.isNull()) {
-        QMacPixmapData opaque(PixmapType);
+        QMacPlatformPixmap opaque(PixmapType);
         opaque.resize(w, h);
         opaque.fill(QColor(255, 255, 255, 255));
         macSetAlphaChannel(&opaque, true);
@@ -469,11 +469,11 @@ void QMacPixmapData::setMask(const QBitmap &mask)
 
     has_alpha = false;
     has_mask = true;
-    QMacPixmapData *maskData = static_cast<QMacPixmapData*>(mask.data.data());
+    QMacPlatformPixmap *maskData = static_cast<QMacPlatformPixmap*>(mask.data.data());
     macSetAlphaChannel(maskData, true);
 }
 
-int QMacPixmapData::metric(QPaintDevice::PaintDeviceMetric theMetric) const
+int QMacPlatformPixmap::metric(QPaintDevice::PaintDeviceMetric theMetric) const
 {
     switch (theMetric) {
     case QPaintDevice::PdmWidth:
@@ -504,7 +504,7 @@ int QMacPixmapData::metric(QPaintDevice::PaintDeviceMetric theMetric) const
     return 0;
 }
 
-QMacPixmapData::~QMacPixmapData()
+QMacPlatformPixmap::~QMacPlatformPixmap()
 {
     validDataPointers.remove(this);
     if (cg_mask) {
@@ -521,7 +521,7 @@ QMacPixmapData::~QMacPixmapData()
     free(pixelsToFree);
 }
 
-void QMacPixmapData::macSetAlphaChannel(const QMacPixmapData *pix, bool asMask)
+void QMacPlatformPixmap::macSetAlphaChannel(const QMacPlatformPixmap *pix, bool asMask)
 {
     if (!pixels || !h || !w || pix->w != w || pix->h != h)
         return;
@@ -567,7 +567,7 @@ void QMacPixmapData::macSetAlphaChannel(const QMacPixmapData *pix, bool asMask)
     macSetHasAlpha(true);
 }
 
-void QMacPixmapData::macGetAlphaChannel(QMacPixmapData *pix, bool asMask) const
+void QMacPlatformPixmap::macGetAlphaChannel(QMacPlatformPixmap *pix, bool asMask) const
 {
     quint32 *dptr = pix->pixels, *drow;
     const uint dbpr = pix->bytesPerRow;
@@ -592,13 +592,13 @@ void QMacPixmapData::macGetAlphaChannel(QMacPixmapData *pix, bool asMask) const
     }
 }
 
-void QMacPixmapData::macSetHasAlpha(bool b)
+void QMacPlatformPixmap::macSetHasAlpha(bool b)
 {
     has_alpha = b;
     macReleaseCGImageRef();
 }
 
-void QMacPixmapData::macCreateCGImageRef()
+void QMacPlatformPixmap::macCreateCGImageRef()
 {
     Q_ASSERT(cg_data == 0);
     //create the cg data
@@ -615,7 +615,7 @@ void QMacPixmapData::macCreateCGImageRef()
                             cgflags, provider, 0, 0, kCGRenderingIntentDefault);
 }
 
-void QMacPixmapData::macReleaseCGImageRef()
+void QMacPlatformPixmap::macReleaseCGImageRef()
 {
     if (!cg_data)
         return;  // There's nothing we need to do
@@ -634,7 +634,7 @@ void QMacPixmapData::macReleaseCGImageRef()
 
 // We create our space in memory to paint on here. If we already have existing pixels
 // copy them over. This is to preserve the fact that CGImageRef's are immutable.
-void QMacPixmapData::macCreatePixels()
+void QMacPlatformPixmap::macCreatePixels()
 {
     const int numBytes = bytesPerRow * h;
     quint32 *base_pixels;
@@ -654,7 +654,7 @@ void QMacPixmapData::macCreatePixels()
 }
 
 #if 0
-QPixmap QMacPixmapData::transformed(const QTransform &transform,
+QPixmap QMacPlatformPixmap::transformed(const QTransform &transform,
                                     Qt::TransformationMode mode) const
 {
     int w, h;  // size of target pixmap
@@ -682,15 +682,15 @@ QPixmap QMacPixmapData::transformed(const QTransform &transform,
         return QPixmap();
 
     // create destination
-    QMacPixmapData *pm = new QMacPixmapData(pixelType(), w, h);
+    QMacPlatformPixmap *pm = new QMacPlatformPixmap(pixelType(), w, h);
     const quint32 *sptr = pixels;
     quint32 *dptr = pm->pixels;
     memset(dptr, 0, (pm->bytesPerRow * pm->h));
 
     // do the transform
     if (mode == Qt::SmoothTransformation) {
-#warning QMacPixmapData::transformed not properly implemented
-        qWarning("QMacPixmapData::transformed not properly implemented");
+#warning QMacPlatformPixmap::transformed not properly implemented
+        qWarning("QMacPlatformPixmap::transformed not properly implemented");
 #if 0
         QPainter p(&pm);
         p.setRenderHint(QPainter::Antialiasing);
@@ -709,7 +709,7 @@ QPixmap QMacPixmapData::transformed(const QTransform &transform,
         if (!qt_xForm_helper(mat, 0, QT_XFORM_TYPE_MSBFIRST, bpp,
                              (uchar*)dptr, xbpl, (pm->bytesPerRow) - xbpl,
                              h, (uchar*)sptr, (bytesPerRow), ws, hs)) {
-            qWarning("QMacPixmapData::transform(): failure");
+            qWarning("QMacPlatformPixmap::transform(): failure");
             return QPixmap();
         }
     }
@@ -984,27 +984,27 @@ Qt::HANDLE QPixmap::macCGHandle() const
     if (isNull())
         return 0;
 
-    if (data->classId() == QPixmapData::MacClass) {
-        QMacPixmapData *d = static_cast<QMacPixmapData *>(data.data());
+    if (data->classId() == QPlatformPixmap::MacClass) {
+        QMacPlatformPixmap *d = static_cast<QMacPlatformPixmap *>(data.data());
         if (!d->cg_data)
             d->macCreateCGImageRef();
         CGImageRef ret = d->cg_data;
         CGImageRetain(ret);
         return ret;
-    } else if (data->classId() == QPixmapData::RasterClass) {
-        return qt_mac_image_to_cgimage(static_cast<QRasterPixmapData *>(data.data())->image);
+    } else if (data->classId() == QPlatformPixmap::RasterClass) {
+        return qt_mac_image_to_cgimage(static_cast<QRasterPlatformPixmap *>(data.data())->image);
     }
     return 0;
 }
 
-bool QMacPixmapData::hasAlphaChannel() const
+bool QMacPlatformPixmap::hasAlphaChannel() const
 {
     return has_alpha;
 }
 
 CGImageRef qt_mac_create_imagemask(const QPixmap &pixmap, const QRectF &sr)
 {
-    QMacPixmapData *px = static_cast<QMacPixmapData*>(pixmap.data.data());
+    QMacPlatformPixmap *px = static_cast<QMacPlatformPixmap*>(pixmap.data.data());
     if (px->cg_mask) {
         if (px->cg_mask_rect == sr) {
             CGImageRetain(px->cg_mask); //reference for the caller
@@ -1114,23 +1114,23 @@ IconRef qt_mac_create_iconref(const QPixmap &px)
 #endif
 
 /*! \internal */
-QPaintEngine* QMacPixmapData::paintEngine() const
+QPaintEngine* QMacPlatformPixmap::paintEngine() const
 {
     if (!pengine) {
-        QMacPixmapData *that = const_cast<QMacPixmapData*>(this);
+        QMacPlatformPixmap *that = const_cast<QMacPlatformPixmap*>(this);
         that->pengine = new QCoreGraphicsPaintEngine();
     }
     return pengine;
 }
 
-void QMacPixmapData::copy(const QPixmapData *data, const QRect &rect)
+void QMacPlatformPixmap::copy(const QPlatformPixmap *data, const QRect &rect)
 {
     if (data->pixelType() == BitmapType) {
         QBitmap::fromImage(toImage().copy(rect));
         return;
     }
 
-    const QMacPixmapData *macData = static_cast<const QMacPixmapData*>(data);
+    const QMacPlatformPixmap *macData = static_cast<const QMacPlatformPixmap*>(data);
 
     resize(rect.width(), rect.height());
 
@@ -1152,7 +1152,7 @@ void QMacPixmapData::copy(const QPixmapData *data, const QRect &rect)
     has_mask = macData->has_mask;
 }
 
-bool QMacPixmapData::scroll(int dx, int dy, const QRect &rect)
+bool QMacPlatformPixmap::scroll(int dx, int dy, const QRect &rect)
 {
     Q_UNUSED(dx);
     Q_UNUSED(dy);
index 3a5d97d..4f53160 100644 (file)
 // We mean it.
 //
 
-#include <QtGui/private/qpixmapdata_p.h>
-#include <QtGui/private/qpixmapdatafactory_p.h>
+#include <QtGui/qplatformpixmap_qpa.h>
+#include <QtGui/qplatformpixmapfactory_p.h>
 #include <QtGui/private/qt_mac_p.h>
 
 QT_BEGIN_NAMESPACE
 
-class QMacPixmapData : public QPixmapData
+class QMacPlatformPixmap : public QPlatformPixmap
 {
 public:
-    QMacPixmapData(PixelType type);
-    ~QMacPixmapData();
+    QMacPlatformPixmap(PixelType type);
+    ~QMacPlatformPixmap();
 
-    QPixmapData *createCompatiblePixmapData() const;
+    QPlatformPixmap *createCompatiblePlatformPixmap() const;
 
     void resize(int width, int height);
     void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
-    void copy(const QPixmapData *data, const QRect &rect);
+    void copy(const QPlatformPixmap *data, const QRect &rect);
     bool scroll(int dx, int dy, const QRect &rect);
 
     int metric(QPaintDevice::PaintDeviceMetric metric) const;
@@ -89,8 +89,8 @@ private:
     uint has_alpha : 1, has_mask : 1, uninit : 1;
 
     void macSetHasAlpha(bool b);
-    void macGetAlphaChannel(QMacPixmapData *, bool asMask) const;
-    void macSetAlphaChannel(const QMacPixmapData *, bool asMask);
+    void macGetAlphaChannel(QMacPlatformPixmap *, bool asMask) const;
+    void macSetAlphaChannel(const QMacPlatformPixmap *, bool asMask);
     void macCreateCGImageRef();
     void macCreatePixels();
     void macReleaseCGImageRef();
@@ -112,7 +112,7 @@ private:
     uint bytesPerRow;
     QRectF cg_mask_rect;
     CGImageRef cg_data, cg_dataBeingReleased, cg_mask;
-    static QSet<QMacPixmapData*> validDataPointers;
+    static QSet<QMacPlatformPixmap*> validDataPointers;
 
     QPaintEngine *pengine;
 
index f0739cd..69d321d 100644 (file)
@@ -1905,7 +1905,7 @@ void qt_cleanup()
         qt_S60Beep = 0;
     }
     QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles
-    QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles
+    QPixmapCache::clear(); // Has to happen now, since QS60PlatformPixmap has FBS handles
 
 #ifdef QT_NO_FREETYPE
     qt_cleanup_symbianFontDatabase();
index 091e2e6..6798400 100644 (file)
@@ -51,8 +51,8 @@ public:
     QS60PaintEnginePrivate() {}
 };
 
-QS60PaintEngine::QS60PaintEngine(QPaintDevice *device, QS60PixmapData *data)
-    : QRasterPaintEngine(*(new QS60PaintEnginePrivate), device), pixmapData(data)
+QS60PaintEngine::QS60PaintEngine(QPaintDevice *device, QS60PlatformPixmap *data)
+    : QRasterPaintEngine(*(new QS60PaintEnginePrivate), device), handle(data)
 {
 }
 
@@ -60,11 +60,11 @@ bool QS60PaintEngine::begin(QPaintDevice *device)
 {
     Q_D(QS60PaintEngine);
 
-    if (pixmapData->classId() == QPixmapData::RasterClass) {
-        pixmapData->beginDataAccess();
+    if (handle->classId() == QPlatformPixmap::RasterClass) {
+        handle->beginDataAccess();
         bool ret = QRasterPaintEngine::begin(device);
         // Make sure QPaintEngine::paintDevice() returns the proper device.
-        // QRasterPaintEngine changes pdev to QImage in case of RasterClass QPixmapData
+        // QRasterPaintEngine changes pdev to QImage in case of RasterClass QPlatformPixmap
         // which is incorrect in Symbian.
         d->pdev = device;
         return ret;
@@ -75,9 +75,9 @@ bool QS60PaintEngine::begin(QPaintDevice *device)
 
 bool QS60PaintEngine::end()
 {
-    if (pixmapData->classId() == QPixmapData::RasterClass) {
+    if (handle->classId() == QPlatformPixmap::RasterClass) {
         bool ret = QRasterPaintEngine::end();
-        pixmapData->endDataAccess();
+        handle->endDataAccess();
         return ret;
     }
     return QRasterPaintEngine::end();
@@ -85,13 +85,13 @@ bool QS60PaintEngine::end()
 
 void QS60PaintEngine::drawPixmap(const QPointF &p, const QPixmap &pm)
 {
-    if (pm.pixmapData()->classId() == QPixmapData::RasterClass) {
-        QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
+    if (pm.handle()->classId() == QPlatformPixmap::RasterClass) {
+        QS60PlatformPixmap *srcData = static_cast<QS60PlatformPixmap *>(pm.handle());
         srcData->beginDataAccess();
         QRasterPaintEngine::drawPixmap(p, pm);
         srcData->endDataAccess();
     } else {
-        void *nativeData = pm.pixmapData()->toNativeType(QPixmapData::VolatileImage);
+        void *nativeData = pm.handle()->toNativeType(QPlatformPixmap::VolatileImage);
         if (nativeData) {
             QVolatileImage *img = static_cast<QVolatileImage *>(nativeData);
             img->beginDataAccess();
@@ -105,13 +105,13 @@ void QS60PaintEngine::drawPixmap(const QPointF &p, const QPixmap &pm)
 
 void QS60PaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
 {
-    if (pm.pixmapData()->classId() == QPixmapData::RasterClass) {
-        QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
+    if (pm.handle()->classId() == QPlatformPixmap::RasterClass) {
+        QS60PlatformPixmap *srcData = static_cast<QS60PlatformPixmap *>(pm.handle());
         srcData->beginDataAccess();
         QRasterPaintEngine::drawPixmap(r, pm, sr);
         srcData->endDataAccess();
     } else {
-        void *nativeData = pm.pixmapData()->toNativeType(QPixmapData::VolatileImage);
+        void *nativeData = pm.handle()->toNativeType(QPlatformPixmap::VolatileImage);
         if (nativeData) {
             QVolatileImage *img = static_cast<QVolatileImage *>(nativeData);
             img->beginDataAccess();
@@ -125,8 +125,8 @@ void QS60PaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRect
 
 void QS60PaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr)
 {
-    if (pm.pixmapData()->classId() == QPixmapData::RasterClass) {
-        QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
+    if (pm.handle()->classId() == QPlatformPixmap::RasterClass) {
+        QS60PlatformPixmap *srcData = static_cast<QS60PlatformPixmap *>(pm.handle());
         srcData->beginDataAccess();
         QRasterPaintEngine::drawTiledPixmap(r, pm, sr);
         srcData->endDataAccess();
index 2a3b443..4cea879 100644 (file)
 QT_BEGIN_NAMESPACE
 
 class QS60PaintEnginePrivate;
-class QS60PixmapData;
+class QS60PlatformPixmap;
 
 class QS60PaintEngine : public QRasterPaintEngine
 {
     Q_DECLARE_PRIVATE(QS60PaintEngine)
 
 public:
-    QS60PaintEngine(QPaintDevice *device, QS60PixmapData* data);
+    QS60PaintEngine(QPaintDevice *device, QS60PlatformPixmap* data);
     bool begin(QPaintDevice *device);
     bool end();
 
@@ -76,7 +76,7 @@ public:
     void prepare(QImage* image);
 
 private:
-    QS60PixmapData *pixmapData;
+    QS60PlatformPixmap *handle;
 };
 
 QT_END_NAMESPACE
index ac29f5d..5e14745 100644 (file)
@@ -65,10 +65,10 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08,
                                      0x10, 0x20, 0x40, 0x80 };
 
 static bool cleanup_function_registered = false;
-static QS60PixmapData *firstPixmap = 0;
+static QS60PlatformPixmap *firstPixmap = 0;
 
 // static
-void QS60PixmapData::qt_symbian_register_pixmap(QS60PixmapData *pd)
+void QS60PlatformPixmap::qt_symbian_register_pixmap(QS60PlatformPixmap *pd)
 {
     if (!cleanup_function_registered) {
         qAddPostRoutine(qt_symbian_release_pixmaps);
@@ -83,7 +83,7 @@ void QS60PixmapData::qt_symbian_register_pixmap(QS60PixmapData *pd)
 }
 
 // static
-void QS60PixmapData::qt_symbian_unregister_pixmap(QS60PixmapData *pd)
+void QS60PlatformPixmap::qt_symbian_unregister_pixmap(QS60PlatformPixmap *pd)
 {
     if (pd->next)
         pd->next->prev = pd->prev;
@@ -94,10 +94,10 @@ void QS60PixmapData::qt_symbian_unregister_pixmap(QS60PixmapData *pd)
 }
 
 // static
-void QS60PixmapData::qt_symbian_release_pixmaps()
+void QS60PlatformPixmap::qt_symbian_release_pixmaps()
 {
-    // Scan all QS60PixmapData objects in the system and destroy them.
-    QS60PixmapData *pd = firstPixmap;
+    // Scan all QS60PlatformPixmap objects in the system and destroy them.
+    QS60PlatformPixmap *pd = firstPixmap;
     while (pd != 0) {
         pd->release();
         pd = pd->next;
@@ -358,11 +358,11 @@ QPixmap QPixmap::grabWindow(WId winId, int x, int y, int w, int h)
 */
 CFbsBitmap *QPixmap::toSymbianCFbsBitmap() const
 {
-    QPixmapData *data = pixmapData();
+    QPlatformPixmap *data = handle();
     if (!data || data->isNull())
         return 0;
 
-    return reinterpret_cast<CFbsBitmap*>(data->toNativeType(QPixmapData::FbsBitmap));
+    return reinterpret_cast<CFbsBitmap*>(data->toNativeType(QPlatformPixmap::FbsBitmap));
 }
 
 /*!
@@ -387,13 +387,13 @@ QPixmap QPixmap::fromSymbianCFbsBitmap(CFbsBitmap *bitmap)
     if (!bitmap)
         return QPixmap();
 
-    QScopedPointer<QPixmapData> data(QPixmapData::create(0,0, QPixmapData::PixmapType));
-    data->fromNativeType(reinterpret_cast<void*>(bitmap), QPixmapData::FbsBitmap);
+    QScopedPointer<QPlatformPixmap> data(QPlatformPixmap::create(0,0, QPlatformPixmap::PixmapType));
+    data->fromNativeType(reinterpret_cast<void*>(bitmap), QPlatformPixmap::FbsBitmap);
     QPixmap pixmap(data.take());
     return pixmap;
 }
 
-QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type),
+QS60PlatformPixmap::QS60PlatformPixmap(PixelType type) : QRasterPlatformPixmap(type),
     symbianBitmapDataAccess(new QSymbianBitmapDataAccess),
     cfbsBitmap(0),
     pengine(0),
@@ -405,14 +405,14 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type),
     qt_symbian_register_pixmap(this);
 }
 
-QS60PixmapData::~QS60PixmapData()
+QS60PlatformPixmap::~QS60PlatformPixmap()
 {
     release();
     delete symbianBitmapDataAccess;
     qt_symbian_unregister_pixmap(this);
 }
 
-void QS60PixmapData::resize(int width, int height)
+void QS60PlatformPixmap::resize(int width, int height)
 {
     if (width <= 0 || height <= 0) {
         w = width;
@@ -446,7 +446,7 @@ void QS60PixmapData::resize(int width, int height)
     }
 }
 
-void QS60PixmapData::release()
+void QS60PlatformPixmap::release()
 {
     if (cfbsBitmap) {
         QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
@@ -464,7 +464,7 @@ void QS60PixmapData::release()
 /*!
  * Takes ownership of bitmap. Used by window surface
  */
-void QS60PixmapData::fromSymbianBitmap(CFbsBitmap* bitmap, bool lockFormat)
+void QS60PlatformPixmap::fromSymbianBitmap(CFbsBitmap* bitmap, bool lockFormat)
 {
     Q_ASSERT(bitmap);
 
@@ -496,9 +496,9 @@ void QS60PixmapData::fromSymbianBitmap(CFbsBitmap* bitmap, bool lockFormat)
     }
 }
 
-QImage QS60PixmapData::toImage(const QRect &r) const
+QImage QS60PlatformPixmap::toImage(const QRect &r) const
 {
-    QS60PixmapData *that = const_cast<QS60PixmapData*>(this);
+    QS60PlatformPixmap *that = const_cast<QS60PlatformPixmap*>(this);
     that->beginDataAccess();
     QImage copy = that->image.copy(r);
     that->endDataAccess();
@@ -506,7 +506,7 @@ QImage QS60PixmapData::toImage(const QRect &r) const
     return copy;
 }
 
-void QS60PixmapData::fromImage(const QImage &img, Qt::ImageConversionFlags flags)
+void QS60PlatformPixmap::fromImage(const QImage &img, Qt::ImageConversionFlags flags)
 {
     release();
 
@@ -588,21 +588,21 @@ void QS60PixmapData::fromImage(const QImage &img, Qt::ImageConversionFlags flags
        }
 }
 
-void QS60PixmapData::copy(const QPixmapData *data, const QRect &rect)
+void QS60PlatformPixmap::copy(const QPlatformPixmap *data, const QRect &rect)
 {
-    const QS60PixmapData *s60Data = static_cast<const QS60PixmapData*>(data);
+    const QS60PlatformPixmap *s60Data = static_cast<const QS60PlatformPixmap*>(data);
     fromImage(s60Data->toImage(rect), Qt::AutoColor | Qt::OrderedAlphaDither);
 }
 
-bool QS60PixmapData::scroll(int dx, int dy, const QRect &rect)
+bool QS60PlatformPixmap::scroll(int dx, int dy, const QRect &rect)
 {
     beginDataAccess();
-    bool res = QRasterPixmapData::scroll(dx, dy, rect);
+    bool res = QRasterPlatformPixmap::scroll(dx, dy, rect);
     endDataAccess();
     return res;
 }
 
-int QS60PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
+int QS60PlatformPixmap::metric(QPaintDevice::PaintDeviceMetric metric) const
 {
     if (!cfbsBitmap)
         return 0;
@@ -633,7 +633,7 @@ int QS60PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
 
 }
 
-void QS60PixmapData::fill(const QColor &color)
+void QS60PlatformPixmap::fill(const QColor &color)
 {
     if (color.alpha() != 255) {
         QImage im(width(), height(), QImage::Format_ARGB32_Premultiplied);
@@ -642,12 +642,12 @@ void QS60PixmapData::fill(const QColor &color)
         fromImage(im, Qt::AutoColor | Qt::OrderedAlphaDither);
     } else {
         beginDataAccess();
-        QRasterPixmapData::fill(color);
+        QRasterPlatformPixmap::fill(color);
         endDataAccess();
     }
 }
 
-void QS60PixmapData::setMask(const QBitmap &mask)
+void QS60PlatformPixmap::setMask(const QBitmap &mask)
 {
     if (mask.size().isEmpty()) {
         if (image.depth() != 1) {
@@ -657,7 +657,7 @@ void QS60PixmapData::setMask(const QBitmap &mask)
         }
     } else if (image.depth() == 1) {
         beginDataAccess();
-        QRasterPixmapData::setMask(mask);
+        QRasterPlatformPixmap::setMask(mask);
         endDataAccess();
     } else {
         const int w = image.width();
@@ -678,7 +678,7 @@ void QS60PixmapData::setMask(const QBitmap &mask)
     }
 }
 
-void QS60PixmapData::setAlphaChannel(const QPixmap &alphaChannel)
+void QS60PlatformPixmap::setAlphaChannel(const QPixmap &alphaChannel)
 {
     QImage img(toImage());
     img.setAlphaChannel(alphaChannel.toImage());
@@ -686,21 +686,21 @@ void QS60PixmapData::setAlphaChannel(const QPixmap &alphaChannel)
     fromImage(img, Qt::OrderedDither | Qt::OrderedAlphaDither);
 }
 
-QImage QS60PixmapData::toImage() const
+QImage QS60PlatformPixmap::toImage() const
 {
     return toImage(QRect());
 }
 
-QPaintEngine* QS60PixmapData::paintEngine() const
+QPaintEngine* QS60PlatformPixmap::paintEngine() const
 {
     if (!pengine) {
-        QS60PixmapData *that = const_cast<QS60PixmapData*>(this);
+        QS60PlatformPixmap *that = const_cast<QS60PlatformPixmap*>(this);
         that->pengine = new QS60PaintEngine(&that->image, that);
     }
     return pengine;
 }
 
-void QS60PixmapData::beginDataAccess()
+void QS60PlatformPixmap::beginDataAccess()
 {
     if(!cfbsBitmap)
         return;
@@ -745,7 +745,7 @@ void QS60PixmapData::beginDataAccess()
     }
 }
 
-void QS60PixmapData::endDataAccess(bool readOnly) const
+void QS60PlatformPixmap::endDataAccess(bool readOnly) const
 {
     Q_UNUSED(readOnly);
 
@@ -778,8 +778,8 @@ QPixmap QPixmap::fromSymbianRSgImage(RSgImage *sgImage)
     if (!sgImage)
         return QPixmap();
 
-    QScopedPointer<QPixmapData> data(QPixmapData::create(0,0, QPixmapData::PixmapType));
-    data->fromNativeType(reinterpret_cast<void*>(sgImage), QPixmapData::SgImage);
+    QScopedPointer<QPlatformPixmap> data(QPlatformPixmap::create(0,0, QPlatformPixmap::PixmapType));
+    data->fromNativeType(reinterpret_cast<void*>(sgImage), QPlatformPixmap::SgImage);
     QPixmap pixmap(data.take());
     return pixmap;
 }
@@ -807,16 +807,16 @@ RSgImage *QPixmap::toSymbianRSgImage() const
     if (isNull())
         return 0;
 
-    RSgImage *sgImage = reinterpret_cast<RSgImage*>(pixmapData()->toNativeType(QPixmapData::SgImage));
+    RSgImage *sgImage = reinterpret_cast<RSgImage*>(handle()->toNativeType(QPlatformPixmap::SgImage));
 
     return sgImage;
 }
 
-void* QS60PixmapData::toNativeType(NativeType type)
+void* QS60PlatformPixmap::toNativeType(NativeType type)
 {
-    if (type == QPixmapData::SgImage) {
+    if (type == QPlatformPixmap::SgImage) {
         return 0;
-    } else if (type == QPixmapData::FbsBitmap) {
+    } else if (type == QPlatformPixmap::FbsBitmap) {
 
         if (isNull() || !cfbsBitmap)
             return 0;
@@ -895,11 +895,11 @@ void* QS60PixmapData::toNativeType(NativeType type)
     return 0;
 }
 
-void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType)
+void QS60PlatformPixmap::fromNativeType(void* pixmap, NativeType nativeType)
 {
-    if (nativeType == QPixmapData::SgImage) {
+    if (nativeType == QPlatformPixmap::SgImage) {
         return;
-    } else if (nativeType == QPixmapData::FbsBitmap && pixmap) {
+    } else if (nativeType == QPlatformPixmap::FbsBitmap && pixmap) {
 
         CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap);
 
@@ -955,8 +955,8 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType)
 
 
         type = (format != QImage::Format_MonoLSB)
-                    ? QPixmapData::PixmapType
-                    : QPixmapData::BitmapType;
+                    ? QPlatformPixmap::PixmapType
+                    : QPlatformPixmap::BitmapType;
 
         if (needsCopy) {
 
@@ -1005,7 +1005,7 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType)
     }
 }
 
-void QS60PixmapData::convertToDisplayMode(int mode)
+void QS60PlatformPixmap::convertToDisplayMode(int mode)
 {
     const TDisplayMode displayMode = static_cast<TDisplayMode>(mode);
     if (!cfbsBitmap || cfbsBitmap->DisplayMode() == displayMode)
@@ -1032,9 +1032,9 @@ void QS60PixmapData::convertToDisplayMode(int mode)
     UPDATE_BUFFER();
 }
 
-QPixmapData *QS60PixmapData::createCompatiblePixmapData() const
+QPlatformPixmap *QS60PlatformPixmap::createCompatiblePlatformPixmap() const
 {
-    return new QS60PixmapData(pixelType());
+    return new QS60PlatformPixmap(pixelType());
 }
 
 QT_END_NAMESPACE
index e481549..2f282e9 100644 (file)
@@ -81,17 +81,17 @@ private:
     bool wasLocked;
 };
 
-class QS60PixmapData : public QRasterPixmapData
+class QS60PlatformPixmap : public QRasterPlatformPixmap
 {
 public:
-    QS60PixmapData(PixelType type);
-    ~QS60PixmapData();
+    QS60PlatformPixmap(PixelType type);
+    ~QS60PlatformPixmap();
 
-    QPixmapData *createCompatiblePixmapData() const;
+    QPlatformPixmap *createCompatiblePlatformPixmap() const;
 
     void resize(int width, int height);
     void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
-    void copy(const QPixmapData *data, const QRect &rect);
+    void copy(const QPlatformPixmap *data, const QRect &rect);
     bool scroll(int dx, int dy, const QRect &rect);
 
     int metric(QPaintDevice::PaintDeviceMetric metric) const;
@@ -122,11 +122,11 @@ private:
 
     bool formatLocked;
 
-    QS60PixmapData *next;
-    QS60PixmapData *prev;
+    QS60PlatformPixmap *next;
+    QS60PlatformPixmap *prev;
 
-    static void qt_symbian_register_pixmap(QS60PixmapData *pd);
-    static void qt_symbian_unregister_pixmap(QS60PixmapData *pd);
+    static void qt_symbian_register_pixmap(QS60PlatformPixmap *pd);
+    static void qt_symbian_unregister_pixmap(QS60PlatformPixmap *pd);
     static void qt_symbian_release_pixmaps();
 
     friend class QPixmap;
index 0aaf30b..c5adb48 100644 (file)
@@ -125,8 +125,8 @@ HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const
         return 0;
 
     HBITMAP bitmap = 0;
-    if (data->classId() == QPixmapData::RasterClass) {
-        QRasterPixmapData* d = static_cast<QRasterPixmapData*>(data.data());
+    if (data->classId() == QPlatformPixmap::RasterClass) {
+        QRasterPlatformPixmap* d = static_cast<QRasterPlatformPixmap*>(data.data());
         int w = d->image.width();
         int h = d->image.height();
 
@@ -168,8 +168,8 @@ HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const
             memcpy(pixels + y * bytes_per_line, image.scanLine(y), bytes_per_line);
 
     } else {
-        QPixmapData *data = new QRasterPixmapData(depth() == 1 ?
-                                                  QPixmapData::BitmapType : QPixmapData::PixmapType);
+        QPlatformPixmap *data = new QRasterPlatformPixmap(depth() == 1 ?
+                                                  QPlatformPixmap::BitmapType : QPlatformPixmap::PixmapType);
         data->fromImage(toImage(), Qt::AutoColor);
         return QPixmap(data).toWinHBITMAP(format);
     }
index 167e8f8..1132d37 100644 (file)
@@ -539,8 +539,8 @@ void QCursorData::update()
         fg.green = 0;
         fg.blue  = 0;
         QImage image = QApplicationPrivate::instance()->getPixmapCursor(cshape).toImage();
-        pm = QX11PixmapData::createBitmapFromImage(image);
-        pmm = QX11PixmapData::createBitmapFromImage(image.createAlphaMask().convertToFormat(QImage::Format_MonoLSB));
+        pm = QX11PlatformPixmap::createBitmapFromImage(image);
+        pmm = QX11PlatformPixmap::createBitmapFromImage(image.createAlphaMask().convertToFormat(QImage::Format_MonoLSB));
         hcurs = XCreatePixmapCursor(dpy, pm, pmm, &fg, &bg, 8, 8);
     }
 
index c23fb0c..be42197 100644 (file)
@@ -641,7 +641,7 @@ QBitmap QFontEngineXLFD::bitmapForGlyphs(const QGlyphLayout &glyphs, const glyph
     if (w <= 0 || h <= 0)
         return QBitmap();
 
-    QPixmapData *data = new QX11PixmapData(QPixmapData::BitmapType);
+    QPlatformPixmap *data = new QX11PlatformPixmap(QPlatformPixmap::BitmapType);
     data->resize(w, h);
     QPixmap bm(data);
     QPainter p(&bm);
index 6b48081..3cb3e3c 100644 (file)
@@ -487,7 +487,7 @@ bool QX11PaintEngine::begin(QPaintDevice *pdev)
             d->picture = (::Picture)w->x11PictureHandle();
     } else if (pdev->devType() == QInternal::Pixmap) {
         const QPixmap *pm = static_cast<const QPixmap *>(pdev);
-        QX11PixmapData *data = static_cast<QX11PixmapData*>(pm->data.data());
+        QX11PlatformPixmap *data = static_cast<QX11PlatformPixmap*>(pm->data.data());
         if (X11->use_xrender && data->depth() != 32 && data->x11_mask)
             data->convertToARGB32();
         d->picture = (::Picture)static_cast<const QPixmap *>(pdev)->x11PictureHandle();
@@ -1370,7 +1370,7 @@ void QX11PaintEngine::updateBrush(const QBrush &brush, const QPointF &origin)
                 XRenderPictureAttributes attrs;
                 attrs.repeat = true;
                 XRenderChangePicture(d->dpy, d->brush_pm.x11PictureHandle(), CPRepeat, &attrs);
-                QX11PixmapData *data = static_cast<QX11PixmapData*>(d->brush_pm.data.data());
+                QX11PlatformPixmap *data = static_cast<QX11PlatformPixmap*>(d->brush_pm.data.data());
                 if (data->mask_picture)
                     XRenderChangePicture(d->dpy, data->mask_picture, CPRepeat, &attrs);
             }
@@ -1408,13 +1408,13 @@ void QX11PaintEngine::updateBrush(const QBrush &brush, const QPointF &origin)
 #ifndef QT_NO_XRENDER
             if (d->pdev_depth == 32 && d->brush_pm.depth() != 32) {
                 d->brush_pm.detach();
-                QX11PixmapData *brushData = static_cast<QX11PixmapData*>(d->brush_pm.data.data());
+                QX11PlatformPixmap *brushData = static_cast<QX11PlatformPixmap*>(d->brush_pm.data.data());
                 brushData->convertToARGB32();
             }
 #endif
             vals.tile = (d->brush_pm.depth() == d->pdev_depth
                          ? d->brush_pm.handle()
-                         : static_cast<QX11PixmapData*>(d->brush_pm.data.data())->x11ConvertToDefaultDepth());
+                         : static_cast<QX11PlatformPixmap*>(d->brush_pm.data.data())->x11ConvertToDefaultDepth());
             s = FillTiled;
 #if !defined(QT_NO_XRENDER)
             d->current_brush = d->cbrush.texture().x11PictureHandle();
@@ -1925,7 +1925,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
     QPixmap::x11SetDefaultScreen(pixmap.x11Info().screen());
 
 #ifndef QT_NO_XRENDER
-    ::Picture src_pict = static_cast<QX11PixmapData*>(pixmap.data.data())->picture;
+    ::Picture src_pict = static_cast<QX11PlatformPixmap*>(pixmap.data.data())->picture;
     if (src_pict && d->picture) {
         const int pDepth = pixmap.depth();
         if (pDepth == 1 && (d->has_alpha_pen)) {
@@ -1944,7 +1944,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
     bool mono_dst = d->pdev_depth == 1;
     bool restore_clip = false;
 
-    if (static_cast<QX11PixmapData*>(pixmap.data.data())->x11_mask) { // pixmap has a mask
+    if (static_cast<QX11PlatformPixmap*>(pixmap.data.data())->x11_mask) { // pixmap has a mask
         QBitmap comb(sw, sh);
         GC cgc = XCreateGC(d->dpy, comb.handle(), 0, 0);
         XSetForeground(d->dpy, cgc, 0);
@@ -1961,7 +1961,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
         XSetFillStyle(d->dpy, cgc, FillOpaqueStippled);
         XSetTSOrigin(d->dpy, cgc, -sx, -sy);
         XSetStipple(d->dpy, cgc,
-                    static_cast<QX11PixmapData*>(pixmap.data.data())->x11_mask);
+                    static_cast<QX11PlatformPixmap*>(pixmap.data.data())->x11_mask);
         XFillRectangle(d->dpy, comb.handle(), cgc, 0, 0, sw, sh);
         XFreeGC(d->dpy, cgc);
 
@@ -2007,8 +2007,8 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
 
     if (d->pdev->devType() == QInternal::Pixmap) {
         const QPixmap *px = static_cast<const QPixmap*>(d->pdev);
-        Pixmap src_mask = static_cast<QX11PixmapData*>(pixmap.data.data())->x11_mask;
-        Pixmap dst_mask = static_cast<QX11PixmapData*>(px->data.data())->x11_mask;
+        Pixmap src_mask = static_cast<QX11PlatformPixmap*>(pixmap.data.data())->x11_mask;
+        Pixmap dst_mask = static_cast<QX11PlatformPixmap*>(px->data.data())->x11_mask;
         if (dst_mask) {
             GC cgc = XCreateGC(d->dpy, dst_mask, 0, 0);
             if (src_mask) { // copy src mask into dst mask
@@ -2222,7 +2222,7 @@ void QX11PaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, co
 #endif
     } else
 #endif // !QT_NO_XRENDER
-        if (pixmap.depth() > 1 && !static_cast<QX11PixmapData*>(pixmap.data.data())->x11_mask) {
+        if (pixmap.depth() > 1 && !static_cast<QX11PlatformPixmap*>(pixmap.data.data())->x11_mask) {
             XSetTile(d->dpy, d->gc, pixmap.handle());
             XSetFillStyle(d->dpy, d->gc, FillTiled);
             XSetTSOrigin(d->dpy, d->gc, x-sx, y-sy);
@@ -2358,7 +2358,7 @@ void QX11PaintEngine::drawFreetype(const QPointF &p, const QTextItemInt &ti)
 
     const bool xrenderPath = (X11->use_xrender
                               && !(d->pdev->devType() == QInternal::Pixmap
-                                   && static_cast<const QPixmap *>(d->pdev)->data->pixelType() == QPixmapData::BitmapType));
+                                   && static_cast<const QPixmap *>(d->pdev)->data->pixelType() == QPlatformPixmap::BitmapType));
 
     QVarLengthArray<QFixedPoint> positions;
     QVarLengthArray<glyph_t> glyphs;
index 89f5b09..500d1e3 100644 (file)
@@ -80,10 +80,10 @@ QT_BEGIN_NAMESPACE
 
 QPixmap qt_toX11Pixmap(const QImage &image)
 {
-    QPixmapData *data =
-        new QX11PixmapData(image.depth() == 1
-                           ? QPixmapData::BitmapType
-                           : QPixmapData::PixmapType);
+    QPlatformPixmap *data =
+        new QX11PlatformPixmap(image.depth() == 1
+                           ? QPlatformPixmap::BitmapType
+                           : QPlatformPixmap::PixmapType);
 
     data->fromImage(image, Qt::AutoColor);
 
@@ -95,7 +95,7 @@ QPixmap qt_toX11Pixmap(const QPixmap &pixmap)
     if (pixmap.isNull())
         return QPixmap();
 
-    if (QPixmap(pixmap).data_ptr()->classId() == QPixmapData::X11Class)
+    if (QPixmap(pixmap).data_ptr()->classId() == QPlatformPixmap::X11Class)
         return pixmap;
 
     return qt_toX11Pixmap(pixmap.toImage());
@@ -113,7 +113,7 @@ inline static void qSafeXDestroyImage(XImage *x)
     XDestroyImage(x);
 }
 
-QBitmap QX11PixmapData::mask_to_bitmap(int screen) const
+QBitmap QX11PlatformPixmap::mask_to_bitmap(int screen) const
 {
     if (!x11_mask)
         return QBitmap();
@@ -126,7 +126,7 @@ QBitmap QX11PixmapData::mask_to_bitmap(int screen) const
     return bm;
 }
 
-Qt::HANDLE QX11PixmapData::bitmap_to_mask(const QBitmap &bitmap, int screen)
+Qt::HANDLE QX11PlatformPixmap::bitmap_to_mask(const QBitmap &bitmap, int screen)
 {
     if (bitmap.isNull())
         return 0;
@@ -313,19 +313,19 @@ static int defaultScreen = -1;
 QBasicAtomicInt qt_pixmap_serial = Q_BASIC_ATOMIC_INITIALIZER(0);
 int Q_WIDGETS_EXPORT qt_x11_preferred_pixmap_depth = 0;
 
-QX11PixmapData::QX11PixmapData(PixelType type)
-    : QPixmapData(type, X11Class), gl_surface(0), hd(0),
+QX11PlatformPixmap::QX11PlatformPixmap(PixelType type)
+    : QPlatformPixmap(type, X11Class), gl_surface(0), hd(0),
       flags(Uninitialized), x11_mask(0), picture(0), mask_picture(0), hd2(0),
       share_mode(QPixmap::ImplicitlyShared), pengine(0)
 {
 }
 
-QPixmapData *QX11PixmapData::createCompatiblePixmapData() const
+QPlatformPixmap *QX11PlatformPixmap::createCompatiblePlatformPixmap() const
 {
-    return new QX11PixmapData(pixelType());
+    return new QX11PlatformPixmap(pixelType());
 }
 
-void QX11PixmapData::resize(int width, int height)
+void QX11PlatformPixmap::resize(int width, int height)
 {
     setSerialNumber(qt_pixmap_serial.fetchAndAddRelaxed(1));
 
@@ -407,7 +407,7 @@ struct QX11AlphaDetector
     mutable bool has;
 };
 
-void QX11PixmapData::fromImage(const QImage &img,
+void QX11PlatformPixmap::fromImage(const QImage &img,
                                Qt::ImageConversionFlags flags)
 {
     setSerialNumber(qt_pixmap_serial.fetchAndAddRelaxed(1));
@@ -1142,7 +1142,7 @@ void QX11PixmapData::fromImage(const QImage &img,
     }
 }
 
-Qt::HANDLE QX11PixmapData::createBitmapFromImage(const QImage &image)
+Qt::HANDLE QX11PlatformPixmap::createBitmapFromImage(const QImage &image)
 {
     QImage img = image.convertToFormat(QImage::Format_MonoLSB);
     const QRgb c0 = QColor(Qt::black).rgb();
@@ -1183,7 +1183,7 @@ Qt::HANDLE QX11PixmapData::createBitmapFromImage(const QImage &image)
     return hd;
 }
 
-void QX11PixmapData::bitmapFromImage(const QImage &image)
+void QX11PlatformPixmap::bitmapFromImage(const QImage &image)
 {
     w = image.width();
     h = image.height();
@@ -1197,7 +1197,7 @@ void QX11PixmapData::bitmapFromImage(const QImage &image)
 #endif // QT_NO_XRENDER
 }
 
-void QX11PixmapData::fill(const QColor &fillColor)
+void QX11PlatformPixmap::fill(const QColor &fillColor)
 {
     if (fillColor.alpha() != 255) {
 #ifndef QT_NO_XRENDER
@@ -1233,18 +1233,18 @@ void QX11PixmapData::fill(const QColor &fillColor)
     XFreeGC(X11->display, gc);
 }
 
-QX11PixmapData::~QX11PixmapData()
+QX11PlatformPixmap::~QX11PlatformPixmap()
 {
     // Cleanup hooks have to be called before the handles are freed
     if (is_cached) {
-        QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(this);
+        QImagePixmapCleanupHooks::executePlatformPixmapDestructionHooks(this);
         is_cached = false;
     }
 
     release();
 }
 
-void QX11PixmapData::release()
+void QX11PlatformPixmap::release()
 {
     delete pengine;
     pengine = 0;
@@ -1283,7 +1283,7 @@ void QX11PixmapData::release()
     }
 }
 
-QPixmap QX11PixmapData::alphaChannel() const
+QPixmap QX11PlatformPixmap::alphaChannel() const
 {
     if (!hasAlphaChannel()) {
         QPixmap pm(w, h);
@@ -1294,7 +1294,7 @@ QPixmap QX11PixmapData::alphaChannel() const
     return QPixmap::fromImage(im.alphaChannel(), Qt::OrderedDither);
 }
 
-void QX11PixmapData::setAlphaChannel(const QPixmap &alpha)
+void QX11PlatformPixmap::setAlphaChannel(const QPixmap &alpha)
 {
     QImage image(toImage());
     image.setAlphaChannel(alpha.toImage());
@@ -1303,7 +1303,7 @@ void QX11PixmapData::setAlphaChannel(const QPixmap &alpha)
 }
 
 
-QBitmap QX11PixmapData::mask() const
+QBitmap QX11PlatformPixmap::mask() const
 {
     QBitmap mask;
 #ifndef QT_NO_XRENDER
@@ -1313,7 +1313,7 @@ QBitmap QX11PixmapData::mask() const
     } else
 #endif
     if (d == 1) {
-        QX11PixmapData *that = const_cast<QX11PixmapData*>(this);
+        QX11PlatformPixmap *that = const_cast<QX11PlatformPixmap*>(this);
         mask = QPixmap(that);
     } else {
         mask = mask_to_bitmap(xinfo.screen());
@@ -1342,12 +1342,12 @@ QBitmap QX11PixmapData::mask() const
     \sa mask(), {QPixmap#Pixmap Transformations}{Pixmap
     Transformations}, QBitmap
 */
-void QX11PixmapData::setMask(const QBitmap &newmask)
+void QX11PlatformPixmap::setMask(const QBitmap &newmask)
 {
     if (newmask.isNull()) { // clear mask
 #ifndef QT_NO_XRENDER
         if (picture && d == 32) {
-            QX11PixmapData newData(pixelType());
+            QX11PlatformPixmap newData(pixelType());
             newData.resize(w, h);
             newData.fill(Qt::black);
             XRenderComposite(X11->display, PictOpOver,
@@ -1355,11 +1355,11 @@ void QX11PixmapData::setMask(const QBitmap &newmask)
                              0, 0, 0, 0, 0, 0, w, h);
             release();
             *this = newData;
-            // the new QX11PixmapData object isn't referenced yet, so
+            // the new QX11PlatformPixmap object isn't referenced yet, so
             // ref it
             ref.ref();
 
-            // the below is to make sure the QX11PixmapData destructor
+            // the below is to make sure the QX11PlatformPixmap destructor
             // doesn't delete our newly created render picture
             newData.hd = 0;
             newData.x11_mask = 0;
@@ -1409,7 +1409,7 @@ void QX11PixmapData::setMask(const QBitmap &newmask)
                     XRenderFreePicture(X11->display, mask_picture);
 #endif
             }
-            x11_mask = QX11PixmapData::bitmap_to_mask(newmask, xinfo.screen());
+            x11_mask = QX11PlatformPixmap::bitmap_to_mask(newmask, xinfo.screen());
 #ifndef QT_NO_XRENDER
             if (picture) {
                 mask_picture = XRenderCreatePicture(X11->display, x11_mask,
@@ -1422,7 +1422,7 @@ void QX11PixmapData::setMask(const QBitmap &newmask)
         }
 }
 
-int QX11PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
+int QX11PlatformPixmap::metric(QPaintDevice::PaintDeviceMetric metric) const
 {
     switch (metric) {
     case QPaintDevice::PdmWidth:
@@ -1452,7 +1452,7 @@ int QX11PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
     case QPaintDevice::PdmPhysicalDpiY:
         return QX11Info::appDpiY(xinfo.screen());
     default:
-        qWarning("QX11PixmapData::metric(): Invalid metric");
+        qWarning("QX11PlatformPixmap::metric(): Invalid metric");
         return 0;
     }
 }
@@ -1462,7 +1462,7 @@ struct QXImageWrapper
     XImage *xi;
 };
 
-bool QX11PixmapData::canTakeQImageFromXImage(const QXImageWrapper &xiWrapper) const
+bool QX11PlatformPixmap::canTakeQImageFromXImage(const QXImageWrapper &xiWrapper) const
 {
     XImage *xi = xiWrapper.xi;
 
@@ -1485,7 +1485,7 @@ bool QX11PixmapData::canTakeQImageFromXImage(const QXImageWrapper &xiWrapper) co
     return false;
 }
 
-QImage QX11PixmapData::takeQImageFromXImage(const QXImageWrapper &xiWrapper) const
+QImage QX11PlatformPixmap::takeQImageFromXImage(const QXImageWrapper &xiWrapper) const
 {
     XImage *xi = xiWrapper.xi;
 
@@ -1538,7 +1538,7 @@ QImage QX11PixmapData::takeQImageFromXImage(const QXImageWrapper &xiWrapper) con
     return image;
 }
 
-QImage QX11PixmapData::toImage(const QRect &rect) const
+QImage QX11PlatformPixmap::toImage(const QRect &rect) const
 {
     QXImageWrapper xiWrapper;
     xiWrapper.xi = XGetImage(X11->display, hd, rect.x(), rect.y(), rect.width(), rect.height(),
@@ -1571,12 +1571,12 @@ QImage QX11PixmapData::toImage(const QRect &rect) const
     \sa fromImage(), {QImage#Image Formats}{Image Formats}
 */
 
-QImage QX11PixmapData::toImage() const
+QImage QX11PlatformPixmap::toImage() const
 {
     return toImage(QRect(0, 0, w, h));
 }
 
-QImage QX11PixmapData::toImage(const QXImageWrapper &xiWrapper, const QRect &rect) const
+QImage QX11PlatformPixmap::toImage(const QXImageWrapper &xiWrapper, const QRect &rect) const
 {
     XImage *xi = xiWrapper.xi;
 
@@ -1852,7 +1852,7 @@ QImage QX11PixmapData::toImage(const QXImageWrapper &xiWrapper, const QRect &rec
     \sa trueMatrix(), {QPixmap#Pixmap Transformations}{Pixmap
     Transformations}
 */
-QPixmap QX11PixmapData::transformed(const QTransform &transform,
+QPixmap QX11PlatformPixmap::transformed(const QTransform &transform,
                                     Qt::TransformationMode mode ) const
 {
     if (mode == Qt::SmoothTransformation || transform.type() >= QTransform::TxProject) {
@@ -2002,9 +2002,9 @@ QPixmap QX11PixmapData::transformed(const QTransform &transform,
         free(dptr);
         return bm;
     } else {                                        // color pixmap
-        QX11PixmapData *x11Data = new QX11PixmapData(QPixmapData::PixmapType);
+        QX11PlatformPixmap *x11Data = new QX11PlatformPixmap(QPlatformPixmap::PixmapType);
         QPixmap pm(x11Data);
-        x11Data->flags &= ~QX11PixmapData::Uninitialized;
+        x11Data->flags &= ~QX11PlatformPixmap::Uninitialized;
         x11Data->xinfo = xinfo;
         x11Data->d = d;
         x11Data->w = w;
@@ -2067,13 +2067,13 @@ void QPixmap::x11SetScreen(int screen)
     if (isNull())
         return;
 
-    if (data->classId() != QPixmapData::X11Class)
+    if (data->classId() != QPlatformPixmap::X11Class)
         return;
 
     if (screen < 0)
         screen = QX11Info::appScreen();
 
-    QX11PixmapData *x11Data = static_cast<QX11PixmapData*>(data.data());
+    QX11PlatformPixmap *x11Data = static_cast<QX11PlatformPixmap*>(data.data());
     if (screen == x11Data->xinfo.screen())
         return; // nothing to do
 
@@ -2142,7 +2142,7 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
         window_attr = root_attr;
     }
 
-    QX11PixmapData *data = new QX11PixmapData(QPixmapData::PixmapType);
+    QX11PlatformPixmap *data = new QX11PlatformPixmap(QPlatformPixmap::PixmapType);
 
     void qt_x11_getX11InfoForWindow(QX11Info * xinfo, const XWindowAttributes &a);
     qt_x11_getX11InfoForWindow(&data->xinfo,window_attr);
@@ -2151,7 +2151,7 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
 
     QPixmap pm(data);
 
-    data->flags &= ~QX11PixmapData::Uninitialized;
+    data->flags &= ~QX11PlatformPixmap::Uninitialized;
     pm.x11SetScreen(scr);
 
     GC gc = XCreateGC(dpy, pm.handle(), 0, 0);
@@ -2162,15 +2162,15 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
     return pm;
 }
 
-bool QX11PixmapData::hasAlphaChannel() const
+bool QX11PlatformPixmap::hasAlphaChannel() const
 {
     return d == 32;
 }
 
 const QX11Info &QPixmap::x11Info() const
 {
-    if (data && data->classId() == QPixmapData::X11Class)
-        return static_cast<QX11PixmapData*>(data.data())->xinfo;
+    if (data && data->classId() == QPlatformPixmap::X11Class)
+        return static_cast<QX11PlatformPixmap*>(data.data())->xinfo;
     else {
         static QX11Info nullX11Info;
         return nullX11Info;
@@ -2189,9 +2189,9 @@ static XRenderPictFormat *qt_renderformat_for_depth(const QX11Info &xinfo, int d
 }
 #endif
 
-QPaintEngine* QX11PixmapData::paintEngine() const
+QPaintEngine* QX11PlatformPixmap::paintEngine() const
 {
-    QX11PixmapData *that = const_cast<QX11PixmapData*>(this);
+    QX11PlatformPixmap *that = const_cast<QX11PlatformPixmap*>(this);
 
     if ((flags & Readonly) && share_mode == QPixmap::ImplicitlyShared) {
         // if someone wants to draw onto us, copy the shared contents
@@ -2215,7 +2215,7 @@ QPaintEngine* QX11PixmapData::paintEngine() const
             XFreeGC(X11->display, gc);
         }
         that->hd = hd_copy;
-        that->flags &= ~QX11PixmapData::Readonly;
+        that->flags &= ~QX11PlatformPixmap::Readonly;
     }
 
     if (!that->pengine)
@@ -2226,8 +2226,8 @@ QPaintEngine* QX11PixmapData::paintEngine() const
 Qt::HANDLE QPixmap::x11PictureHandle() const
 {
 #ifndef QT_NO_XRENDER
-    if (data && data->classId() == QPixmapData::X11Class)
-        return static_cast<const QX11PixmapData*>(data.data())->picture;
+    if (data && data->classId() == QPlatformPixmap::X11Class)
+        return static_cast<const QX11PlatformPixmap*>(data.data())->picture;
     else
         return 0;
 #else
@@ -2235,7 +2235,7 @@ Qt::HANDLE QPixmap::x11PictureHandle() const
 #endif // QT_NO_XRENDER
 }
 
-Qt::HANDLE QX11PixmapData::x11ConvertToDefaultDepth()
+Qt::HANDLE QX11PlatformPixmap::x11ConvertToDefaultDepth()
 {
 #ifndef QT_NO_XRENDER
     if (d == QX11Info::appDepth() || !X11->use_xrender)
@@ -2255,14 +2255,14 @@ Qt::HANDLE QX11PixmapData::x11ConvertToDefaultDepth()
 #endif
 }
 
-void QX11PixmapData::copy(const QPixmapData *data, const QRect &rect)
+void QX11PlatformPixmap::copy(const QPlatformPixmap *data, const QRect &rect)
 {
     if (data->pixelType() == BitmapType) {
         fromImage(data->toImage().copy(rect), Qt::AutoColor);
         return;
     }
 
-    const QX11PixmapData *x11Data = static_cast<const QX11PixmapData*>(data);
+    const QX11PlatformPixmap *x11Data = static_cast<const QX11PlatformPixmap*>(data);
 
     setSerialNumber(qt_pixmap_serial.fetchAndAddRelaxed(1));
 
@@ -2317,7 +2317,7 @@ void QX11PixmapData::copy(const QPixmapData *data, const QRect &rect)
     }
 }
 
-bool QX11PixmapData::scroll(int dx, int dy, const QRect &rect)
+bool QX11PlatformPixmap::scroll(int dx, int dy, const QRect &rect)
 {
     GC gc = XCreateGC(X11->display, hd, 0, 0);
     XCopyArea(X11->display, hd, hd, gc,
@@ -2328,7 +2328,7 @@ bool QX11PixmapData::scroll(int dx, int dy, const QRect &rect)
 }
 
 #if !defined(QT_NO_XRENDER)
-void QX11PixmapData::convertToARGB32(bool preserveContents)
+void QX11PlatformPixmap::convertToARGB32(bool preserveContents)
 {
     if (!X11->use_xrender)
         return;
@@ -2383,9 +2383,9 @@ QPixmap QPixmap::fromX11Pixmap(Qt::HANDLE pixmap, QPixmap::ShareMode mode)
             break;
     }
 
-    QX11PixmapData *data = new QX11PixmapData(depth == 1 ? QPixmapData::BitmapType : QPixmapData::PixmapType);
+    QX11PlatformPixmap *data = new QX11PlatformPixmap(depth == 1 ? QPlatformPixmap::BitmapType : QPlatformPixmap::PixmapType);
     data->setSerialNumber(qt_pixmap_serial.fetchAndAddRelaxed(1));
-    data->flags = QX11PixmapData::Readonly;
+    data->flags = QX11PlatformPixmap::Readonly;
     data->share_mode = mode;
     data->w = width;
     data->h = height;
index 8c8ccd1..fce32cb 100644 (file)
@@ -53,8 +53,8 @@
 // We mean it.
 //
 
-#include <QtGui/private/qpixmapdata_p.h>
-#include <QtGui/private/qpixmapdatafactory_p.h>
+#include <QtGui/qplatformpixmap_qpa.h>
+#include <QtGui/qplatformpixmapfactory_p.h>
 
 #include "QtGui/qx11info_x11.h"
 
@@ -64,20 +64,20 @@ class QX11PaintEngine;
 
 struct QXImageWrapper;
 
-class Q_WIDGETS_EXPORT QX11PixmapData : public QPixmapData
+class Q_WIDGETS_EXPORT QX11PlatformPixmap : public QPlatformPixmap
 {
 public:
-    QX11PixmapData(PixelType type);
-//     QX11PixmapData(PixelType type, int width, int height);
-//     QX11PixmapData(PixelType type, const QImage &image,
+    QX11PlatformPixmap(PixelType type);
+//     QX11PlatformPixmap(PixelType type, int width, int height);
+//     QX11PlatformPixmap(PixelType type, const QImage &image,
 //                    Qt::ImageConversionFlags flags);
-    ~QX11PixmapData();
+    ~QX11PlatformPixmap();
 
-    QPixmapData *createCompatiblePixmapData() const;
+    QPlatformPixmap *createCompatiblePlatformPixmap() const;
 
     void resize(int width, int height);
     void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
-    void copy(const QPixmapData *data, const QRect &rect);
+    void copy(const QPlatformPixmap *data, const QRect &rect);
     bool scroll(int dx, int dy, const QRect &rect);
 
     void fill(const QColor &color);
@@ -114,9 +114,9 @@ private:
     friend class QGLContextPrivate; // Needs to access xinfo, gl_surface & flags
     friend class QEglContext; // Needs gl_surface
     friend class QGLContext; // Needs gl_surface
-    friend class QX11GLPixmapData; // Needs gl_surface
-    friend class QMeeGoLivePixmapData; // Needs gl_surface and flags
-    friend bool  qt_createEGLSurfaceForPixmap(QPixmapData*, bool); // Needs gl_surface
+    friend class QX11GLPlatformPixmap; // Needs gl_surface
+    friend class QMeeGoLivePlatformPixmap; // Needs gl_surface and flags
+    friend bool  qt_createEGLSurfaceForPixmap(QPlatformPixmap*, bool); // Needs gl_surface
 
     void release();
 
index cd4b7b4..5bb59b2 100644 (file)
@@ -1400,7 +1400,7 @@ void QWidgetPrivate::updateSystemBackground()
     else if (brush.style() == Qt::TexturePattern) {
         extern QPixmap qt_toX11Pixmap(const QPixmap &pixmap); // qpixmap_x11.cpp
         XSetWindowBackgroundPixmap(X11->display, q->internalWinId(),
-                                   static_cast<QX11PixmapData*>(qt_toX11Pixmap(brush.texture()).data.data())->x11ConvertToDefaultDepth());
+                                   static_cast<QX11PlatformPixmap*>(qt_toX11Pixmap(brush.texture()).data.data())->x11ConvertToDefaultDepth());
     } else
         XSetWindowBackground(X11->display, q->internalWinId(),
                              QColormap::instance(xinfo.screen()).pixel(brush.color()));
@@ -1546,7 +1546,7 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
                 // violates the ICCCM), since this works on all DEs known to Qt
                 if (!forceReset || !topData->iconPixmap)
                     topData->iconPixmap = new QPixmap(qt_toX11Pixmap(icon.pixmap(QSize(64,64))));
-                pixmap_handle = static_cast<QX11PixmapData*>(topData->iconPixmap->data.data())->x11ConvertToDefaultDepth();
+                pixmap_handle = static_cast<QX11PlatformPixmap*>(topData->iconPixmap->data.data())->x11ConvertToDefaultDepth();
             }
         }
     }
index ac2c36e..60cd0e9 100644 (file)
@@ -106,7 +106,7 @@ protected:
 
     friend class QX11PaintEngine;
     friend class QPixmap;
-    friend class QX11PixmapData;
+    friend class QX11PlatformPixmap;
     friend class QWidget;
     friend class QWidgetPrivate;
     friend class QGLWidget;
index f272ff4..f7ced9e 100644 (file)
@@ -647,17 +647,17 @@ QPixmap QS60StyleModeSpecifics::fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask
         return QPixmap();
 
     QPixmap pixmap;
-    QScopedPointer<QPixmapData> pd(QPixmapData::create(0, 0, QPixmapData::PixmapType));
+    QScopedPointer<QPlatformPixmap> pd(QPlatformPixmap::create(0, 0, QPlatformPixmap::PixmapType));
     if (mask) {
         // Try the efficient path with less copying and conversion.
         QVolatileImage img(icon, mask);
-        pd->fromNativeType(&img, QPixmapData::VolatileImage);
+        pd->fromNativeType(&img, QPlatformPixmap::VolatileImage);
         if (!pd->isNull())
             pixmap = QPixmap(pd.take());
     }
     if (pixmap.isNull()) {
         // Potentially more expensive path.
-        pd->fromNativeType(icon, QPixmapData::FbsBitmap);
+        pd->fromNativeType(icon, QPlatformPixmap::FbsBitmap);
         pixmap = QPixmap(pd.take());
         if (mask) {
             pixmap.setAlphaChannel(QPixmap::fromSymbianCFbsBitmap(mask));
index 3d198c7..d58e9fd 100644 (file)
@@ -56,8 +56,8 @@ QPixmap pixmapFromNativeImageHandleProvider(QNativeImageHandleProvider *source)
 #if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
     if (!source)
         return QPixmap();
-    QScopedPointer<QPixmapData> pd(QPixmapData::create(0, 0, QPixmapData::PixmapType));
-    pd->fromNativeType(source, QPixmapData::NativeImageHandleProvider);
+    QScopedPointer<QPlatformPixmap> pd(QPlatformPixmap::create(0, 0, QPlatformPixmap::PixmapType));
+    pd->fromNativeType(source, QPlatformPixmap::NativeImageHandleProvider);
     return QPixmap(pd.take());
 #else
     Q_UNUSED(source);
@@ -136,7 +136,7 @@ void tst_NativeImageHandleProvider::create()
     QPixmap pm = pixmapFromNativeImageHandleProvider(0);
     QVERIFY(pm.isNull());
     QPixmap tmp(10, 20);
-    if (tmp.pixmapData()->classId() == QPixmapData::OpenVGClass) {
+    if (tmp.handle()->classId() == QPlatformPixmap::OpenVGClass) {
         // Verify that null pixmap is properly returned when get() provides bogus results.
         DummyProvider prov;
         pm = pixmapFromNativeImageHandleProvider(&prov);
@@ -151,7 +151,7 @@ void tst_NativeImageHandleProvider::bitmap()
 {
 #if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
     QPixmap tmp(10, 20);
-    if (tmp.pixmapData()->classId() == QPixmapData::OpenVGClass) {
+    if (tmp.handle()->classId() == QPlatformPixmap::OpenVGClass) {
         BitmapProvider prov;
 
         // This should fail because of null ptr.
@@ -198,7 +198,7 @@ void tst_NativeImageHandleProvider::hibernate()
 {
 #if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
     QPixmap tmp(10, 20);
-    if (tmp.pixmapData()->classId() == QPixmapData::OpenVGClass) {
+    if (tmp.handle()->classId() == QPlatformPixmap::OpenVGClass) {
         BitmapProvider prov;
         prov.bmp = new CFbsBitmap;
         QCOMPARE(prov.bmp->Create(TSize(prov.w, prov.h), EColor16MAP), KErrNone);
@@ -206,7 +206,7 @@ void tst_NativeImageHandleProvider::hibernate()
         QPixmap pm = pixmapFromNativeImageHandleProvider(&prov);
         QCOMPARE(prov.refCount, 1);
 
-        QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pm.pixmapData());
+        QVGPlatformPixmap *vgpd = static_cast<QVGPlatformPixmap *>(pm.handle());
         vgpd->hibernate();
         QCOMPARE(prov.refCount, 0);
 
index 7d46ada..d66cc3b 100644 (file)
@@ -55,8 +55,8 @@
 #include <QVBoxLayout>
 
 #ifdef QT_BUILD_INTERNAL
+#include <qplatformpixmap_qpa.h>
 #include <QtOpenGL/private/qgl_p.h>
-#include <QtGui/private/qpixmapdata_p.h>
 #include <QtGui/private/qimage_p.h>
 #include <QtGui/private/qimagepixmapcleanuphooks_p.h>
 #endif
index 2cd1a1d..b4b09fc 100644 (file)
@@ -533,8 +533,8 @@ public:
 
     void draw(QPainter *painter)
     {
-        QVERIFY(sourcePixmap(Qt::LogicalCoordinates).pixmapData() == pixmap.pixmapData());
-        QVERIFY((painter->worldTransform().type() <= QTransform::TxTranslate) == (sourcePixmap(Qt::DeviceCoordinates).pixmapData() == pixmap.pixmapData()));
+        QVERIFY(sourcePixmap(Qt::LogicalCoordinates).handle() == pixmap.handle());
+        QVERIFY((painter->worldTransform().type() <= QTransform::TxTranslate) == (sourcePixmap(Qt::DeviceCoordinates).handle() == pixmap.handle()));
 
         ++repaints;
     }
index a3d599c..1365f08 100644 (file)
@@ -51,7 +51,7 @@
 #include <qtreewidget.h>
 #include <qsplashscreen.h>
 
-#include <private/qpixmapdata_p.h>
+#include <qplatformpixmap_qpa.h>
 #include <private/qdrawhelper_p.h>
 
 #include <QSet>
@@ -299,7 +299,7 @@ void tst_QPixmap::fromImage()
 
     const QPixmap pixmap = QPixmap::fromImage(image);
 #ifdef Q_WS_X11
-    if (pixmap.pixmapData()->classId() == QPixmapData::X11Class && !pixmap.x11PictureHandle())
+    if (pixmap.handle()->classId() == QPlatformPixmap::X11Class && !pixmap.x11PictureHandle())
         QSKIP("Requires XRender support", SkipAll);
 #endif
     const QImage result = pixmap.toImage();
@@ -530,7 +530,7 @@ void tst_QPixmap::fill()
         pm = QPixmap(400, 400);
 
 #if defined(Q_WS_X11)
-    if (!bitmap && pm.pixmapData()->classId() == QPixmapData::X11Class && !pm.x11PictureHandle())
+    if (!bitmap && pm.handle()->classId() == QPlatformPixmap::X11Class && !pm.x11PictureHandle())
         QSKIP("Requires XRender support", SkipSingle);
 #endif
 
@@ -560,7 +560,7 @@ void tst_QPixmap::fill_transparent()
 {
     QPixmap pixmap(10, 10);
 #ifdef Q_WS_X11
-    if (pixmap.pixmapData()->classId() == QPixmapData::X11Class && !pixmap.x11PictureHandle())
+    if (pixmap.handle()->classId() == QPlatformPixmap::X11Class && !pixmap.x11PictureHandle())
         QSKIP("Requires XRender support", SkipAll);
 #endif
     pixmap.fill(Qt::transparent);
@@ -861,7 +861,7 @@ void tst_QPixmap::isNull()
 void tst_QPixmap::convertFromImageNoDetach()
 {
     QPixmap randomPixmap(10, 10);
-    if (randomPixmap.pixmapData()->classId() != QPixmapData::RasterClass)
+    if (randomPixmap.handle()->classId() != QPlatformPixmap::RasterClass)
         QSKIP("Test only valid for raster pixmaps", SkipAll);
 
     //first get the screen format
@@ -1431,7 +1431,7 @@ void tst_QPixmap::fromImage_crash()
     delete img;
 }
 
-//This is testing QPixmapData::createCompatiblePixmapData - see QTBUG-5977
+//This is testing QPlatformPixmap::createCompatiblePlatformPixmap - see QTBUG-5977
 void tst_QPixmap::splash_crash()
 {
     QPixmap pix;
@@ -1673,10 +1673,10 @@ void tst_QPixmap::toImageDeepCopy()
 
 #if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
 Q_OPENVG_EXPORT VGImage qPixmapToVGImage(const QPixmap& pixmap);
-class FriendlyVGPixmapData : public QVGPixmapData
+class FriendlyVGPlatformPixmap : public QVGPlatformPixmap
 {
 public:
-    FriendlyVGPixmapData(PixelType type) : QVGPixmapData(type) { }
+    FriendlyVGPlatformPixmap(PixelType type) : QVGPlatformPixmap(type) { }
     bool sourceIsNull() { return source.isNull(); }
     friend QPixmap pixmapFromVGImage(VGImage image);
 };
@@ -1685,7 +1685,7 @@ QPixmap pixmapFromVGImage(VGImage image)
     if (image != VG_INVALID_HANDLE) {
         int w = vgGetParameteri(image, VG_IMAGE_WIDTH);
         int h = vgGetParameteri(image, VG_IMAGE_HEIGHT);
-        FriendlyVGPixmapData *pd = new FriendlyVGPixmapData(QPixmapData::PixmapType);
+        FriendlyVGPlatformPixmap *pd = new FriendlyVGPlatformPixmap(QPlatformPixmap::PixmapType);
         pd->resize(w, h);
         pd->vgImage = image;
         pd->recreate = false;
@@ -1714,12 +1714,12 @@ public:
         } else { // second phase: check if readback works
             painter.drawPixmap(0, 0, pm);
             // Drawing should not cause readback, this is important for performance;
-            noreadback_ok = static_cast<FriendlyVGPixmapData *>(pm.pixmapData())->sourceIsNull();
+            noreadback_ok = static_cast<FriendlyVGPlatformPixmap *>(pm.handle())->sourceIsNull();
             // However toImage() requires readback.
             QImage img = pm.toImage();
             readback_ok = img.width() == pm.width();
             readback_ok &= img.height() == pm.height();
-            readback_ok &= !static_cast<FriendlyVGPixmapData *>(pm.pixmapData())->sourceIsNull();
+            readback_ok &= !static_cast<FriendlyVGPlatformPixmap *>(pm.handle())->sourceIsNull();
             uint pix = img.pixel(1, 1);
             content_ok = qRed(pix) == testPixel.red();
             content_ok &= qGreen(pix) == testPixel.green();
@@ -1741,7 +1741,7 @@ public:
 void tst_QPixmap::vgImageReadBack()
 {
     QPixmap tmp(10, 20);
-    if (tmp.pixmapData()->classId() == QPixmapData::OpenVGClass) {
+    if (tmp.handle()->classId() == QPlatformPixmap::OpenVGClass) {
         Content c;
         c.w = 50;
         c.h = 60;
@@ -1755,7 +1755,7 @@ void tst_QPixmap::vgImageReadBack()
         QCOMPARE(pm.width(), c.w);
         QCOMPARE(pm.height(), c.h);
         QVERIFY(qPixmapToVGImage(pm) == c.vgimage);
-        QVERIFY(static_cast<FriendlyVGPixmapData *>(pm.pixmapData())->sourceIsNull());
+        QVERIFY(static_cast<FriendlyVGPlatformPixmap *>(pm.handle())->sourceIsNull());
         c.pm = pm;
         // Make sure the second phase in paintEvent is executed too.
         c.hide();
index 2ea6d23..904177b 100644 (file)
@@ -76,8 +76,8 @@ Q_DECLARE_METATYPE(Qt::TransformationMode)
 
 QPixmap rasterPixmap(int width, int height)
 {
-    QPixmapData *data =
-        new QRasterPixmapData(QPixmapData::PixmapType);
+    QPlatformPixmap *data =
+        new QRasterPlatformPixmap(QPlatformPixmap::PixmapType);
 
     data->resize(width, height);
 
@@ -91,8 +91,8 @@ QPixmap rasterPixmap(const QSize &size)
 
 QPixmap rasterPixmap(const QImage &image)
 {
-    QPixmapData *data =
-        new QRasterPixmapData(QPixmapData::PixmapType);
+    QPlatformPixmap *data =
+        new QRasterPlatformPixmap(QPlatformPixmap::PixmapType);
 
     data->fromImage(image, Qt::AutoColor);
 
index 5032936..37a8329 100644 (file)
@@ -130,8 +130,8 @@ struct PrimitiveSet {
 
 QPixmap rasterPixmap(int width, int height)
 {
-    QPixmapData *data =
-        new QRasterPixmapData(QPixmapData::PixmapType);
+    QPlatformPixmap *data =
+        new QRasterPlatformPixmap(QPlatformPixmap::PixmapType);
 
     data->resize(width, height);
 
@@ -145,8 +145,8 @@ QPixmap rasterPixmap(const QSize &size)
 
 QPixmap rasterPixmap(const QImage &image)
 {
-    QPixmapData *data =
-        new QRasterPixmapData(QPixmapData::PixmapType);
+    QPlatformPixmap *data =
+        new QRasterPlatformPixmap(QPlatformPixmap::PixmapType);
 
     data->fromImage(image, Qt::AutoColor);