summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-04 10:13:43 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-04 10:13:43 +0200
commit19822fa60c2a5b649950ce9bffced6d18aa71b8e (patch)
tree5ab3ca317e77736747096136991b65b339a10186 /src/gui
parent8d5df33f9cb9a8df03e4e8eced64731bfe8e8757 (diff)
Get rid of QCustomRasterPaintDevice / QWS stuff in raster engine.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qdrawhelper.cpp744
-rw-r--r--src/gui/painting/qdrawhelper_p.h144
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp230
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h65
4 files changed, 44 insertions, 1139 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 5e75e4a884..ad0edaa00c 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -3415,9 +3415,6 @@ static
void drawBufferSpan(QSpanData *data, const uint *buffer, int bufsize,
int x, int y, int length, uint const_alpha)
{
-#if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS)
- data->rasterEngine->drawBufferSpan(buffer, bufsize, x, y, length, const_alpha);
-#else
Q_UNUSED(data);
Q_UNUSED(buffer);
Q_UNUSED(bufsize);
@@ -3425,7 +3422,6 @@ void drawBufferSpan(QSpanData *data, const uint *buffer, int bufsize,
Q_UNUSED(y);
Q_UNUSED(length);
Q_UNUSED(const_alpha);
-#endif
}
#if !defined(Q_CC_SUN)
@@ -3453,18 +3449,6 @@ void blend_color_generic(int count, const QSpan *spans, void *userData)
}
}
-#if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS)
-static void blend_color_generic_callback(int count, const QSpan *spans, void *userData)
-{
- // ### Falcon
- Q_UNUSED(count);
- Q_UNUSED(spans);
- Q_UNUSED(userData);
-// QSpanData *data = reinterpret_cast<QSpanData*>(userData);
-// data->rasterEngine->drawColorSpans(spans, count, data->solid.color);
-}
-#endif // QT_NO_RASTERCALLBACKS
-
static void blend_color_argb(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
@@ -5087,65 +5071,30 @@ void QT_FASTCALL blendUntransformed(int count, const QSpan *spans, void *userDat
static void blend_untransformed_rgb888(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_24)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_RGB888)
- blendUntransformed<qrgb888, qrgb888>(count, spans, userData);
- else
-#endif
- blend_untransformed_generic<RegularSpans>(count, spans, userData);
+ blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
static void blend_untransformed_argb6666(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendUntransformed<qargb6666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendUntransformed<qargb6666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_untransformed_generic<RegularSpans>(count, spans, userData);
+ blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
static void blend_untransformed_rgb666(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendUntransformed<qrgb666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendUntransformed<qrgb666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_untransformed_generic<RegularSpans>(count, spans, userData);
+ blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
static void blend_untransformed_argb8565(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_16)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
- blendUntransformed<qargb8565, qargb8565>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB16)
- blendUntransformed<qargb8565, qrgb565>(count, spans, userData);
- else
-#endif
- blend_untransformed_generic<RegularSpans>(count, spans, userData);
+ blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
static void blend_untransformed_rgb565(int count, const QSpan *spans,
void *userData)
{
-#if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16)
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
@@ -5153,68 +5102,31 @@ static void blend_untransformed_rgb565(int count, const QSpan *spans,
else if (data->texture.format == QImage::Format_RGB16)
blendUntransformed<qrgb565, qrgb565>(count, spans, userData);
else
-#endif
blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
static void blend_untransformed_argb8555(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendUntransformed<qargb8555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendUntransformed<qargb8555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_untransformed_generic<RegularSpans>(count, spans, userData);
+ blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
static void blend_untransformed_rgb555(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendUntransformed<qrgb555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendUntransformed<qrgb555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_untransformed_generic<RegularSpans>(count, spans, userData);
+ blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
static void blend_untransformed_argb4444(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendUntransformed<qargb4444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendUntransformed<qargb4444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_untransformed_generic<RegularSpans>(count, spans, userData);
+ blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
static void blend_untransformed_rgb444(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendUntransformed<qrgb444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendUntransformed<qrgb444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_untransformed_generic<RegularSpans>(count, spans, userData);
+ blend_untransformed_generic<RegularSpans>(count, spans, userData);
}
template <SpanMethod spanMethod>
@@ -5430,61 +5342,26 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void *
static void blend_tiled_rgb888(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_24)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_RGB888)
- blendTiled<qrgb888, qrgb888>(count, spans, userData);
- else
-#endif
- blend_tiled_generic<RegularSpans>(count, spans, userData);
+ blend_tiled_generic<RegularSpans>(count, spans, userData);
}
static void blend_tiled_argb6666(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendTiled<qargb6666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendTiled<qargb6666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_tiled_generic<RegularSpans>(count, spans, userData);
+ blend_tiled_generic<RegularSpans>(count, spans, userData);
}
static void blend_tiled_rgb666(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendTiled<qrgb666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendTiled<qrgb666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_tiled_generic<RegularSpans>(count, spans, userData);
+ blend_tiled_generic<RegularSpans>(count, spans, userData);
}
static void blend_tiled_argb8565(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_16)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
- blendTiled<qargb8565, qargb8565>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB16)
- blendTiled<qargb8565, qrgb565>(count, spans, userData);
- else
-#endif
- blend_tiled_generic<RegularSpans>(count, spans, userData);
+ blend_tiled_generic<RegularSpans>(count, spans, userData);
}
static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
{
-#if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16)
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
@@ -5492,64 +5369,27 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
else if (data->texture.format == QImage::Format_RGB16)
blendTiled<qrgb565, qrgb565>(count, spans, userData);
else
-#endif
blend_tiled_generic<RegularSpans>(count, spans, userData);
}
static void blend_tiled_argb8555(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendTiled<qargb8555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendTiled<qargb8555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_tiled_generic<RegularSpans>(count, spans, userData);
+ blend_tiled_generic<RegularSpans>(count, spans, userData);
}
static void blend_tiled_rgb555(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendTiled<qrgb555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendTiled<qrgb555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_tiled_generic<RegularSpans>(count, spans, userData);
+ blend_tiled_generic<RegularSpans>(count, spans, userData);
}
static void blend_tiled_argb4444(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendTiled<qargb4444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendTiled<qargb4444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_tiled_generic<RegularSpans>(count, spans, userData);
+ blend_tiled_generic<RegularSpans>(count, spans, userData);
}
static void blend_tiled_rgb444(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendTiled<qrgb444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendTiled<qrgb444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_tiled_generic<RegularSpans>(count, spans, userData);
+ blend_tiled_generic<RegularSpans>(count, spans, userData);
}
template <class DST, class SRC>
@@ -5777,62 +5617,27 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan
static void blend_transformed_bilinear_rgb888(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_24)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_RGB888)
- blendTransformedBilinear<qrgb888, qrgb888>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_bilinear_argb6666(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendTransformedBilinear<qargb6666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendTransformedBilinear<qargb6666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_bilinear_rgb666(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendTransformedBilinear<qrgb666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendTransformedBilinear<qrgb666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_bilinear_argb8565(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_16)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
- blendTransformedBilinear<qargb8565, qargb8565>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB16)
- blendTransformedBilinear<qargb8565, qrgb565>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans,
void *userData)
{
-#if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16)
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
if (data->texture.format == QImage::Format_RGB16)
@@ -5840,64 +5645,27 @@ static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans,
else if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
blendTransformedBilinear<qrgb565, qargb8565>(count, spans, userData);
else
-#endif
blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_bilinear_argb8555(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendTransformedBilinear<qargb8555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendTransformedBilinear<qargb8555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_bilinear_rgb555(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendTransformedBilinear<qrgb555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendTransformedBilinear<qrgb555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_bilinear_argb4444(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendTransformedBilinear<qargb4444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendTransformedBilinear<qargb4444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_bilinear_rgb444(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendTransformedBilinear<qrgb444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendTransformedBilinear<qrgb444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
template <SpanMethod spanMethod>
@@ -6170,65 +5938,30 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformed(int count, const QSpan *spans,
static void blend_transformed_rgb888(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_24)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_RGB888)
- blendTransformed<qrgb888, qrgb888>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_argb6666(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendTransformed<qargb6666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendTransformed<qargb6666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_rgb666(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendTransformed<qrgb666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendTransformed<qrgb666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_argb8565(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_16)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
- blendTransformed<qargb8565, qargb8565>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB16)
- blendTransformed<qargb8565, qrgb565>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_rgb565(int count, const QSpan *spans,
void *userData)
{
-#if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16)
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
@@ -6236,68 +5969,31 @@ static void blend_transformed_rgb565(int count, const QSpan *spans,
else if (data->texture.format == QImage::Format_RGB16)
blendTransformed<qrgb565, qrgb565>(count, spans, userData);
else
-#endif
blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_argb8555(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendTransformed<qargb8555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendTransformed<qargb8555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_rgb555(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendTransformed<qrgb555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendTransformed<qrgb555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_argb4444(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendTransformed<qargb4444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendTransformed<qargb4444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_rgb444(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendTransformed<qrgb444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendTransformed<qrgb444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
template <SpanMethod spanMethod>
@@ -6585,65 +6281,30 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *sp
static void blend_transformed_tiled_rgb888(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_24)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_RGB888)
- blendTransformedTiled<qrgb888, qrgb888>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_tiled_argb6666(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendTransformedTiled<qargb6666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendTransformedTiled<qargb6666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_tiled_rgb666(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_18)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB6666_Premultiplied)
- blendTransformedTiled<qrgb666, qargb6666>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB666)
- blendTransformedTiled<qrgb666, qrgb666>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_tiled_argb8565(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_16)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
- blendTransformedTiled<qargb8565, qargb8565>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB16)
- blendTransformedTiled<qargb8565, qrgb565>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_tiled_rgb565(int count, const QSpan *spans,
void *userData)
{
-#if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16)
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
@@ -6651,68 +6312,31 @@ static void blend_transformed_tiled_rgb565(int count, const QSpan *spans,
else if (data->texture.format == QImage::Format_RGB16)
blendTransformedTiled<qrgb565, qrgb565>(count, spans, userData);
else
-#endif
blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_tiled_argb8555(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendTransformedTiled<qargb8555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendTransformedTiled<qargb8555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_tiled_rgb555(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_15)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB8555_Premultiplied)
- blendTransformedTiled<qrgb555, qargb8555>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB555)
- blendTransformedTiled<qrgb555, qrgb555>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_tiled_argb4444(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendTransformedTiled<qargb4444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendTransformedTiled<qargb4444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
static void blend_transformed_tiled_rgb444(int count, const QSpan *spans,
void *userData)
{
-#if defined(QT_QWS_DEPTH_12)
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- if (data->texture.format == QImage::Format_ARGB4444_Premultiplied)
- blendTransformedTiled<qrgb444, qargb4444>(count, spans, userData);
- else if (data->texture.format == QImage::Format_RGB444)
- blendTransformedTiled<qrgb444, qrgb444>(count, spans, userData);
- else
-#endif
- blend_src_generic<RegularSpans>(count, spans, userData);
+ blend_src_generic<RegularSpans>(count, spans, userData);
}
# define SPANFUNC_POINTER(Name, Arg) Name<Arg>
@@ -6836,125 +6460,6 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
}
};
-#if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS)
-static const ProcessSpans processTextureSpansCallback[NBlendTypes][QImage::NImageFormats] = {
- // Untransformed
- {
- 0, // Invalid
- blend_untransformed_generic<CallbackSpans>, // Mono
- blend_untransformed_generic<CallbackSpans>, // MonoLsb
- blend_untransformed_generic<CallbackSpans>, // Indexed8
- blend_untransformed_generic<CallbackSpans>, // RGB32
- blend_untransformed_generic<CallbackSpans>, // ARGB32
- blend_untransformed_argb<CallbackSpans>, // ARGB32_Premultiplied
- blend_untransformed_generic<CallbackSpans>, // RGB16
- blend_untransformed_generic<CallbackSpans>, // ARGB8565_Premultiplied
- blend_untransformed_generic<CallbackSpans>, // RGB666
- blend_untransformed_generic<CallbackSpans>, // ARGB6666_Premultiplied
- blend_untransformed_generic<CallbackSpans>, // RGB555
- blend_untransformed_generic<CallbackSpans>, // ARGB8555_Premultiplied
- blend_untransformed_generic<CallbackSpans>, // RGB888
- blend_untransformed_generic<CallbackSpans>, // RGB444
- blend_untransformed_generic<CallbackSpans> // ARGB4444_Premultiplied
- },
- // Tiled
- {
- 0, // Invalid
- blend_tiled_generic<CallbackSpans>, // Mono
- blend_tiled_generic<CallbackSpans>, // MonoLsb
- blend_tiled_generic<CallbackSpans>, // Indexed8
- blend_tiled_generic<CallbackSpans>, // RGB32
- blend_tiled_generic<CallbackSpans>, // ARGB32
- blend_tiled_argb<CallbackSpans>, // ARGB32_Premultiplied
- blend_tiled_generic<CallbackSpans>, // RGB16
- blend_tiled_generic<CallbackSpans>, // ARGB8565_Premultiplied
- blend_tiled_generic<CallbackSpans>, // RGB666
- blend_tiled_generic<CallbackSpans>, // ARGB6666_Premultiplied
- blend_tiled_generic<CallbackSpans>, // RGB555
- blend_tiled_generic<CallbackSpans>, // ARGB8555_Premultiplied
- blend_tiled_generic<CallbackSpans>, // RGB888
- blend_tiled_generic<CallbackSpans>, // RGB444
- blend_tiled_generic<CallbackSpans> // ARGB4444_Premultiplied
- },
- // Transformed
- {
- 0, // Invalid
- blend_src_generic<CallbackSpans>, // Mono
- blend_src_generic<CallbackSpans>, // MonoLsb
- blend_src_generic<CallbackSpans>, // Indexed8
- blend_src_generic<CallbackSpans>, // RGB32
- blend_src_generic<CallbackSpans>, // ARGB32
- blend_transformed_argb<CallbackSpans>, // ARGB32_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB16
- blend_src_generic<CallbackSpans>, // ARGB8565_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB666
- blend_src_generic<CallbackSpans>, // ARGB6666_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB555
- blend_src_generic<CallbackSpans>, // ARGB8555_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB888
- blend_src_generic<CallbackSpans>, // RGB444
- blend_src_generic<CallbackSpans>, // ARGB4444_Premultiplied
- },
- // TransformedTiled
- {
- 0,
- blend_src_generic<CallbackSpans>, // Mono
- blend_src_generic<CallbackSpans>, // MonoLsb
- blend_src_generic<CallbackSpans>, // Indexed8
- blend_src_generic<CallbackSpans>, // RGB32
- blend_src_generic<CallbackSpans>, // ARGB32
- blend_transformed_tiled_argb<CallbackSpans>, // ARGB32_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB16
- blend_src_generic<CallbackSpans>, // ARGB8565_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB666
- blend_src_generic<CallbackSpans>, // ARGB6666_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB555
- blend_src_generic<CallbackSpans>, // ARGB8555_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB888
- blend_src_generic<CallbackSpans>, // RGB444
- blend_src_generic<CallbackSpans> // ARGB4444_Premultiplied
- },
- // Bilinear
- {
- 0,
- blend_src_generic<CallbackSpans>, // Mono
- blend_src_generic<CallbackSpans>, // MonoLsb
- blend_src_generic<CallbackSpans>, // Indexed8
- blend_src_generic<CallbackSpans>, // RGB32
- blend_src_generic<CallbackSpans>, // ARGB32
- blend_src_generic<CallbackSpans>, // ARGB32_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB16
- blend_src_generic<CallbackSpans>, // ARGB8565_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB666
- blend_src_generic<CallbackSpans>, // ARGB6666_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB555
- blend_src_generic<CallbackSpans>, // ARGB8555_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB888
- blend_src_generic<CallbackSpans>, // RGB444
- blend_src_generic<CallbackSpans> // ARGB4444_Premultiplied
- },
- // BilinearTiled
- {
- 0,
- blend_src_generic<CallbackSpans>, // Mono
- blend_src_generic<CallbackSpans>, // MonoLsb
- blend_src_generic<CallbackSpans>, // Indexed8
- blend_src_generic<CallbackSpans>, // RGB32
- blend_src_generic<CallbackSpans>, // ARGB32
- blend_src_generic<CallbackSpans>, // ARGB32_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB16
- blend_src_generic<CallbackSpans>, // ARGB8565_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB666
- blend_src_generic<CallbackSpans>, // ARGB6666_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB555
- blend_src_generic<CallbackSpans>, // ARGB8555_Premultiplied
- blend_src_generic<CallbackSpans>, // RGB888
- blend_src_generic<CallbackSpans>, // RGB444
- blend_src_generic<CallbackSpans> // ARGB4444_Premultiplied
- }
-};
-#endif // QT_NO_RASTERCALLBACKS
-
void qBlendTexture(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
@@ -6962,15 +6467,6 @@ void qBlendTexture(int count, const QSpan *spans, void *userData)
proc(count, spans, userData);
}
-#if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS)
-void qBlendTextureCallback(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- ProcessSpans proc = processTextureSpansCallback[getBlendType(data)][data->rasterBuffer->format];
- proc(count, spans, userData);
-}
-#endif // QT_NO_RASTERCALLBACKS
-
template <class DST>
inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer,
int x, int y, quint32 color,
@@ -7626,106 +7122,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
}
};
-#if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS)
-DrawHelper qDrawHelperCallback[QImage::NImageFormats] =
-{
- // Format_Invalid,
- { 0, 0, 0, 0, 0, 0 },
- // Format_Mono,
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_MonoLSB,
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_Indexed8,
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_RGB32,
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_ARGB32,
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_ARGB32_Premultiplied
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_RGB16
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_ARGB8565_Premultiplied
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_RGB666
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_ARGB6666_Premultiplied
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_RGB555
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_ARGB8555_Premultiplied
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_RGB888
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_RGB444
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- },
- // Format_ARGB4444_Premultiplied
- {
- blend_color_generic_callback,
- blend_src_generic<CallbackSpans>,
- 0, 0, 0, 0
- }
-};
-#endif
-
-
-
#if defined(Q_CC_MSVC) && !defined(_MIPS_)
template <class DST, class SRC>
inline void qt_memfill_template(DST *dest, SRC color, int count)
@@ -8015,64 +7411,4 @@ static void qt_memfill16_setup(quint16 *dest, quint16 value, int count)
qt_memfill16(dest, value, count);
}
-#ifdef QT_QWS_DEPTH_GENERIC
-
-int qrgb::bpp = 0;
-int qrgb::len_red = 0;
-int qrgb::len_green = 0;
-int qrgb::len_blue = 0;
-int qrgb::len_alpha = 0;
-int qrgb::off_red = 0;
-int qrgb::off_green = 0;
-int qrgb::off_blue = 0;
-int qrgb::off_alpha = 0;
-
-template <typename SRC>
-Q_STATIC_TEMPLATE_FUNCTION inline void qt_rectconvert_rgb(qrgb *dest, const SRC *src,
- int x, int y, int width, int height,
- int dstStride, int srcStride)
-{
- quint8 *dest8 = reinterpret_cast<quint8*>(dest)
- + y * dstStride + x * qrgb::bpp;
-
- srcStride = srcStride / sizeof(SRC) - width;
- dstStride -= (width * qrgb::bpp);
-
- for (int j = 0; j < height; ++j) {
- for (int i = 0; i < width; ++i) {
- const quint32 v = qt_convertToRgb<SRC>(*src++);
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- for (int j = qrgb::bpp - 1; j >= 0; --j)
- *dest8++ = (v >> (8 * j)) & 0xff;
-#else
- for (int j = 0; j < qrgb::bpp; ++j)
- *dest8++ = (v >> (8 * j)) & 0xff;
-#endif
- }
-
- dest8 += dstStride;
- src += srcStride;
- }
-}
-
-template <>
-void qt_rectconvert(qrgb *dest, const quint32 *src,
- int x, int y, int width, int height,
- int dstStride, int srcStride)
-{
- qt_rectconvert_rgb<quint32>(dest, src, x, y, width, height,
- dstStride, srcStride);
-}
-
-template <>
-void qt_rectconvert(qrgb *dest, const quint16 *src,
- int x, int y, int width, int height,
- int dstStride, int srcStride)
-{
- qt_rectconvert_rgb<quint16>(dest, src, x, y, width, height,
- dstStride, srcStride);
-}
-
-#endif // QT_QWS_DEPTH_GENERIC
-
QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index d4e731bbb2..a16a9bec51 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -64,10 +64,6 @@
#include "private/qrasterdefs_p.h"
#include <private/qsimd_p.h>
-#ifdef Q_WS_QWS
-#include "QtGui/qscreen_qws.h"
-#endif
-
QT_BEGIN_NAMESPACE
#if defined(Q_CC_MSVC) && _MSCVER <= 1300 && !defined(Q_CC_INTEL)
@@ -170,10 +166,6 @@ extern MemRotateFunc qMemRotateFunctions[QImage::NImageFormats][3];
extern DrawHelper qDrawHelper[QImage::NImageFormats];
void qBlendTexture(int count, const QSpan *spans, void *userData);
-#if defined(Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS)
-extern DrawHelper qDrawHelperCallback[QImage::NImageFormats];
-void qBlendTextureCallback(int count, const QSpan *spans, void *userData);
-#endif
typedef void (QT_FASTCALL *CompositionFunction)(uint *dest, const uint *src, int length, uint const_alpha);
typedef void (QT_FASTCALL *CompositionFunctionSolid)(uint *dest, int length, uint color, uint const_alpha);
@@ -231,11 +223,7 @@ struct QGradientData
QConicalGradientData conical;
};
-#ifdef Q_WS_QWS
-#define GRADIENT_STOPTABLE_SIZE 256
-#else
#define GRADIENT_STOPTABLE_SIZE 1024
-#endif
uint* colorTable; //[GRADIENT_STOPTABLE_SIZE];
@@ -272,9 +260,6 @@ struct QSpanData
~QSpanData() { delete tempImage; }
QRasterBuffer *rasterBuffer;
-#ifdef Q_WS_QWS
- QRasterPaintEngine *rasterEngine;
-#endif
ProcessSpans blend;
ProcessSpans unclipped_blend;
BitmapBlitFunc bitmapBlit;
@@ -1238,37 +1223,6 @@ inline quint32 qt_colorConvert(qrgb888 color, quint32 dummy)
return quint32(color);
}
-#ifdef QT_QWS_DEPTH_8
-template <>
-inline quint8 qt_colorConvert(quint32 color, quint8 dummy)
-{
- Q_UNUSED(dummy);
-
- uchar r = ((qRed(color) & 0xf8) + 0x19) / 0x33;
- uchar g = ((qGreen(color) &0xf8) + 0x19) / 0x33;
- uchar b = ((qBlue(color) &0xf8) + 0x19) / 0x33;
-
- return r*6*6 + g*6 + b;
-}
-
-template <>
-inline quint8 qt_colorConvert(quint16 color, quint8 dummy)
-{
- Q_UNUSED(dummy);
-
- uchar r = (color & 0xf800) >> (11-3);
- uchar g = (color & 0x07c0) >> (6-3);
- uchar b = (color & 0x001f) << 3;
-
- uchar tr = (r + 0x19) / 0x33;
- uchar tg = (g + 0x19) / 0x33;
- uchar tb = (b + 0x19) / 0x33;
-
- return tr*6*6 + tg*6 + tb;
-}
-
-#endif // QT_QWS_DEPTH_8
-
// hw: endianess??
class quint24
{
@@ -1505,84 +1459,6 @@ qrgb444 qrgb444::byte_mul(quint8 a) const
return result;
}
-#ifdef QT_QWS_DEPTH_GENERIC
-
-struct qrgb
-{
-public:
- static int bpp;
- static int len_red;
- static int len_green;
- static int len_blue;
- static int len_alpha;
- static int off_red;
- static int off_green;
- static int off_blue;
- static int off_alpha;
-} Q_PACKED;
-
-template <typename SRC>
-Q_STATIC_TEMPLATE_FUNCTION inline quint32 qt_convertToRgb(SRC color);
-
-template <>
-inline quint32 qt_convertToRgb(quint32 color)
-{
- const int r = qRed(color) >> (8 - qrgb::len_red);
- const int g = qGreen(color) >> (8 - qrgb::len_green);
- const int b = qBlue(color) >> (8 - qrgb::len_blue);
- const int a = qAlpha(color) >> (8 - qrgb::len_alpha);
- const quint32 v = (r << qrgb::off_red)
- | (g << qrgb::off_green)
- | (b << qrgb::off_blue)
- | (a << qrgb::off_alpha);
-
- return v;
-}
-
-template <>
-inline quint32 qt_convertToRgb(quint16 color)
-{
- return qt_convertToRgb(qt_colorConvert<quint32, quint16>(color, 0));
-}
-
-class qrgb_generic16
-{
-public:
- inline qrgb_generic16(quint32 color)
- {
- const int r = qRed(color) >> (8 - qrgb::len_red);
- const int g = qGreen(color) >> (8 - qrgb::len_green);
- const int b = qBlue(color) >> (8 - qrgb::len_blue);
- const int a = qAlpha(color) >> (8 - qrgb::len_alpha);
- data = (r << qrgb::off_red)
- | (g << qrgb::off_green)
- | (b << qrgb::off_blue)
- | (a << qrgb::off_alpha);
- }
-
- inline operator quint16 () { return data; }
- inline quint32 operator<<(int shift) const { return data << shift; }
-
-private:
- quint16 data;
-} Q_PACKED;
-
-template <>
-inline qrgb_generic16 qt_colorConvert(quint32 color, qrgb_generic16 dummy)
-{
- Q_UNUSED(dummy);
- return qrgb_generic16(color);
-}
-
-template <>
-inline qrgb_generic16 qt_colorConvert(quint16 color, qrgb_generic16 dummy)
-{
- Q_UNUSED(dummy);
- return qrgb_generic16(qt_colorConvert<quint32, quint16>(color, 0));
-}
-
-#endif // QT_QWS_DEPTH_GENERIC
-
template <class T>
void qt_memfill(T *dest, T value, int count);
@@ -1790,16 +1666,6 @@ QT_RECTCONVERT_TRIVIAL_IMPL(qargb4444)
QT_RECTCONVERT_TRIVIAL_IMPL(qrgb444)
#undef QT_RECTCONVERT_TRIVIAL_IMPL
-#ifdef QT_QWS_DEPTH_GENERIC
-template <> void qt_rectconvert(qrgb *dest, const quint32 *src,
- int x, int y, int width, int height,
- int dstStride, int srcStride);
-
-template <> void qt_rectconvert(qrgb *dest, const quint16 *src,
- int x, int y, int width, int height,
- int dstStride, int srcStride);
-#endif // QT_QWS_DEPTH_GENERIC
-
#define QT_MEMFILL_UINT(dest, length, color) \
qt_memfill<quint32>(dest, color, length);
@@ -1862,16 +1728,6 @@ inline ushort qConvertRgb32To16(uint c)
| (((c) >> 8) & 0xf800);
}
-#if defined(Q_WS_QWS) || (QT_VERSION >= 0x040400)
-inline quint32 qConvertRgb32To16x2(quint64 c)
-{
- c = (((c) >> 3) & Q_UINT64_C(0x001f0000001f))
- | (((c) >> 5) & Q_UINT64_C(0x07e0000007e0))
- | (((c) >> 8) & Q_UINT64_C(0xf8000000f800));
- return c | (c >> 16);
-}
-#endif
-
inline QRgb qConvertRgb16To32(uint c)
{
return 0xff000000
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 9fff66646b..9c86172753 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -85,14 +85,6 @@
# include <private/qt_mac_p.h>
# include <private/qpixmap_mac_p.h>
# include <private/qpaintengine_mac_p.h>
-#elif defined(Q_WS_QWS)
-# if !defined(QT_NO_FREETYPE)
-# include <private/qfontengine_ft_p.h>
-# endif
-# if !defined(QT_NO_QWS_QPF2)
-# include <private/qfontengine_qpf_p.h>
-# endif
-# include <private/qabstractfontengine_p.h>
#elif defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
# include <private/qfontengine_s60_p.h>
#elif defined(Q_WS_QPA)
@@ -383,11 +375,6 @@ void QRasterPaintEngine::init()
case QInternal::Image:
format = d->rasterBuffer->prepare(static_cast<QImage *>(d->device));
break;
-#ifdef Q_WS_QWS
- case QInternal::CustomRaster:
- d->rasterBuffer->prepare(static_cast<QCustomRasterPaintDevice*>(d->device));
- break;
-#endif
default:
qWarning("QRasterPaintEngine: unsupported target device %d\n", d->device->devType());
d->device = 0;
@@ -985,13 +972,6 @@ void QRasterPaintEngine::clipEnabledChanged()
}
}
-#ifdef Q_WS_QWS
-void QRasterPaintEnginePrivate::prepare(QCustomRasterPaintDevice *device)
-{
- rasterBuffer->prepare(device);
-}
-#endif
-
void QRasterPaintEnginePrivate::drawImage(const QPointF &pt,
const QImage &img,
SrcOverBlendFunc func,
@@ -3455,22 +3435,6 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
QFontEngine *fontEngine = ti.fontEngine;
-#if defined(Q_WS_QWS)
- if (fontEngine->type() == QFontEngine::Box) {
- fontEngine->draw(this, qFloor(p.x()), qFloor(p.y()), ti);
- return;
- }
-
- if (s->matrix.type() < QTransform::TxScale
- && (fontEngine->type() == QFontEngine::QPF1 || fontEngine->type() == QFontEngine::QPF2
- || (fontEngine->type() == QFontEngine::Proxy
- && !(static_cast<QProxyFontEngine *>(fontEngine)->drawAsOutline()))
- )) {
- fontEngine->draw(this, qFloor(p.x()), qFloor(p.y()), ti);
- return;
- }
-#endif // Q_WS_QWS
-
#ifdef Q_WS_QPA
if (s->matrix.type() < QTransform::TxScale) {
@@ -3500,14 +3464,6 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
#if (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)) && !defined(QT_NO_FREETYPE)
-#if defined(Q_WS_QWS) && !defined(QT_NO_QWS_QPF2)
- if (fontEngine->type() == QFontEngine::QPF2) {
- QFontEngine *renderingEngine = static_cast<QFontEngineQPF *>(fontEngine)->renderingEngine();
- if (renderingEngine)
- fontEngine = renderingEngine;
- }
-#endif
-
if (fontEngine->type() != QFontEngine::Freetype) {
QPaintEngineEx::drawTextItem(p, ti);
return;
@@ -3877,59 +3833,6 @@ QPoint QRasterPaintEngine::coordinateOffset() const
return QPoint(0, 0);
}
-/*!
- Draws the given color \a spans with the specified \a color. The \a
- count parameter specifies the number of spans.
-
- The default implementation does nothing; reimplement this function
- to draw the given color \a spans with the specified \a color. Note
- that this function \e must be reimplemented if the framebuffer is
- not memory-mapped.
-
- \sa drawBufferSpan()
-*/
-#if defined(Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS)
-void QRasterPaintEngine::drawColorSpans(const QSpan *spans, int count, uint color)
-{
- Q_UNUSED(spans);
- Q_UNUSED(count);
- Q_UNUSED(color);
- qFatal("QRasterPaintEngine::drawColorSpans must be reimplemented on "
- "a non memory-mapped device");
-}
-
-/*!
- \fn void QRasterPaintEngine::drawBufferSpan(const uint *buffer, int size, int x, int y, int length, uint alpha)
-
- Draws the given \a buffer.
-
- The default implementation does nothing; reimplement this function
- to draw a buffer that contains more than one color. Note that this
- function \e must be reimplemented if the framebuffer is not
- memory-mapped.
-
- The \a size parameter specifies the total size of the given \a
- buffer, while the \a length parameter specifies the number of
- pixels to draw. The buffer's position is given by (\a x, \a
- y). The provided \a alpha value is added to each pixel in the
- buffer when drawing.
-
- \sa drawColorSpans()
-*/
-void QRasterPaintEngine::drawBufferSpan(const uint *buffer, int bufsize,
- int x, int y, int length, uint const_alpha)
-{
- Q_UNUSED(buffer);
- Q_UNUSED(bufsize);
- Q_UNUSED(x);
- Q_UNUSED(y);
- Q_UNUSED(length);
- Q_UNUSED(const_alpha);
- qFatal("QRasterPaintEngine::drawBufferSpan must be reimplemented on "
- "a non memory-mapped device");
-}
-#endif // Q_WS_QWS
-
void QRasterPaintEngine::drawBitmap(const QPointF &pos, const QImage &image, QSpanData *fg)
{
Q_ASSERT(fg);
@@ -4377,127 +4280,6 @@ void QRasterBuffer::resetBuffer(int val)
memset(m_buffer, val, m_height*bytes_per_line);
}
-
-#if defined(Q_WS_QWS)
-void QRasterBuffer::prepare(QCustomRasterPaintDevice *device)
-{
- m_buffer = reinterpret_cast<uchar*>(device->memory());
- m_width = qMin(QT_RASTER_COORD_LIMIT, device->width());
- m_height = qMin(QT_RASTER_COORD_LIMIT, device->height());
- bytes_per_pixel = device->depth() / 8;
- bytes_per_line = device->bytesPerLine();
- format = device->format();
-#ifndef QT_NO_RASTERCALLBACKS
- if (!m_buffer)
- drawHelper = qDrawHelperCallback + format;
- else
-#endif
- drawHelper = qDrawHelper + format;
-}
-
-int QCustomRasterPaintDevice::metric(PaintDeviceMetric m) const
-{
- switch (m) {
- case PdmWidth:
- return widget->frameGeometry().width();
- case PdmHeight:
- return widget->frameGeometry().height();
- default:
- break;
- }
-
- return qt_paint_device_metric(widget, m);
-}
-
-int QCustomRasterPaintDevice::bytesPerLine() const
-{
- return (width() * depth() + 7) / 8;
-}
-
-#elif defined(Q_OS_SYMBIAN)
-
-void QRasterBuffer::prepareBuffer(int /* width */, int /* height */)
-{
-}
-
-#endif // Q_OS_SYMBIAN
-
-/*!
- \class QCustomRasterPaintDevice
- \preliminary
- \ingroup qws
- \since 4.2
-
- \brief The QCustomRasterPaintDevice class is provided to activate
- hardware accelerated paint engines in Qt for Embedded Linux.
-
- Note that this class is only available in \l{Qt for Embedded Linux}.
-
- In \l{Qt for Embedded Linux}, painting is a pure software
- implementation. But starting with Qt 4.2, it is
- possible to add an accelerated graphics driver to take advantage
- of available hardware resources.
-
- Hardware acceleration is accomplished by creating a custom screen
- driver, accelerating the copying from memory to the screen, and
- implementing a custom paint engine accelerating the various
- painting operations. Then a custom paint device (derived from the
- QCustomRasterPaintDevice class) and a custom window surface
- (derived from QWSWindowSurface) must be implemented to make
- \l{Qt for Embedded Linux} aware of the accelerated driver.
-
- See the \l {Adding an Accelerated Graphics Driver to Qt for Embedded Linux}
- documentation for details.
-
- \sa QRasterPaintEngine, QPaintDevice
-*/
-
-/*!
- \fn QCustomRasterPaintDevice::QCustomRasterPaintDevice(QWidget *widget)
-
- Constructs a custom raster based paint device for the given
- top-level \a widget.
-*/
-
-/*!
- \fn int QCustomRasterPaintDevice::bytesPerLine() const
-
- Returns the number of bytes per line in the framebuffer. Note that
- this number might be larger than the framebuffer width.
-*/
-
-/*!
- \fn int QCustomRasterPaintDevice::devType() const
- \internal
-*/
-
-/*!
- \fn QImage::Format QCustomRasterPaintDevice::format() const
-
- Returns the format of the device's memory buffet.
-
- The default format is QImage::Format_ARGB32_Premultiplied. The
- only other valid format is QImage::Format_RGB16.
-*/
-
-/*!
- \fn void * QCustomRasterPaintDevice::memory () const
-
- Returns a pointer to the paint device's memory buffer, or 0 if no
- such buffer exists.
-*/
-
-/*!
- \fn int QCustomRasterPaintDevice::metric ( PaintDeviceMetric m ) const
- \reimp
-*/
-
-/*!
- \fn QSize QCustomRasterPaintDevice::size () const
- \internal
-*/
-
-
QClipData::QClipData(int height)
{
clipSpanHeight = height;
@@ -5144,9 +4926,6 @@ Q_GLOBAL_STATIC(QGradientCache, qt_gradient_cache)
void QSpanData::init(QRasterBuffer *rb, const QRasterPaintEngine *pe)
{
rasterBuffer = rb;
-#ifdef Q_WS_QWS
- rasterEngine = const_cast<QRasterPaintEngine *>(pe);
-#endif
type = None;
txop = 0;
bilinear = false;
@@ -5291,16 +5070,7 @@ void QSpanData::adjustSpanMethods()
unclipped_blend = rasterBuffer->drawHelper->blendGradient;
break;
case Texture:
-#ifdef Q_WS_QWS
-#ifndef QT_NO_RASTERCALLBACKS
- if (!rasterBuffer->buffer())
- unclipped_blend = qBlendTextureCallback;
- else
-#endif
- unclipped_blend = qBlendTexture;
-#else
unclipped_blend = qBlendTexture;
-#endif
if (!texture.imageData)
unclipped_blend = 0;
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index 52f51fab16..0cffabea23 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -72,7 +72,6 @@ class QOutlineMapper;
class QRasterPaintEnginePrivate;
class QRasterBuffer;
class QClipData;
-class QCustomRasterPaintDevice;
class QRasterPaintEngineState : public QPainterState
{
@@ -129,11 +128,7 @@ public:
/*******************************************************************************
* QRasterPaintEngine
*/
-class
-#ifdef Q_WS_QWS
-Q_GUI_EXPORT
-#endif
-QRasterPaintEngine : public QPaintEngineEx
+class QRasterPaintEngine : public QPaintEngineEx
{
Q_DECLARE_PRIVATE(QRasterPaintEngine)
public:
@@ -244,12 +239,6 @@ public:
QPoint coordinateOffset() const;
-#if defined(Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS)
- virtual void drawColorSpans(const QSpan *spans, int count, uint color);
- virtual void drawBufferSpan(const uint *buffer, int bufsize,
- int x, int y, int length, uint const_alpha);
-#endif
-
protected:
QRasterPaintEngine(QRasterPaintEnginePrivate &d, QPaintDevice *);
private:
@@ -296,11 +285,7 @@ private:
/*******************************************************************************
* QRasterPaintEnginePrivate
*/
-class
-#ifdef Q_WS_QWS
-Q_GUI_EXPORT
-#endif
-QRasterPaintEnginePrivate : public QPaintEngineExPrivate
+class QRasterPaintEnginePrivate : public QPaintEngineExPrivate
{
Q_DECLARE_PUBLIC(QRasterPaintEngine)
public:
@@ -333,10 +318,6 @@ public:
ProcessSpans getBrushFunc(const QRect &rect, const QSpanData *data) const;
ProcessSpans getBrushFunc(const QRectF &rect, const QSpanData *data) const;
-#ifdef Q_WS_QWS
- void prepare(QCustomRasterPaintDevice *);
-#endif
-
inline const QClipData *clip() const;
void initializeRasterizer(QSpanData *data);
@@ -384,11 +365,7 @@ public:
};
-class
-#ifdef Q_WS_QWS
-Q_GUI_EXPORT
-#endif
-QClipData {
+class QClipData {
public:
QClipData(int height);
~QClipData();
@@ -465,41 +442,10 @@ inline void QClipData::appendSpans(const QSpan *s, int num)
count += num;
}
-#ifdef Q_WS_QWS
-class Q_GUI_EXPORT QCustomRasterPaintDevice : public QPaintDevice
-{
-public:
- QCustomRasterPaintDevice(QWidget *w) : widget(w) {}
-
- int devType() const { return QInternal::CustomRaster; }
-
- virtual int metric(PaintDeviceMetric m) const;
-
- virtual void* memory() const { return 0; }
-
- virtual QImage::Format format() const {
- return QImage::Format_ARGB32_Premultiplied;
- }
-
- virtual int bytesPerLine() const;
-
- virtual QSize size() const {
- return static_cast<QRasterPaintEngine*>(paintEngine())->size();
- }
-
-private:
- QWidget *widget;
-};
-#endif // Q_WS_QWS
-
/*******************************************************************************
* QRasterBuffer
*/
-class
-#ifdef Q_WS_QWS
-Q_GUI_EXPORT
-#endif
-QRasterBuffer
+class QRasterBuffer
{
public:
QRasterBuffer() : m_width(0), m_height(0), m_buffer(0) { init(); }
@@ -510,9 +456,6 @@ public:
QImage::Format prepare(QImage *image);
QImage::Format prepare(QPixmap *pix);
-#ifdef Q_WS_QWS
- void prepare(QCustomRasterPaintDevice *device);
-#endif
void prepare(int w, int h);
void prepareBuffer(int w, int h);