diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-09-18 16:24:25 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-09-18 16:27:58 (GMT) |
commit | 87a8e182cbecde15fbf0af439b77a0ec7146274e (patch) | |
tree | 13801b948544a7b0d0c1fa96ae85cb86c6b0ab21 /src | |
parent | 9e66bbad6c43359f8ad247fd0baa980a82232ac7 (diff) | |
download | Qt-87a8e182cbecde15fbf0af439b77a0ec7146274e.zip Qt-87a8e182cbecde15fbf0af439b77a0ec7146274e.tar.gz Qt-87a8e182cbecde15fbf0af439b77a0ec7146274e.tar.bz2 |
Implement QDirectFBPaintEngine::drawRoundedRect
We need to lock before falling back to QRasterPaintEngine
Reviewed-by: Jervey Kong <jervey.kong@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/embedded/directfb.pri | 2 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 10 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h | 1 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/embedded/directfb.pri b/src/gui/embedded/directfb.pri index 43ff0c7..fa4dd68 100644 --- a/src/gui/embedded/directfb.pri +++ b/src/gui/embedded/directfb.pri @@ -14,7 +14,7 @@ #DEFINES += QT_NO_DIRECTFB_KEYBOARD #DEFINES += QT_DIRECTFB_TIMING #DEFINES += QT_NO_DIRECTFB_OPAQUE_DETECTION -#DIRECTFB_DRAWINGOPERATIONS=DRAW_RECTS|DRAW_LINES|DRAW_IMAGE|DRAW_PIXMAP|DRAW_TILED_PIXMAP|STROKE_PATH|DRAW_PATH|DRAW_POINTS|DRAW_ELLIPSE|DRAW_POLYGON|DRAW_TEXT|FILL_PATH|FILL_RECT|DRAW_COLORSPANS +#DIRECTFB_DRAWINGOPERATIONS=DRAW_RECTS|DRAW_LINES|DRAW_IMAGE|DRAW_PIXMAP|DRAW_TILED_PIXMAP|STROKE_PATH|DRAW_PATH|DRAW_POINTS|DRAW_ELLIPSE|DRAW_POLYGON|DRAW_TEXT|FILL_PATH|FILL_RECT|DRAW_COLORSPANS|DRAW_ROUNDED_RECT #DEFINES += \"QT_DIRECTFB_WARN_ON_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\" #DEFINES += \"QT_DIRECTFB_DISABLE_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\" diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index def8b7c..40476e9 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -170,7 +170,8 @@ enum PaintOperation { DRAW_PIXMAP = 0x0008, DRAW_TILED_PIXMAP = 0x0010, STROKE_PATH = 0x0020, DRAW_PATH = 0x0040, DRAW_POINTS = 0x0080, DRAW_ELLIPSE = 0x0100, DRAW_POLYGON = 0x0200, DRAW_TEXT = 0x0400, FILL_PATH = 0x0800, - FILL_RECT = 0x1000, DRAW_COLORSPANS = 0x2000, ALL = 0xffff + FILL_RECT = 0x1000, DRAW_COLORSPANS = 0x2000, DRAW_ROUNDED_RECT = 0x4000, + ALL = 0xffff }; #endif @@ -691,6 +692,13 @@ void QDirectFBPaintEngine::fill(const QVectorPath &path, const QBrush &brush) QRasterPaintEngine::fill(path, brush); } +void QDirectFBPaintEngine::drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode) +{ + RASTERFALLBACK(DRAW_ROUNDED_RECT, rect, xrad, yrad); + Q_D(QDirectFBPaintEngine); + d->lock(); + QRasterPaintEngine::drawRoundedRect(rect, xrad, yrad, mode); +} void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) { diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h index 63d6dc0..94cb556 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h @@ -94,6 +94,7 @@ public: virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode); virtual void drawTextItem(const QPointF &p, const QTextItem &textItem); virtual void fill(const QVectorPath &path, const QBrush &brush); + virtual void drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode); virtual void clipEnabledChanged(); virtual void penChanged(); |