summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-02-07 14:38:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-10 23:02:47 +0100
commit15f3191981908b786b93e1e0dd7d6828e2bf18f9 (patch)
treeff036b4423ea84a49a8b0849ba000d9eae2c559c /src/gui
parent2a3f6359537f0c975d9bb90bba208236bcecca8b (diff)
Fix drawing vertical gradients in RGBA8888 formats
The RGBA8888 formats was incorrectly using the qt_gradient_quint32 which is argb specific. This caused vertical gradients but only vertical gradients to be drawn incorrectly. This changes the RGBA8888 formats formats to use the generic gradient method and renames qt_gradient_quint32 to qt_gradient_argb32 to indicate its limitation. Change-Id: Ia1cd48ca7f4f78b64f31d6263e81cd8ac3b0954e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qdrawhelper.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index d3e5b645c4..c71d75cf94 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -5507,7 +5507,7 @@ inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer,
}
}
-static void qt_gradient_quint32(int count, const QSpan *spans, void *userData)
+static void qt_gradient_argb32(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
@@ -5964,7 +5964,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB32,
{
blend_color_argb,
- qt_gradient_quint32,
+ qt_gradient_argb32,
qt_bitmapblit_quint32,
qt_alphamapblit_quint32,
qt_alphargbblit_quint32,
@@ -5973,7 +5973,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB32,
{
blend_color_generic,
- qt_gradient_quint32,
+ qt_gradient_argb32,
qt_bitmapblit_quint32,
qt_alphamapblit_quint32,
qt_alphargbblit_quint32,
@@ -5982,7 +5982,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB32_Premultiplied
{
blend_color_argb,
- qt_gradient_quint32,
+ qt_gradient_argb32,
qt_bitmapblit_quint32,
qt_alphamapblit_quint32,
qt_alphargbblit_quint32,
@@ -6048,7 +6048,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBX8888
{
blend_color_generic,
- qt_gradient_quint32,
+ blend_src_generic,
qt_bitmapblit_quint32,
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
qt_alphamapblit_quint32,
@@ -6062,7 +6062,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBA8888
{
blend_color_generic,
- qt_gradient_quint32,
+ blend_src_generic,
qt_bitmapblit_quint32,
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
qt_alphamapblit_quint32,
@@ -6076,7 +6076,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB8888_Premultiplied
{
blend_color_generic,
- qt_gradient_quint32,
+ blend_src_generic,
qt_bitmapblit_quint32,
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
qt_alphamapblit_quint32,