summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-07-15 14:07:12 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-07-19 09:50:37 +0200
commit310519d6d11da546b23c1cba307f37c24e0a5c0b (patch)
tree3118b6539107ba0541abd09005bacc4e592a27e0 /src/widgets
parent5abf4f55b1bd1180ea2dbfb867a48364bc89af80 (diff)
Rename QPixmapData to QPlatformPixmap.
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>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/effects/qpixmapfilter_p.h2
-rw-r--r--src/widgets/platforms/mac/qpaintdevice_mac.cpp8
-rw-r--r--src/widgets/platforms/mac/qpixmap_mac.cpp96
-rw-r--r--src/widgets/platforms/mac/qpixmap_mac_p.h20
-rw-r--r--src/widgets/platforms/s60/qapplication_s60.cpp2
-rw-r--r--src/widgets/platforms/s60/qpaintengine_s60.cpp30
-rw-r--r--src/widgets/platforms/s60/qpaintengine_s60_p.h6
-rw-r--r--src/widgets/platforms/s60/qpixmap_s60.cpp94
-rw-r--r--src/widgets/platforms/s60/qpixmap_s60_p.h18
-rw-r--r--src/widgets/platforms/win/qpixmap_win.cpp8
-rw-r--r--src/widgets/platforms/x11/qcursor_x11.cpp4
-rw-r--r--src/widgets/platforms/x11/qfontengine_x11.cpp2
-rw-r--r--src/widgets/platforms/x11/qpaintengine_x11.cpp22
-rw-r--r--src/widgets/platforms/x11/qpixmap_x11.cpp114
-rw-r--r--src/widgets/platforms/x11/qpixmap_x11_p.h24
-rw-r--r--src/widgets/platforms/x11/qwidget_x11.cpp4
-rw-r--r--src/widgets/platforms/x11/qx11info_x11.h2
-rw-r--r--src/widgets/styles/qs60style_s60.cpp6
18 files changed, 231 insertions, 231 deletions
diff --git a/src/widgets/effects/qpixmapfilter_p.h b/src/widgets/effects/qpixmapfilter_p.h
index 5b06656b17..b0edd8d4b0 100644
--- a/src/widgets/effects/qpixmapfilter_p.h
+++ b/src/widgets/effects/qpixmapfilter_p.h
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
class QPainter;
-class QPixmapData;
+class QPlatformPixmap;
class QPixmapFilterPrivate;
diff --git a/src/widgets/platforms/mac/qpaintdevice_mac.cpp b/src/widgets/platforms/mac/qpaintdevice_mac.cpp
index d29047bf50..50bd4b8490 100644
--- a/src/widgets/platforms/mac/qpaintdevice_mac.cpp
+++ b/src/widgets/platforms/mac/qpaintdevice_mac.cpp
@@ -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);
diff --git a/src/widgets/platforms/mac/qpixmap_mac.cpp b/src/widgets/platforms/mac/qpixmap_mac.cpp
index da08878427..05f01387fa 100644
--- a/src/widgets/platforms/mac/qpixmap_mac.cpp
+++ b/src/widgets/platforms/mac/qpixmap_mac.cpp
@@ -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);
diff --git a/src/widgets/platforms/mac/qpixmap_mac_p.h b/src/widgets/platforms/mac/qpixmap_mac_p.h
index 3a5d97dc4a..4f53160074 100644
--- a/src/widgets/platforms/mac/qpixmap_mac_p.h
+++ b/src/widgets/platforms/mac/qpixmap_mac_p.h
@@ -53,23 +53,23 @@
// 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;
diff --git a/src/widgets/platforms/s60/qapplication_s60.cpp b/src/widgets/platforms/s60/qapplication_s60.cpp
index f0739cdd9f..69d321dd65 100644
--- a/src/widgets/platforms/s60/qapplication_s60.cpp
+++ b/src/widgets/platforms/s60/qapplication_s60.cpp
@@ -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();
diff --git a/src/widgets/platforms/s60/qpaintengine_s60.cpp b/src/widgets/platforms/s60/qpaintengine_s60.cpp
index 091e2e65a4..67984008ca 100644
--- a/src/widgets/platforms/s60/qpaintengine_s60.cpp
+++ b/src/widgets/platforms/s60/qpaintengine_s60.cpp
@@ -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();
diff --git a/src/widgets/platforms/s60/qpaintengine_s60_p.h b/src/widgets/platforms/s60/qpaintengine_s60_p.h
index 2a3b443db3..4cea87954f 100644
--- a/src/widgets/platforms/s60/qpaintengine_s60_p.h
+++ b/src/widgets/platforms/s60/qpaintengine_s60_p.h
@@ -58,14 +58,14 @@
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
diff --git a/src/widgets/platforms/s60/qpixmap_s60.cpp b/src/widgets/platforms/s60/qpixmap_s60.cpp
index ac29f5dea4..5e1474546e 100644
--- a/src/widgets/platforms/s60/qpixmap_s60.cpp
+++ b/src/widgets/platforms/s60/qpixmap_s60.cpp
@@ -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
diff --git a/src/widgets/platforms/s60/qpixmap_s60_p.h b/src/widgets/platforms/s60/qpixmap_s60_p.h
index e48154963b..2f282e9498 100644
--- a/src/widgets/platforms/s60/qpixmap_s60_p.h
+++ b/src/widgets/platforms/s60/qpixmap_s60_p.h
@@ -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;
diff --git a/src/widgets/platforms/win/qpixmap_win.cpp b/src/widgets/platforms/win/qpixmap_win.cpp
index 0aaf30b8fd..c5adb48f5d 100644
--- a/src/widgets/platforms/win/qpixmap_win.cpp
+++ b/src/widgets/platforms/win/qpixmap_win.cpp
@@ -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);
}
diff --git a/src/widgets/platforms/x11/qcursor_x11.cpp b/src/widgets/platforms/x11/qcursor_x11.cpp
index 167e8f8517..1132d3737d 100644
--- a/src/widgets/platforms/x11/qcursor_x11.cpp
+++ b/src/widgets/platforms/x11/qcursor_x11.cpp
@@ -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);
}
diff --git a/src/widgets/platforms/x11/qfontengine_x11.cpp b/src/widgets/platforms/x11/qfontengine_x11.cpp
index c23fb0c174..be421976fa 100644
--- a/src/widgets/platforms/x11/qfontengine_x11.cpp
+++ b/src/widgets/platforms/x11/qfontengine_x11.cpp
@@ -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);
diff --git a/src/widgets/platforms/x11/qpaintengine_x11.cpp b/src/widgets/platforms/x11/qpaintengine_x11.cpp
index 6b480815cf..3cb3e3caf7 100644
--- a/src/widgets/platforms/x11/qpaintengine_x11.cpp
+++ b/src/widgets/platforms/x11/qpaintengine_x11.cpp
@@ -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;
diff --git a/src/widgets/platforms/x11/qpixmap_x11.cpp b/src/widgets/platforms/x11/qpixmap_x11.cpp
index 89f5b0926f..500d1e3ddf 100644
--- a/src/widgets/platforms/x11/qpixmap_x11.cpp
+++ b/src/widgets/platforms/x11/qpixmap_x11.cpp
@@ -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;
diff --git a/src/widgets/platforms/x11/qpixmap_x11_p.h b/src/widgets/platforms/x11/qpixmap_x11_p.h
index 8c8ccd156c..fce32cbe3e 100644
--- a/src/widgets/platforms/x11/qpixmap_x11_p.h
+++ b/src/widgets/platforms/x11/qpixmap_x11_p.h
@@ -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();
diff --git a/src/widgets/platforms/x11/qwidget_x11.cpp b/src/widgets/platforms/x11/qwidget_x11.cpp
index cd4b7b4e15..5bb59b26c9 100644
--- a/src/widgets/platforms/x11/qwidget_x11.cpp
+++ b/src/widgets/platforms/x11/qwidget_x11.cpp
@@ -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();
}
}
}
diff --git a/src/widgets/platforms/x11/qx11info_x11.h b/src/widgets/platforms/x11/qx11info_x11.h
index ac2c36e175..60cd0e9e92 100644
--- a/src/widgets/platforms/x11/qx11info_x11.h
+++ b/src/widgets/platforms/x11/qx11info_x11.h
@@ -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;
diff --git a/src/widgets/styles/qs60style_s60.cpp b/src/widgets/styles/qs60style_s60.cpp
index f272ff4a90..f7ced9e8f8 100644
--- a/src/widgets/styles/qs60style_s60.cpp
+++ b/src/widgets/styles/qs60style_s60.cpp
@@ -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));