summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorRohan McGovern <rohan@mcgovern.id.au>2010-03-06 23:44:26 (GMT)
committerRohan McGovern <rohan@mcgovern.id.au>2010-03-06 23:44:26 (GMT)
commitad341d612129287793620bc84d3077afd64f97a4 (patch)
tree3d62b038c34985046ad1f3ff56c1c4e85a194ed2 /src/plugins
parentb20ef0ade0aec89b969bd0ae7f754c680e390c67 (diff)
parent2458cb45665b0fe3144266122f876bd541de9c42 (diff)
downloadQt-ad341d612129287793620bc84d3077afd64f97a4.zip
Qt-ad341d612129287793620bc84d3077afd64f97a4.tar.gz
Qt-ad341d612129287793620bc84d3077afd64f97a4.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp227
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp2
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp34
-rw-r--r--src/plugins/sqldrivers/odbc/odbc.pro1
4 files changed, 185 insertions, 79 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 12f4c6b..54f4a8a 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -68,11 +68,10 @@ public:
};
enum CompositionModeStatus {
- PorterDuff_None = 0x00,
- PorterDuff_SupportedBlits = 0x01,
- PorterDuff_SupportedPrimitives = 0x02,
- PorterDuff_SupportedOpaquePrimitives = 0x04,
- PorterDuff_Dirty = 0x10
+ PorterDuff_None = 0x0,
+ PorterDuff_Supported = 0x1,
+ PorterDuff_PremultiplyColors = 0x2,
+ PorterDuff_AlwaysBlend = 0x4
};
enum ClipType {
@@ -97,7 +96,6 @@ public:
inline void unlock();
static inline void unlock(QDirectFBPaintDevice *device);
- inline bool testCompositionMode(const QPen *pen, const QBrush *brush, const QColor *color = 0) const;
inline bool isSimpleBrush(const QBrush &brush) const;
void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos);
@@ -130,6 +128,7 @@ public:
ClipType clipType;
QDirectFBPaintDevice *dfbDevice;
uint compositionModeStatus;
+ bool isPremultiplied;
bool inClip;
QRect currentClip;
@@ -168,7 +167,7 @@ struct CachedImage
static QCache<qint64, CachedImage> imageCache(4*1024*1024); // 4 MB
#endif
-#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
+#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS || defined QT_DEBUG
#define VOID_ARG() static_cast<bool>(false)
enum PaintOperation {
DRAW_RECTS = 0x0001, DRAW_LINES = 0x0002, DRAW_IMAGE = 0x0004,
@@ -178,9 +177,89 @@ enum PaintOperation {
FILL_RECT = 0x1000, DRAW_COLORSPANS = 0x2000, DRAW_ROUNDED_RECT = 0x4000,
DRAW_STATICTEXT = 0x8000, ALL = 0xffff
};
+
+#ifdef QT_DEBUG
+static void initRasterFallbacksMasks(int *warningMask, int *disableMask)
+{
+ struct {
+ const char *name;
+ PaintOperation operation;
+ } const operations[] = {
+ { "DRAW_RECTS", DRAW_RECTS },
+ { "DRAW_LINES", DRAW_LINES },
+ { "DRAW_IMAGE", DRAW_IMAGE },
+ { "DRAW_PIXMAP", DRAW_PIXMAP },
+ { "DRAW_TILED_PIXMAP", DRAW_TILED_PIXMAP },
+ { "STROKE_PATH", STROKE_PATH },
+ { "DRAW_PATH", DRAW_PATH },
+ { "DRAW_POINTS", DRAW_POINTS },
+ { "DRAW_ELLIPSE", DRAW_ELLIPSE },
+ { "DRAW_POLYGON", DRAW_POLYGON },
+ { "DRAW_TEXT", DRAW_TEXT },
+ { "FILL_PATH", FILL_PATH },
+ { "FILL_RECT", FILL_RECT },
+ { "DRAW_COLORSPANS", DRAW_COLORSPANS },
+ { "DRAW_ROUNDED_RECT", DRAW_ROUNDED_RECT },
+ { "ALL", ALL },
+ { 0, ALL }
+ };
+
+ QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
+ QString::SkipEmptyParts);
+ QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
+ QString::SkipEmptyParts);
+ *warningMask = 0;
+ *disableMask = 0;
+ if (!warning.isEmpty() || !disable.isEmpty()) {
+ for (int i=0; operations[i].name; ++i) {
+ const QString name = QString::fromLatin1(operations[i].name);
+ int idx = warning.indexOf(name);
+ if (idx != -1) {
+ *warningMask |= operations[i].operation;
+ warning.remove(warning.begin() + idx);
+ }
+ idx = disable.indexOf(name);
+ if (idx != -1) {
+ *disableMask |= operations[i].operation;
+ disable.remove(disable.begin() + idx);
+ }
+ }
+ }
+ if (!warning.isEmpty()) {
+ qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s",
+ qPrintable(warning.join(QLatin1String("|"))));
+ }
+ if (!disable.isEmpty()) {
+ qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s",
+ qPrintable(disable.join(QLatin1String("|"))));
+ }
+
+}
#endif
+static inline int rasterFallbacksMask(bool warn)
+{
#ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
+ if (warn)
+ return QT_DIRECTFB_WARN_ON_RASTERFALLBACKS;
+#endif
+#ifdef QT_DIRECTFB_DISABLE_RASTERFALLBACKS
+ if (!warn)
+ return QT_DIRECTFB_DISABLE_RASTERFALLBACKS;
+#endif
+#ifndef QT_DEBUG
+ return 0;
+#else
+ static int warnMask = -1;
+ static int disableMask = -1;
+ if (warnMask == -1)
+ initRasterFallbacksMasks(&warnMask, &disableMask);
+ return warn ? warnMask : disableMask;
+#endif
+}
+#endif
+
+#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DEBUG
template <typename device, typename T1, typename T2, typename T3>
static void rasterFallbackWarn(const char *msg, const char *func, const device *dev,
uint transformationType, bool simplePen,
@@ -190,25 +269,31 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device *
const char *nameThree, const T3 &three);
#endif
-#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS && defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
+#if defined QT_DEBUG || (defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS && defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS)
#define RASTERFALLBACK(op, one, two, three) \
- if (op & (QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)) \
- rasterFallbackWarn("Disabled raster engine operation", \
- __FUNCTION__, state()->painter->device(), \
- d_func()->transformationType, \
- d_func()->simplePen, \
- d_func()->clipType, \
- d_func()->compositionModeStatus, \
- #one, one, #two, two, #three, three); \
- if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \
- return;
+ { \
+ const bool disable = op & rasterFallbacksMask(false); \
+ if (op & rasterFallbacksMask(true)) \
+ rasterFallbackWarn(disable \
+ ? "Disabled raster engine operation" \
+ : "Falling back to raster engine for", \
+ __FUNCTION__, \
+ state()->painter->device(), \
+ d_func()->transformationType, \
+ d_func()->simplePen, \
+ d_func()->clipType, \
+ d_func()->compositionModeStatus, \
+ #one, one, #two, two, #three, three); \
+ if (disable) \
+ return; \
+ }
#elif defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
-#define RASTERFALLBACK(op, one, two, three) \
- if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \
+#define RASTERFALLBACK(op, one, two, three) \
+ if (op & rasterFallbacksMask(false)) \
return;
#elif defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
#define RASTERFALLBACK(op, one, two, three) \
- if (op & (QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)) \
+ if (op & rasterFallbacksMask(true)) \
rasterFallbackWarn("Falling back to raster engine for", \
__FUNCTION__, state()->painter->device(), \
d_func()->transformationType, \
@@ -287,6 +372,7 @@ bool QDirectFBPaintEngine::begin(QPaintDevice *device)
qFatal("QDirectFBPaintEngine used on an invalid device: 0x%x",
device->devType());
}
+ d->isPremultiplied = QDirectFBScreen::isPremultiplied(d->dfbDevice->format());
d->prepare(d->dfbDevice);
gccaps = AllFeatures;
@@ -413,7 +499,7 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount)
|| !d->simplePen
|| d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
|| !d->isSimpleBrush(brush)
- || !d->testCompositionMode(&pen, &brush)) {
+ || !(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)) {
RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawRects(rects, rectCount);
@@ -443,7 +529,7 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount)
|| !d->simplePen
|| d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
|| !d->isSimpleBrush(brush)
- || !d->testCompositionMode(&pen, &brush)) {
+ || !(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)) {
RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawRects(rects, rectCount);
@@ -468,7 +554,7 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount)
const QPen &pen = state()->pen;
if (!d->simplePen
|| d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
- || !d->testCompositionMode(&pen, 0)) {
+ || !(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)) {
RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawLines(lines, lineCount);
@@ -488,7 +574,7 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount)
const QPen &pen = state()->pen;
if (!d->simplePen
|| d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
- || !d->testCompositionMode(&pen, 0)) {
+ || !(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)) {
RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawLines(lines, lineCount);
@@ -526,7 +612,7 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image,
*/
#if !defined QT_NO_DIRECTFB_PREALLOCATED || defined QT_DIRECTFB_IMAGECACHE
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits)
+ if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)
|| (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
|| (d->clipType == QDirectFBPaintEnginePrivate::ComplexClip)
|| (!d->supportsStretchBlit() && state()->matrix.mapRect(r).size() != sr.size())
@@ -575,7 +661,7 @@ void QDirectFBPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap,
QPixmapData *data = pixmap.pixmapData();
Q_ASSERT(data->classId() == QPixmapData::DirectFBClass);
QDirectFBPixmapData *dfbData = static_cast<QDirectFBPixmapData*>(data);
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits)
+ if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)
|| (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
|| (d->clipType == QDirectFBPaintEnginePrivate::ComplexClip)
|| (!d->supportsStretchBlit() && state()->matrix.mapRect(r).size() != sr.size())) {
@@ -606,7 +692,7 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r,
RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), offset);
d->lock();
QRasterPaintEngine::drawTiledPixmap(r, pixmap, offset);
- } else if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits)
+ } else if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)
|| (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
|| (d->clipType == QDirectFBPaintEnginePrivate::ComplexClip)
|| (!d->supportsStretchBlit() && state()->matrix.isScaling())) {
@@ -727,20 +813,21 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
if (d->clipType != QDirectFBPaintEnginePrivate::ComplexClip) {
switch (brush.style()) {
case Qt::SolidPattern: {
- if (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported
- || !d->testCompositionMode(0, &brush)) {
- break;
- }
const QColor color = brush.color();
if (!color.isValid())
return;
+
+ if (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported
+ || !(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)) {
+ break;
+ }
d->setDFBColor(color);
const QRect r = state()->matrix.mapRect(rect).toRect();
CLIPPED_PAINT(d->surface->FillRectangle(d->surface, r.x(), r.y(), r.width(), r.height()));
return; }
case Qt::TexturePattern: {
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits)
+ if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)
|| (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
|| (!d->supportsStretchBlit() && state()->matrix.isScaling())) {
break;
@@ -768,7 +855,7 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color)
Q_D(QDirectFBPaintEngine);
if ((d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
|| (d->clipType == QDirectFBPaintEnginePrivate::ComplexClip)
- || !d->testCompositionMode(0, 0, &color)) {
+ || !(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)) {
RASTERFALLBACK(FILL_RECT, rect, color, VOID_ARG());
d->lock();
QRasterPaintEngine::fillRect(rect, color);
@@ -812,7 +899,7 @@ QDirectFBPaintEnginePrivate::QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p
: surface(0), antialiased(false), simplePen(false),
transformationType(0), opacity(255),
clipType(ClipUnset), dfbDevice(0),
- compositionModeStatus(0), inClip(false), q(p)
+ compositionModeStatus(0), isPremultiplied(false), inClip(false), q(p)
{
fb = QDirectFBScreen::instance()->dfb();
surfaceCache = new SurfaceCache;
@@ -828,36 +915,6 @@ bool QDirectFBPaintEnginePrivate::isSimpleBrush(const QBrush &brush) const
return (brush.style() == Qt::NoBrush) || (brush.style() == Qt::SolidPattern && !antialiased);
}
-bool QDirectFBPaintEnginePrivate::testCompositionMode(const QPen *pen, const QBrush *brush, const QColor *color) const
-{
- Q_ASSERT(!pen || pen->style() == Qt::NoPen || pen->style() == Qt::SolidLine);
- Q_ASSERT(!brush || brush->style() == Qt::NoBrush || brush->style() == Qt::SolidPattern);
- switch (compositionModeStatus & (QDirectFBPaintEnginePrivate::PorterDuff_SupportedOpaquePrimitives
- |QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)) {
- case QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives:
- return true;
- case QDirectFBPaintEnginePrivate::PorterDuff_SupportedOpaquePrimitives:
- if (pen && pen->style() == Qt::SolidLine && pen->color().alpha() != 255)
- return false;
- if (brush) {
- if (brush->style() == Qt::SolidPattern && brush->color().alpha() != 255) {
- return false;
- }
- } else if (color && color->alpha() != 255) {
- return false;
- }
- return true;
- case QDirectFBPaintEnginePrivate::PorterDuff_None:
- return false;
- default:
- // ### PorterDuff_SupportedOpaquePrimitives|PorterDuff_SupportedPrimitives can't be combined
- break;
- }
- Q_ASSERT(0);
- return false;
-}
-
-
void QDirectFBPaintEnginePrivate::lock()
{
// We will potentially get a new pointer to the buffer after a
@@ -920,21 +977,23 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
static const bool forceRasterFallBack = qgetenv("QT_DIRECTFB_FORCE_RASTER").toInt() > 0;
if (forceRasterFallBack) {
- compositionModeStatus = 0;
+ compositionModeStatus = PorterDuff_None;
return;
}
- compositionModeStatus = PorterDuff_SupportedBlits;
+ compositionModeStatus = PorterDuff_Supported|PorterDuff_PremultiplyColors|PorterDuff_AlwaysBlend;
switch (mode) {
case QPainter::CompositionMode_Clear:
surface->SetPorterDuff(surface, DSPD_CLEAR);
break;
case QPainter::CompositionMode_Source:
surface->SetPorterDuff(surface, DSPD_SRC);
- compositionModeStatus |= PorterDuff_SupportedOpaquePrimitives;
+ compositionModeStatus &= ~PorterDuff_AlwaysBlend;
+ if (!isPremultiplied)
+ compositionModeStatus &= ~PorterDuff_PremultiplyColors;
break;
case QPainter::CompositionMode_SourceOver:
- compositionModeStatus |= PorterDuff_SupportedPrimitives;
+ compositionModeStatus &= ~PorterDuff_AlwaysBlend;
surface->SetPorterDuff(surface, DSPD_SRC_OVER);
break;
case QPainter::CompositionMode_DestinationOver:
@@ -942,6 +1001,8 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
break;
case QPainter::CompositionMode_SourceIn:
surface->SetPorterDuff(surface, DSPD_SRC_IN);
+ if (!isPremultiplied)
+ compositionModeStatus &= ~PorterDuff_PremultiplyColors;
break;
case QPainter::CompositionMode_DestinationIn:
surface->SetPorterDuff(surface, DSPD_DST_IN);
@@ -952,6 +1013,11 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
case QPainter::CompositionMode_DestinationOut:
surface->SetPorterDuff(surface, DSPD_DST_OUT);
break;
+#if (Q_DIRECTFB_VERSION >= 0x010209)
+ case QPainter::CompositionMode_Destination:
+ surface->SetPorterDuff(surface, DSPD_DST);
+ break;
+#endif
#if (Q_DIRECTFB_VERSION >= 0x010000)
case QPainter::CompositionMode_SourceAtop:
surface->SetPorterDuff(surface, DSPD_SRC_ATOP);
@@ -967,7 +1033,7 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
break;
#endif
default:
- compositionModeStatus = 0;
+ compositionModeStatus = PorterDuff_None;
break;
}
}
@@ -989,9 +1055,6 @@ void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha)
}
surface->SetColor(surface, 0xff, 0xff, 0xff, opacity);
surface->SetBlittingFlags(surface, blittingFlags);
- if (compositionModeStatus & PorterDuff_Dirty) {
- setCompositionMode(q->state()->composition_mode);
- }
}
static inline uint ALPHA_MUL(uint x, uint a)
@@ -1004,12 +1067,20 @@ static inline uint ALPHA_MUL(uint x, uint a)
void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color)
{
Q_ASSERT(surface);
+ Q_ASSERT(compositionModeStatus & PorterDuff_Supported);
const quint8 alpha = (opacity == 255 ?
color.alpha() : ALPHA_MUL(color.alpha(), opacity));
- surface->SetColor(surface, color.red(), color.green(), color.blue(), alpha);
- surface->SetPorterDuff(surface, DSPD_NONE);
- surface->SetDrawingFlags(surface, alpha == 255 ? DSDRAW_NOFX : DSDRAW_BLEND);
- compositionModeStatus |= PorterDuff_Dirty;
+ QColor col;
+ if (compositionModeStatus & PorterDuff_PremultiplyColors) {
+ col = QColor(ALPHA_MUL(color.red(), alpha),
+ ALPHA_MUL(color.green(), alpha),
+ ALPHA_MUL(color.blue(), alpha),
+ alpha);
+ } else {
+ col = QColor(color.red(), color.green(), color.blue(), alpha);
+ }
+ surface->SetColor(surface, col.red(), col.green(), col.blue(), col.alpha());
+ surface->SetDrawingFlags(surface, alpha == 255 && !(compositionModeStatus & PorterDuff_AlwaysBlend) ? DSDRAW_NOFX : DSDRAW_BLEND);
}
IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, bool *release)
@@ -1291,7 +1362,7 @@ static inline void drawRects(const T *rects, int n, const QTransform &transform,
}
}
-#ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
+#if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DEBUG
template <typename T> inline const T *ptr(const T &t) { return &t; }
template <> inline const bool* ptr<bool>(const bool &) { return 0; }
template <typename device, typename T1, typename T2, typename T3>
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index ba50329..b5ac67d 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -425,7 +425,7 @@ void QDirectFBPixmapData::fill(const QColor &color)
Q_ASSERT(dfbSurface);
- alpha = (color.alpha() < 255);
+ alpha |= (color.alpha() < 255);
if (alpha && isOpaqueFormat(imageFormat)) {
QSize size;
diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
index 7bcb74d..e78fec1 100644
--- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
+++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
@@ -325,6 +325,36 @@ static const struct {
{ 0xffe8, Qt::Key_Meta },
{ 0xffe9, Qt::Key_Alt },
{ 0xffea, Qt::Key_Alt },
+
+ { 0xffb0, Qt::Key_0 },
+ { 0xffb1, Qt::Key_1 },
+ { 0xffb2, Qt::Key_2 },
+ { 0xffb3, Qt::Key_3 },
+ { 0xffb4, Qt::Key_4 },
+ { 0xffb5, Qt::Key_5 },
+ { 0xffb6, Qt::Key_6 },
+ { 0xffb7, Qt::Key_7 },
+ { 0xffb8, Qt::Key_8 },
+ { 0xffb9, Qt::Key_9 },
+
+ { 0xff8d, Qt::Key_Return },
+ { 0xffaa, Qt::Key_Asterisk },
+ { 0xffab, Qt::Key_Plus },
+ { 0xffad, Qt::Key_Minus },
+ { 0xffae, Qt::Key_Period },
+ { 0xffaf, Qt::Key_Slash },
+
+ { 0xff95, Qt::Key_Home },
+ { 0xff96, Qt::Key_Left },
+ { 0xff97, Qt::Key_Up },
+ { 0xff98, Qt::Key_Right },
+ { 0xff99, Qt::Key_Down },
+ { 0xff9a, Qt::Key_PageUp },
+ { 0xff9b, Qt::Key_PageDown },
+ { 0xff9c, Qt::Key_End },
+ { 0xff9e, Qt::Key_Insert },
+ { 0xff9f, Qt::Key_Delete },
+
{ 0, 0 }
};
@@ -483,6 +513,10 @@ bool QRfbKeyEvent::read(QTcpSocket *s)
keycode = keyMap[i].keycode;
i++;
}
+
+ if (keycode >= ' ' && keycode <= '~')
+ unicode = keycode;
+
if (!keycode) {
if (key <= 0xff) {
unicode = key;
diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro
index 3de8ab2..2bf85f1 100644
--- a/src/plugins/sqldrivers/odbc/odbc.pro
+++ b/src/plugins/sqldrivers/odbc/odbc.pro
@@ -8,6 +8,7 @@ unix {
!contains( LIBS, .*odbc.* ) {
LIBS *= $$QT_LFLAGS_ODBC
}
+ DEFINES += UNICODE
}
win32 {