summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp33
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp16
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp24
5 files changed, 38 insertions, 43 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
index 2fb1520..896f512 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
@@ -121,8 +121,8 @@ QDirectFBMouseHandlerPrivate::QDirectFBMouseHandlerPrivate(QDirectFBMouseHandler
return;
}
- int flags = ::fcntl(fd, F_GETFL, 0);
- ::fcntl(fd, F_SETFL, flags | O_NONBLOCK);
+ int flags = fcntl(fd, F_GETFL, 0);
+ fcntl(fd, F_SETFL, flags | O_NONBLOCK);
// DirectFB seems to assume that the mouse always starts centered
prevPoint = QPoint(screen->deviceWidth() / 2, screen->deviceHeight() / 2);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 9a9553e..984b5c6 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -109,7 +109,7 @@ public:
#endif
void prepareForBlit(bool alpha);
-private:
+
IDirectFBSurface *surface;
bool antialiased;
@@ -129,7 +129,6 @@ private:
QRect currentClip;
QDirectFBPaintEngine *q;
- friend class QDirectFBPaintEngine;
};
class SurfaceCache
@@ -412,11 +411,11 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount)
d->unlock();
if (brush != Qt::NoBrush) {
d->setDFBColor(brush.color());
- CLIPPED_PAINT(::fillRects<QRect>(rects, rectCount, state()->matrix, d->surface));
+ CLIPPED_PAINT(QT_PREPEND_NAMESPACE(fillRects<QRect>)(rects, rectCount, state()->matrix, d->surface));
}
if (pen != Qt::NoPen) {
d->setDFBColor(pen.color());
- CLIPPED_PAINT(::drawRects<QRect>(rects, rectCount, state()->matrix, d->surface));
+ CLIPPED_PAINT(QT_PREPEND_NAMESPACE(drawRects<QRect>)(rects, rectCount, state()->matrix, d->surface));
}
}
@@ -441,11 +440,11 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount)
d->unlock();
if (brush != Qt::NoBrush) {
d->setDFBColor(brush.color());
- CLIPPED_PAINT(::fillRects<QRectF>(rects, rectCount, state()->matrix, d->surface));
+ CLIPPED_PAINT(fillRects<QRectF>(rects, rectCount, state()->matrix, d->surface));
}
if (pen != Qt::NoPen) {
d->setDFBColor(pen.color());
- CLIPPED_PAINT(::drawRects<QRectF>(rects, rectCount, state()->matrix, d->surface));
+ CLIPPED_PAINT(QT_PREPEND_NAMESPACE(drawRects<QRectF>)(rects, rectCount, state()->matrix, d->surface));
}
}
@@ -466,7 +465,7 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount)
if (pen != Qt::NoPen) {
d->unlock();
d->setDFBColor(pen.color());
- CLIPPED_PAINT(::drawLines<QLine>(lines, lineCount, state()->matrix, d->surface));
+ CLIPPED_PAINT(QT_PREPEND_NAMESPACE(drawLines<QLine>)(lines, lineCount, state()->matrix, d->surface));
}
}
@@ -487,7 +486,7 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount)
if (pen != Qt::NoPen) {
d->unlock();
d->setDFBColor(pen.color());
- CLIPPED_PAINT(::drawLines<QLineF>(lines, lineCount, state()->matrix, d->surface));
+ CLIPPED_PAINT(QT_PREPEND_NAMESPACE(drawLines<QLineF>)(lines, lineCount, state()->matrix, d->surface));
}
}
@@ -1040,8 +1039,8 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix
offset.ry() *= transform.m22();
const QSizeF mappedSize(pixmapSize.width() * transform.m11(), pixmapSize.height() * transform.m22());
- qreal y = ::fixCoord(destinationRect.y(), mappedSize.height(), offset.y());
- const qreal startX = ::fixCoord(destinationRect.x(), mappedSize.width(), offset.x());
+ qreal y = fixCoord(destinationRect.y(), mappedSize.height(), offset.y());
+ const qreal startX = fixCoord(destinationRect.x(), mappedSize.width(), offset.x());
while (y <= destinationRect.bottom()) {
qreal x = startX;
while (x <= destinationRect.right()) {
@@ -1052,8 +1051,8 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix
y += mappedSize.height();
}
} else {
- qreal y = ::fixCoord(destinationRect.y(), pixmapSize.height(), offset.y());
- const qreal startX = ::fixCoord(destinationRect.x(), pixmapSize.width(), offset.x());
+ qreal y = fixCoord(destinationRect.y(), pixmapSize.height(), offset.y());
+ const qreal startX = fixCoord(destinationRect.x(), pixmapSize.width(), offset.x());
int horizontal = qMax(1, destinationRect.width() / pixmapSize.width()) + 1;
if (startX != destinationRect.x())
++horizontal;
@@ -1165,12 +1164,12 @@ template <class T>
static inline void drawLines(const T *lines, int n, const QTransform &transform, IDirectFBSurface *surface)
{
if (n == 1) {
- const QLine l = ::map(transform, lines[0]);
+ const QLine l = map(transform, lines[0]);
surface->DrawLine(surface, l.x1(), l.y1(), l.x2(), l.y2());
} else {
QVarLengthArray<DFBRegion, 32> lineArray(n);
for (int i=0; i<n; ++i) {
- const QLine l = ::map(transform, lines[i]);
+ const QLine l = map(transform, lines[i]);
lineArray[i].x1 = l.x1();
lineArray[i].y1 = l.y1();
lineArray[i].x2 = l.x2();
@@ -1184,12 +1183,12 @@ template <class T>
static inline void fillRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
{
if (n == 1) {
- const QRect r = ::mapRect(transform, rects[0]);
+ const QRect r = mapRect(transform, rects[0]);
surface->FillRectangle(surface, r.x(), r.y(), r.width(), r.height());
} else {
QVarLengthArray<DFBRectangle, 32> rectArray(n);
for (int i=0; i<n; ++i) {
- const QRect r = ::mapRect(transform, rects[i]);
+ const QRect r = mapRect(transform, rects[i]);
rectArray[i].x = r.x();
rectArray[i].y = r.y();
rectArray[i].w = r.width();
@@ -1203,7 +1202,7 @@ template <class T>
static inline void drawRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
{
for (int i=0; i<n; ++i) {
- const QRect r = ::mapRect(transform, rects[i]);
+ const QRect r = mapRect(transform, rects[i]);
surface->DrawRectangle(surface, r.x(), r.y(), r.width(), r.height());
}
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index 0717020..4da2f7c 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -167,7 +167,7 @@ static bool checkForAlphaPixels(const QImage &img)
bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img)
{
#ifndef QT_NO_DIRECTFB_OPAQUE_DETECTION
- return ::checkForAlphaPixels(img);
+ return checkForAlphaPixels(img);
#else
return img.hasAlphaChannel();
#endif
@@ -443,7 +443,7 @@ void QDirectFBPixmapData::fill(const QColor &color)
alpha = (color.alpha() < 255);
- if (alpha && ::isOpaqueFormat(imageFormat)) {
+ if (alpha && isOpaqueFormat(imageFormat)) {
QSize size;
dfbSurface->GetSize(dfbSurface, &size.rwidth(), &size.rheight());
screen->releaseDFBSurface(dfbSurface);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 59fa191..c714989 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -999,9 +999,9 @@ static void printDirectFBInfo(IDirectFB *fb, IDirectFBSurface *primarySurface)
dev.name, dev.vendor, dev.driver.name, dev.driver.major,
dev.driver.minor, dev.driver.vendor, DFB_PIXELFORMAT_INDEX(pixelFormat),
QDirectFBScreen::getImageFormat(primarySurface), dev.acceleration_mask,
- ::flagDescriptions(dev.acceleration_mask, accelerationDescriptions).constData(),
- dev.blitting_flags, ::flagDescriptions(dev.blitting_flags, blitDescriptions).constData(),
- dev.drawing_flags, ::flagDescriptions(dev.drawing_flags, drawDescriptions).constData(),
+ flagDescriptions(dev.acceleration_mask, accelerationDescriptions).constData(),
+ dev.blitting_flags, flagDescriptions(dev.blitting_flags, blitDescriptions).constData(),
+ dev.drawing_flags, flagDescriptions(dev.drawing_flags, drawDescriptions).constData(),
(dev.video_memory >> 10));
}
#endif
@@ -1067,7 +1067,7 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
#ifdef QT_DIRECTFB_IMAGECACHE
int imageCacheSize = 4 * 1024 * 1024; // 4 MB
- ::setIntOption(displayArgs, QLatin1String("imagecachesize"), &imageCacheSize);
+ setIntOption(displayArgs, QLatin1String("imagecachesize"), &imageCacheSize);
QDirectFBPaintEngine::initImageCache(imageCacheSize);
#endif
@@ -1191,8 +1191,8 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
"Unable to get screen size!", result);
return false;
}
- ::setIntOption(displayArgs, QLatin1String("width"), &w);
- ::setIntOption(displayArgs, QLatin1String("height"), &h);
+ setIntOption(displayArgs, QLatin1String("width"), &w);
+ setIntOption(displayArgs, QLatin1String("height"), &h);
dw = w;
dh = h;
@@ -1200,8 +1200,8 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
Q_ASSERT(dw != 0 && dh != 0);
physWidth = physHeight = -1;
- ::setIntOption(displayArgs, QLatin1String("mmWidth"), &physWidth);
- ::setIntOption(displayArgs, QLatin1String("mmHeight"), &physHeight);
+ setIntOption(displayArgs, QLatin1String("mmWidth"), &physWidth);
+ setIntOption(displayArgs, QLatin1String("mmHeight"), &physHeight);
const int dpi = 72;
if (physWidth < 0)
physWidth = qRound(dw * 25.4 / dpi);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 73a6dd7..816bd83 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -102,6 +102,11 @@ QDirectFBWindowSurface::~QDirectFBWindowSurface()
{
}
+bool QDirectFBWindowSurface::isValid() const
+{
+ return true;
+}
+
#ifdef QT_DIRECTFB_WM
void QDirectFBWindowSurface::raise()
{
@@ -111,14 +116,7 @@ void QDirectFBWindowSurface::raise()
sibling->raise();
}
}
-#endif
-
-bool QDirectFBWindowSurface::isValid() const
-{
- return true;
-}
-#ifndef QT_NO_DIRECTFB_WM
void QDirectFBWindowSurface::createWindow()
{
IDirectFBDisplayLayer *layer = screen->dfbDisplayLayer();
@@ -148,10 +146,8 @@ void QDirectFBWindowSurface::createWindow()
dfbWindow->GetSurface(dfbWindow, &dfbSurface);
updateFormat();
}
-#endif // QT_NO_DIRECTFB_WM
-#ifndef QT_NO_DIRECTFB_WM
-static DFBResult setGeometry(IDirectFBWindow *dfbWindow, const QRect &old, const QRect &rect)
+static DFBResult setWindowGeometry(IDirectFBWindow *dfbWindow, const QRect &old, const QRect &rect)
{
DFBResult result = DFB_OK;
const bool isMove = old.isEmpty() || rect.topLeft() != old.topLeft();
@@ -178,7 +174,7 @@ static DFBResult setGeometry(IDirectFBWindow *dfbWindow, const QRect &old, const
#endif
return result;
}
-#endif
+#endif // QT_NO_DIRECTFB_WM
void QDirectFBWindowSurface::setGeometry(const QRect &rect)
{
@@ -209,7 +205,7 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect)
#ifdef QT_DIRECTFB_WM
if (!dfbWindow)
createWindow();
- ::setGeometry(dfbWindow, oldRect, rect);
+ setWindowGeometry(dfbWindow, oldRect, rect);
#else
if (mode == Primary) {
if (dfbSurface && dfbSurface != primarySurface)
@@ -271,12 +267,12 @@ bool QDirectFBWindowSurface::scroll(const QRegion &region, int dx, int dy)
return false;
dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
if (region.numRects() == 1) {
- ::scrollSurface(dfbSurface, region.boundingRect(), dx, dy);
+ scrollSurface(dfbSurface, region.boundingRect(), dx, dy);
} else {
const QVector<QRect> rects = region.rects();
const int n = rects.size();
for (int i=0; i<n; ++i) {
- ::scrollSurface(dfbSurface, rects.at(i), dx, dy);
+ scrollSurface(dfbSurface, rects.at(i), dx, dy);
}
}
return true;