From c3b2f89b85696c01062ddcd9d21a05cebf51b078 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Mon, 26 Jul 2010 16:26:38 +0200 Subject: Clean the CompositionFunction tables of drawhelper Some instructions sets were defining partial table of composition functions. To work around that, qInitDrawhelperAsm() was resetting the composition function of QPainter::CompositionMode_Destination and anything above QPainter::CompositionMode_Xor. This was a problem because it makes it impossible to implement fast path for those composition mode. This patch export prototypes for the generic functions of each composition mode. The specialized implementations now define a complete table. Reviewed-by: Andreas Kling --- src/gui/painting/qdrawhelper.cpp | 127 ++++++++++++++---------------- src/gui/painting/qdrawhelper_iwmmxt.cpp | 25 +++++- src/gui/painting/qdrawhelper_mmx.cpp | 23 +++++- src/gui/painting/qdrawhelper_mmx3dnow.cpp | 25 +++++- src/gui/painting/qdrawhelper_p.h | 35 ++++++++ src/gui/painting/qdrawhelper_sse.cpp | 25 +++++- src/gui/painting/qdrawhelper_sse3dnow.cpp | 25 +++++- 7 files changed, 208 insertions(+), 77 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index ca9556b..a77c379 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -1314,7 +1314,7 @@ static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint comp_func_Clear_impl(dest, length, const_alpha); } -static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha) +void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha) { comp_func_Clear_impl(dest, length, const_alpha); } @@ -1338,7 +1338,7 @@ static void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint colo } } -static void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) { ::memcpy(dest, src, length * sizeof(uint)); @@ -1356,7 +1356,7 @@ static void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint) { } -static void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint) +void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint) { } @@ -1381,7 +1381,7 @@ static void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint } } -static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1419,7 +1419,7 @@ static void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, } } -static void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1461,7 +1461,7 @@ static void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint co } } -static void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1498,7 +1498,7 @@ static void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, ui } } -static void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1540,7 +1540,7 @@ static void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint c } } -static void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1576,7 +1576,7 @@ static void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, u } } -static void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1613,7 +1613,7 @@ static void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint } } -static void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1653,7 +1653,7 @@ static void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, } } -static void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1695,7 +1695,7 @@ static void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, } } -static void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha) { PRELOAD_INIT2(dest, src) if (const_alpha == 255) { @@ -1794,7 +1794,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Plus_impl(uint *dest, const uin } } -static void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_Plus_impl(dest, src, length, QFullCoverage()); @@ -1866,7 +1866,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Multiply_impl(uint *dest, const } } -static void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_Multiply_impl(dest, src, length, QFullCoverage()); @@ -1934,7 +1934,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Screen_impl(uint *dest, const u } } -static void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_Screen_impl(dest, src, length, QFullCoverage()); @@ -2013,7 +2013,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Overlay_impl(uint *dest, const } } -static void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_Overlay_impl(dest, src, length, QFullCoverage()); @@ -2086,7 +2086,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Darken_impl(uint *dest, const u } } -static void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_Darken_impl(dest, src, length, QFullCoverage()); @@ -2159,7 +2159,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Lighten_impl(uint *dest, const } } -static void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_Lighten_impl(dest, src, length, QFullCoverage()); @@ -2242,7 +2242,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorDodge_impl(uint *dest, con } } -static void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_ColorDodge_impl(dest, src, length, QFullCoverage()); @@ -2325,7 +2325,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorBurn_impl(uint *dest, cons } } -static void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_ColorBurn_impl(dest, src, length, QFullCoverage()); @@ -2405,7 +2405,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_HardLight_impl(uint *dest, cons } } -static void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_HardLight_impl(dest, src, length, QFullCoverage()); @@ -2496,7 +2496,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_SoftLight_impl(uint *dest, cons } } -static void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_SoftLight_impl(dest, src, length, QFullCoverage()); @@ -2569,7 +2569,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Difference_impl(uint *dest, con } } -static void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_Difference_impl(dest, src, length, QFullCoverage()); @@ -2636,7 +2636,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Exclusion_impl(uint *dest, cons } } -static void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha) +void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha) { if (const_alpha == 255) comp_func_Exclusion_impl(dest, src, length, QFullCoverage()); @@ -2659,10 +2659,10 @@ static void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, *dest++ |= color; } -static void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, - const uint *src, - int length, - uint const_alpha) +void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, + const uint *src, + int length, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) @@ -2680,10 +2680,10 @@ static void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest, *dest++ &= color; } -static void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, - const uint *src, - int length, - uint const_alpha) +void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, + const uint *src, + int length, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) { @@ -2703,10 +2703,10 @@ static void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, *dest++ ^= color; } -static void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, - const uint *src, - int length, - uint const_alpha) +void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, + const uint *src, + int length, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) { @@ -2728,10 +2728,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest, } } -static void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, - const uint *src, - int length, - uint const_alpha) +void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, + const uint *src, + int length, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) { @@ -2753,10 +2753,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, } } -static void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest, - const uint *src, - int length, - uint const_alpha) +void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest, + const uint *src, + int length, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) { @@ -2778,10 +2778,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, } } -static void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, - const uint *src, - int length, - uint const_alpha) +void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, + const uint *src, + int length, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) { @@ -2797,8 +2797,8 @@ static void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, qt_memfill(dest, ~color | 0xff000000, length); } -static void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, - int length, uint const_alpha) +void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, + int length, uint const_alpha) { Q_UNUSED(const_alpha); while (length--) @@ -2818,10 +2818,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, } } -static void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, - const uint *src, - int length, - uint const_alpha) +void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, + const uint *src, + int length, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) { @@ -2842,10 +2842,10 @@ static void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, } } -static void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, - const uint *src, - int length, - uint const_alpha) +void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, + const uint *src, + int length, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) { @@ -7919,17 +7919,8 @@ void qInitDrawhelperAsm() functionForModeSolid = functionForModeSolidAsm; } - if (functionForModeAsm) { - const int destinationMode = QPainter::CompositionMode_Destination; - functionForModeAsm[destinationMode] = functionForMode_C[destinationMode]; - - // use the default qdrawhelper implementation for the - // extended composition modes - for (int mode = 12; mode < numCompositionFunctions; ++mode) - functionForModeAsm[mode] = functionForMode_C[mode]; - + if (functionForModeAsm) functionForMode = functionForModeAsm; - } qt_build_pow_tables(); } diff --git a/src/gui/painting/qdrawhelper_iwmmxt.cpp b/src/gui/painting/qdrawhelper_iwmmxt.cpp index 80b2c04..d99045d 100644 --- a/src/gui/painting/qdrawhelper_iwmmxt.cpp +++ b/src/gui/painting/qdrawhelper_iwmmxt.cpp @@ -106,14 +106,35 @@ CompositionFunction qt_functionForMode_IWMMXT[] = { comp_func_DestinationOver, comp_func_Clear, comp_func_Source, - 0, + comp_func_Destination, comp_func_SourceIn, comp_func_DestinationIn, comp_func_SourceOut, comp_func_DestinationOut, comp_func_SourceAtop, comp_func_DestinationAtop, - comp_func_XOR + comp_func_XOR, + comp_func_Plus, + comp_func_Multiply, + comp_func_Screen, + comp_func_Overlay, + comp_func_Darken, + comp_func_Lighten, + comp_func_ColorDodge, + comp_func_ColorBurn, + comp_func_HardLight, + comp_func_SoftLight, + comp_func_Difference, + comp_func_Exclusion, + rasterop_SourceOrDestination, + rasterop_SourceAndDestination, + rasterop_SourceXorDestination, + rasterop_NotSourceAndNotDestination, + rasterop_NotSourceOrNotDestination, + rasterop_NotSourceXorDestination, + rasterop_NotSource, + rasterop_NotSourceAndDestination, + rasterop_SourceAndNotDestination }; void qt_blend_color_argb_iwmmxt(int count, const QSpan *spans, void *userData) diff --git a/src/gui/painting/qdrawhelper_mmx.cpp b/src/gui/painting/qdrawhelper_mmx.cpp index d49c5a1..ba92554 100644 --- a/src/gui/painting/qdrawhelper_mmx.cpp +++ b/src/gui/painting/qdrawhelper_mmx.cpp @@ -77,7 +77,7 @@ CompositionFunction qt_functionForMode_MMX[numCompositionFunctions] = { comp_func_DestinationOver, comp_func_Clear, comp_func_Source, - 0, + comp_func_Destination, comp_func_SourceIn, comp_func_DestinationIn, comp_func_SourceOut, @@ -85,6 +85,27 @@ CompositionFunction qt_functionForMode_MMX[numCompositionFunctions] = { comp_func_SourceAtop, comp_func_DestinationAtop, comp_func_XOR, + comp_func_Plus, + comp_func_Multiply, + comp_func_Screen, + comp_func_Overlay, + comp_func_Darken, + comp_func_Lighten, + comp_func_ColorDodge, + comp_func_ColorBurn, + comp_func_HardLight, + comp_func_SoftLight, + comp_func_Difference, + comp_func_Exclusion, + rasterop_SourceOrDestination, + rasterop_SourceAndDestination, + rasterop_SourceXorDestination, + rasterop_NotSourceAndNotDestination, + rasterop_NotSourceOrNotDestination, + rasterop_NotSourceXorDestination, + rasterop_NotSource, + rasterop_NotSourceAndDestination, + rasterop_SourceAndNotDestination }; void qt_blend_color_argb_mmx(int count, const QSpan *spans, void *userData) diff --git a/src/gui/painting/qdrawhelper_mmx3dnow.cpp b/src/gui/painting/qdrawhelper_mmx3dnow.cpp index 8bffaa7..b1e81fc 100644 --- a/src/gui/painting/qdrawhelper_mmx3dnow.cpp +++ b/src/gui/painting/qdrawhelper_mmx3dnow.cpp @@ -85,14 +85,35 @@ CompositionFunction qt_functionForMode_MMX3DNOW[numCompositionFunctions] = { comp_func_DestinationOver, comp_func_Clear, comp_func_Source, - 0, + comp_func_Destination, comp_func_SourceIn, comp_func_DestinationIn, comp_func_SourceOut, comp_func_DestinationOut, comp_func_SourceAtop, comp_func_DestinationAtop, - comp_func_XOR + comp_func_XOR, + comp_func_Plus, + comp_func_Multiply, + comp_func_Screen, + comp_func_Overlay, + comp_func_Darken, + comp_func_Lighten, + comp_func_ColorDodge, + comp_func_ColorBurn, + comp_func_HardLight, + comp_func_SoftLight, + comp_func_Difference, + comp_func_Exclusion, + rasterop_SourceOrDestination, + rasterop_SourceAndDestination, + rasterop_SourceXorDestination, + rasterop_NotSourceAndNotDestination, + rasterop_NotSourceOrNotDestination, + rasterop_NotSourceXorDestination, + rasterop_NotSource, + rasterop_NotSourceAndDestination, + rasterop_SourceAndNotDestination }; void qt_blend_color_argb_mmx3dnow(int count, const QSpan *spans, void *userData) diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 97c78bb..eec6bf4 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -1945,6 +1945,41 @@ const uint qt_bayer_matrix[16][16] = { ((((argb >> 24) * alpha) >> 8) << 24) | (argb & 0x00ffffff) +// prototypes of all the composition functions +void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha); +void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint); +void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha); +void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha); + QT_END_NAMESPACE #endif // QDRAWHELPER_P_H diff --git a/src/gui/painting/qdrawhelper_sse.cpp b/src/gui/painting/qdrawhelper_sse.cpp index 58a7fdd..8b17c29 100644 --- a/src/gui/painting/qdrawhelper_sse.cpp +++ b/src/gui/painting/qdrawhelper_sse.cpp @@ -77,14 +77,35 @@ CompositionFunction qt_functionForMode_SSE[numCompositionFunctions] = { comp_func_DestinationOver, comp_func_Clear, comp_func_Source, - 0, + comp_func_Destination, comp_func_SourceIn, comp_func_DestinationIn, comp_func_SourceOut, comp_func_DestinationOut, comp_func_SourceAtop, comp_func_DestinationAtop, - comp_func_XOR + comp_func_XOR, + comp_func_Plus, + comp_func_Multiply, + comp_func_Screen, + comp_func_Overlay, + comp_func_Darken, + comp_func_Lighten, + comp_func_ColorDodge, + comp_func_ColorBurn, + comp_func_HardLight, + comp_func_SoftLight, + comp_func_Difference, + comp_func_Exclusion, + rasterop_SourceOrDestination, + rasterop_SourceAndDestination, + rasterop_SourceXorDestination, + rasterop_NotSourceAndNotDestination, + rasterop_NotSourceOrNotDestination, + rasterop_NotSourceXorDestination, + rasterop_NotSource, + rasterop_NotSourceAndDestination, + rasterop_SourceAndNotDestination }; void qt_blend_color_argb_sse(int count, const QSpan *spans, void *userData) diff --git a/src/gui/painting/qdrawhelper_sse3dnow.cpp b/src/gui/painting/qdrawhelper_sse3dnow.cpp index c58cf13..9ae0e07 100644 --- a/src/gui/painting/qdrawhelper_sse3dnow.cpp +++ b/src/gui/painting/qdrawhelper_sse3dnow.cpp @@ -85,14 +85,35 @@ CompositionFunction qt_functionForMode_SSE3DNOW[numCompositionFunctions] = { comp_func_DestinationOver, comp_func_Clear, comp_func_Source, - 0, + comp_func_Destination, comp_func_SourceIn, comp_func_DestinationIn, comp_func_SourceOut, comp_func_DestinationOut, comp_func_SourceAtop, comp_func_DestinationAtop, - comp_func_XOR + comp_func_XOR, + comp_func_Plus, + comp_func_Multiply, + comp_func_Screen, + comp_func_Overlay, + comp_func_Darken, + comp_func_Lighten, + comp_func_ColorDodge, + comp_func_ColorBurn, + comp_func_HardLight, + comp_func_SoftLight, + comp_func_Difference, + comp_func_Exclusion, + rasterop_SourceOrDestination, + rasterop_SourceAndDestination, + rasterop_SourceXorDestination, + rasterop_NotSourceAndNotDestination, + rasterop_NotSourceOrNotDestination, + rasterop_NotSourceXorDestination, + rasterop_NotSource, + rasterop_NotSourceAndDestination, + rasterop_SourceAndNotDestination }; void qt_blend_color_argb_sse3dnow(int count, const QSpan *spans, void *userData) -- cgit v0.12