Qt 4.8
Classes | Macros | Typedefs | Functions | Variables
qdrawhelper_p.h File Reference
#include "QtCore/qglobal.h"
#include "QtGui/qcolor.h"
#include "QtGui/qpainter.h"
#include "QtGui/qimage.h"
#include "private/qrasterdefs_p.h"
#include <private/qsimd_p.h>
#include <private/qmath_p.h>
#include "QtGui/qscreen_qws.h"

Go to the source code of this file.

Classes

struct  DrawHelper
 
struct  LinearGradientValues
 
struct  Operator
 
class  qabgr8888
 
class  qargb4444
 
class  qargb6666
 
class  qargb8555
 
class  qargb8565
 
class  qbgr555
 
class  qbgr565
 
struct  QConicalGradientData
 
struct  QGradientData
 
struct  QLinearGradientData
 
class  QRadialFetchSimd< Simd >
 
struct  QRadialGradientData
 
class  qrgb444
 
class  qrgb555
 
class  qrgb565
 
class  qrgb666
 
class  qrgb888
 
struct  QSolidData
 
struct  QSpanData
 
struct  QTextureData
 
class  quint18
 
class  quint24
 
class  quint32p
 
struct  RadialGradientValues
 

Macros

#define AMIX(mask)   quint32(qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))
 
#define ARGB_COMBINE_ALPHA(argb, alpha)   ((((argb >> 24) * alpha) >> 8) << 24) | (argb & 0x00ffffff)
 
#define FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP)
 
#define FETCH_RADIAL_LOOP_CLAMP_PAD   index_vec.v = Simd::v_toInt(Simd::v_min(v_max, Simd::v_max(v_min, v_index)));
 
#define FETCH_RADIAL_LOOP_CLAMP_REFLECT
 
#define FETCH_RADIAL_LOOP_CLAMP_REPEAT   index_vec.v = Simd::v_and(v_repeat_mask, Simd::v_toInt(v_index));
 
#define FETCH_RADIAL_LOOP_EPILOGUE
 
#define FETCH_RADIAL_LOOP_PROLOGUE
 
#define GRADIENT_STOPTABLE_SIZE   256
 
#define GRADIENT_STOPTABLE_SIZE_SHIFT   8
 
#define INV_PREMUL(p)
 
#define MIX(mask)   (qMin(((quint32(s)&mask) + (quint32(d)&mask)), quint32(mask)))
 
#define Q_STATIC_INLINE_FUNCTION   static inline
 
#define Q_STATIC_TEMPLATE_FUNCTION   static
 
#define Q_STATIC_TEMPLATE_SPECIALIZATION
 
#define QT_FT_BEGIN_HEADER
 
#define QT_FT_END_HEADER
 
#define QT_MEMCPY_REV_UINT(dest, src, length)
 
#define QT_MEMCPY_USHORT(dest, src, length)
 
#define QT_MEMFILL_UINT(dest, length, color)   qt_memfill<quint32>(dest, color, length);
 
#define QT_MEMFILL_USHORT(dest, length, color)   qt_memfill<quint16>(dest, color, length);
 
#define QT_RECTCONVERT_TRIVIAL_IMPL(T)
 
#define QT_TRIVIAL_MEMCONVERT_IMPL(T)
 

Typedefs

typedef void(* AlphamapBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *bitmap, int mapWidth, int mapHeight, int mapStride, const QClipData *clip)
 
typedef void(* AlphaRGBBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uint *rgbmask, int mapWidth, int mapHeight, int mapStride, const QClipData *clip)
 
typedef void(* BitmapBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *bitmap, int mapWidth, int mapHeight, int mapStride)
 
typedef void(QT_FASTCALLCompositionFunction) (uint *dest, const uint *src, int length, uint const_alpha)
 
typedef void(QT_FASTCALLCompositionFunctionSolid) (uint *dest, int length, uint color, uint const_alpha)
 
typedef uint *QT_FASTCALLDestFetchProc(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
 
typedef void(QT_FASTCALLDestStoreProc) (QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
 
typedef void(* MemRotateFunc) (const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
 
typedef QT_FT_SpanFunc ProcessSpans
 
typedef QT_FT_Span QSpan
 
typedef void(* RectFillFunc) (QRasterBuffer *rasterBuffer, int x, int y, int width, int height, quint32 color)
 
typedef const uint *(QT_FASTCALLSourceFetchProc) (uint *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)
 
typedef void(* SrcOverBlendFunc) (uchar *destPixels, int dbpl, const uchar *src, int spbl, int w, int h, int const_alpha)
 
typedef void(* SrcOverScaleFunc) (uchar *destPixels, int dbpl, const uchar *src, int spbl, int srch, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clipRect, int const_alpha)
 
typedef void(* SrcOverTransformFunc) (uchar *destPixels, int dbpl, const uchar *src, int spbl, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clipRect, const QTransform &targetRectTransform, int const_alpha)
 

Functions

Q_STATIC_INLINE_FUNCTION uint BYTE_MUL (uint x, uint a)
 
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16 (uint x, uint a)
 
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16_32 (uint x, uint a)
 
void QT_FASTCALL comp_func_Clear (uint *dest, const uint *, 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_ColorDodge (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_Destination (uint *, const uint *, int, uint)
 
void QT_FASTCALL comp_func_DestinationAtop (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_DestinationOut (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_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 comp_func_HardLight (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_Multiply (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_Plus (uint *dest, const uint *src, int length, uint const_alpha)
 
int comp_func_Plus_one_pixel (uint d, const uint s)
 
int comp_func_Plus_one_pixel_const_alpha (uint d, const uint s, const uint const_alpha, const uint one_minus_const_alpha)
 
void QT_FASTCALL comp_func_Screen (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_solid_Clear (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_ColorBurn (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_ColorDodge (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Darken (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Destination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_DestinationAtop (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_DestinationIn (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_DestinationOut (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_DestinationOver (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Difference (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Exclusion (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_HardLight (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Lighten (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Multiply (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Overlay (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Plus (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Screen (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_SoftLight (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_Source (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_SourceAtop (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_SourceIn (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_SourceOut (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_SourceOver (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_solid_XOR (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL comp_func_Source (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_SourceIn (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_SourceOver (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)
 
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255 (uint x, uint a, uint y, uint b)
 
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256 (uint x, uint a, uint y, uint b)
 
Q_STATIC_INLINE_FUNCTION uint PREMUL (uint x)
 
void qBlendTexture (int count, const QSpan *spans, void *userData)
 
void qBlendTextureCallback (int count, const QSpan *spans, void *userData)
 
int qBlue565 (quint16 rgb)
 
QRgb qConvertRgb16To32 (uint c)
 
ushort qConvertRgb32To16 (uint c)
 
quint32 qConvertRgb32To16x2 (quint64 c)
 
int qGreen565 (quint16 rgb)
 
void qInitDrawhelperAsm ()
 
static qreal qRadialDeterminant (qreal a, qreal b, qreal c)
 
int qRed565 (quint16 rgb)
 
template<class DST , class SRC >
DST qt_colorConvert (SRC color, DST dummy)
 
template<>
quint32 qt_colorConvert (quint16 color, quint32 dummy)
 
template<>
quint16 qt_colorConvert (quint32 color, quint16 dummy)
 
template<>
qrgb888 qt_colorConvert (quint32 color, qrgb888 dummy)
 
template<>
quint32 qt_colorConvert (qrgb888 color, quint32 dummy)
 
template<>
quint24 qt_colorConvert (quint32 color, quint24 dummy)
 
template<>
quint18 qt_colorConvert (quint32 color, quint18 dummy)
 
Q_STATIC_INLINE_FUNCTION int qt_div_255 (int x)
 
template<class RadialFetchFunc >
const uint *QT_FASTCALL qt_fetch_radial_gradient_template (uint *buffer, const Operator *op, const QSpanData *data, int y, int x, int length)
 
static uint qt_gradient_clamp (const QGradientData *data, int ipos)
 
static uint qt_gradient_pixel (const QGradientData *data, qreal pos)
 
template<class DST , class SRC >
void qt_memconvert (DST *dest, const SRC *src, int count)
 
template<>
void qt_memconvert (qrgb666 *dest, const quint32 *src, int count)
 
template<class T >
void qt_memfill (T *dest, T value, int count)
 
template<>
void qt_memfill (quint32 *dest, quint32 color, int count)
 
template<>
void qt_memfill (quint16 *dest, quint16 color, int count)
 
template<>
void qt_memfill (quint8 *dest, quint8 color, int count)
 
template<class DST , class SRC >
void qt_rectconvert (DST *dest, const SRC *src, int x, int y, int width, int height, int dstStride, int srcStride)
 
template<class T >
void qt_rectcopy (T *dest, const T *src, int x, int y, int width, int height, int dstStride, int srcStride)
 
template<class T >
void qt_rectfill (T *dest, T value, int x, int y, int width, int height, int stride)
 
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_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_solid_NotSource (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_solid_NotSourceAndDestination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_solid_NotSourceXorDestination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_solid_SourceAndDestination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_solid_SourceAndNotDestination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_solid_SourceOrDestination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_solid_SourceXorDestination (uint *dest, int length, uint color, uint const_alpha)
 
void QT_FASTCALL rasterop_SourceAndDestination (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)
 
void QT_FASTCALL rasterop_SourceOrDestination (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)
 

Variables

static const uint AMASK = 0xff000000
 
static const uint BMASK = 0x000000ff
 
static const uint GMASK = 0x0000ff00
 
class quint32p Q_PACKED
 
SrcOverBlendFunc qBlendFunctions [QImage::NImageFormats][QImage::NImageFormats]
 
DrawHelper qDrawHelper [QImage::NImageFormats]
 
DrawHelper qDrawHelperCallback [QImage::NImageFormats]
 
MemRotateFunc qMemRotateFunctions [QImage::NImageFormats][3]
 
SrcOverScaleFunc qScaleFunctions [QImage::NImageFormats][QImage::NImageFormats]
 
const uint qt_bayer_matrix [16][16]
 
SrcOverTransformFunc qTransformFunctions [QImage::NImageFormats][QImage::NImageFormats]
 
static const uint RMASK = 0x00ff0000
 

Macro Definition Documentation

◆ AMIX

#define AMIX (   mask)    quint32(qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))

◆ ARGB_COMBINE_ALPHA

#define ARGB_COMBINE_ALPHA (   argb,
  alpha 
)    ((((argb >> 24) * alpha) >> 8) << 24) | (argb & 0x00ffffff)

◆ FETCH_RADIAL_LOOP

#define FETCH_RADIAL_LOOP (   FETCH_RADIAL_LOOP_CLAMP)
Value:
FETCH_RADIAL_LOOP_PROLOGUE \
FETCH_RADIAL_LOOP_CLAMP \
FETCH_RADIAL_LOOP_EPILOGUE

Referenced by QRadialFetchSimd< Simd >::fetch().

◆ FETCH_RADIAL_LOOP_CLAMP_PAD

#define FETCH_RADIAL_LOOP_CLAMP_PAD   index_vec.v = Simd::v_toInt(Simd::v_min(v_max, Simd::v_max(v_min, v_index)));

◆ FETCH_RADIAL_LOOP_CLAMP_REFLECT

#define FETCH_RADIAL_LOOP_CLAMP_REFLECT
Value:
const typename Simd::Int32x4 v_index_i = Simd::v_and(v_reflect_mask, Simd::v_toInt(v_index)); \
const typename Simd::Int32x4 v_index_i_inv = Simd::v_sub(v_reflect_limit, v_index_i); \
index_vec.v = Simd::v_min_16(v_index_i, v_index_i_inv);

Referenced by QRadialFetchSimd< Simd >::fetch().

◆ FETCH_RADIAL_LOOP_CLAMP_REPEAT

#define FETCH_RADIAL_LOOP_CLAMP_REPEAT   index_vec.v = Simd::v_and(v_repeat_mask, Simd::v_toInt(v_index));

◆ FETCH_RADIAL_LOOP_EPILOGUE

#define FETCH_RADIAL_LOOP_EPILOGUE
Value:
det_vec.v = Simd::v_add(Simd::v_add(det_vec.v, delta_det4_vec.v), v_delta_delta_det6); \
delta_det4_vec.v = Simd::v_add(delta_det4_vec.v, v_delta_delta_det16); \
b_vec.v = Simd::v_add(b_vec.v, v_delta_b4); \
for (int i = 0; i < 4; ++i) \
*buffer++ = (extended_mask | v_buffer_mask.i[i]) & data->gradient.colorTable[index_vec.i[i]]; \
}
static const char * data(const QByteArray &arr)

◆ FETCH_RADIAL_LOOP_PROLOGUE

#define FETCH_RADIAL_LOOP_PROLOGUE
Value:
while (buffer < end) { \
typename Simd::Vect_buffer_i v_buffer_mask; \
v_buffer_mask.v = Simd::v_greaterOrEqual(det_vec.v, v_min); \
const typename Simd::Float32x4 v_index_local = Simd::v_sub(Simd::v_sqrt(Simd::v_max(v_min, det_vec.v)), b_vec.v); \
const typename Simd::Float32x4 v_index = Simd::v_add(Simd::v_mul(v_index_local, v_max), v_half); \
v_buffer_mask.v = Simd::v_and(v_buffer_mask.v, Simd::v_greaterOrEqual(Simd::v_add(v_r0, Simd::v_mul(v_dr, v_index_local)), v_min)); \
typename Simd::Vect_buffer_i index_vec;
static const KeyPair *const end

◆ GRADIENT_STOPTABLE_SIZE

#define GRADIENT_STOPTABLE_SIZE   256

◆ GRADIENT_STOPTABLE_SIZE_SHIFT

#define GRADIENT_STOPTABLE_SIZE_SHIFT   8

Definition at line 276 of file qdrawhelper_p.h.

Referenced by QRadialFetchSimd< Simd >::fetch().

◆ INV_PREMUL

#define INV_PREMUL (   p)
Value:
(qAlpha(p) == 0 ? 0 : \
((qAlpha(p) << 24) \
| (((255*qRed(p))/ qAlpha(p)) << 16) \
| (((255*qGreen(p)) / qAlpha(p)) << 8) \
| ((255*qBlue(p)) / qAlpha(p))))
int qRed(QRgb rgb)
Returns the red component of the ARGB quadruplet rgb.
Definition: qrgb.h:57
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
int qGreen(QRgb rgb)
Returns the green component of the ARGB quadruplet rgb.
Definition: qrgb.h:60
int qBlue(QRgb rgb)
Returns the blue component of the ARGB quadruplet rgb.
Definition: qrgb.h:63

Definition at line 669 of file qdrawhelper_p.h.

Referenced by convert_ARGB_PM_to_ARGB(), convert_ARGB_PM_to_RGB(), qt_rectfill_nonpremul_quint32(), and QSvgPaintEngine::saveGradientStops().

◆ MIX

#define MIX (   mask)    (qMin(((quint32(s)&mask) + (quint32(d)&mask)), quint32(mask)))

◆ Q_STATIC_INLINE_FUNCTION

#define Q_STATIC_INLINE_FUNCTION   static inline

Definition at line 86 of file qdrawhelper_p.h.

Referenced by INTERPOLATE_PIXEL_255().

◆ Q_STATIC_TEMPLATE_FUNCTION

#define Q_STATIC_TEMPLATE_FUNCTION   static

◆ Q_STATIC_TEMPLATE_SPECIALIZATION

#define Q_STATIC_TEMPLATE_SPECIALIZATION

◆ QT_FT_BEGIN_HEADER

#define QT_FT_BEGIN_HEADER

Definition at line 61 of file qdrawhelper_p.h.

◆ QT_FT_END_HEADER

#define QT_FT_END_HEADER

Definition at line 62 of file qdrawhelper_p.h.

◆ QT_MEMCPY_REV_UINT

#define QT_MEMCPY_REV_UINT (   dest,
  src,
  length 
)
Value:
do { \
/* Duff's device */ \
uint *_d = (uint*)(dest) + length; \
const uint *_s = (uint*)(src) + length; \
register int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
case 0: do { *--_d = *--_s; \
case 7: *--_d = *--_s; \
case 6: *--_d = *--_s; \
case 5: *--_d = *--_s; \
case 4: *--_d = *--_s; \
case 3: *--_d = *--_s; \
case 2: *--_d = *--_s; \
case 1: *--_d = *--_s; \
} while (--n > 0); \
} \
} while (0)
unsigned int uint
Definition: qglobal.h:996

Definition at line 2063 of file qdrawhelper_p.h.

◆ QT_MEMCPY_USHORT

#define QT_MEMCPY_USHORT (   dest,
  src,
  length 
)
Value:
do { \
/* Duff's device */ \
ushort *_d = (ushort*)(dest); \
const ushort *_s = (ushort*)(src); \
register int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
case 0: do { *_d++ = *_s++; \
case 7: *_d++ = *_s++; \
case 6: *_d++ = *_s++; \
case 5: *_d++ = *_s++; \
case 4: *_d++ = *_s++; \
case 3: *_d++ = *_s++; \
case 2: *_d++ = *_s++; \
case 1: *_d++ = *_s++; \
} while (--n > 0); \
} \
} while (0)
unsigned short ushort
Definition: qglobal.h:995

Definition at line 2083 of file qdrawhelper_p.h.

Referenced by qt_blend_rgb16_on_rgb16().

◆ QT_MEMFILL_UINT

#define QT_MEMFILL_UINT (   dest,
  length,
  color 
)    qt_memfill<quint32>(dest, color, length);

◆ QT_MEMFILL_USHORT

#define QT_MEMFILL_USHORT (   dest,
  length,
  color 
)    qt_memfill<quint16>(dest, color, length);

Definition at line 2060 of file qdrawhelper_p.h.

Referenced by blend_color_rgb16().

◆ QT_RECTCONVERT_TRIVIAL_IMPL

#define QT_RECTCONVERT_TRIVIAL_IMPL (   T)
Value:
template <> \
inline void qt_rectconvert(T *dest, const T *src, \
int x, int y, int width, int height, \
int dstStride, int srcStride) \
{ \
qt_rectcopy(dest, src, x, y, width, height, dstStride, srcStride); \
}
void qt_rectconvert(DST *dest, const SRC *src, int x, int y, int width, int height, int dstStride, int srcStride)

Definition at line 2026 of file qdrawhelper_p.h.

◆ QT_TRIVIAL_MEMCONVERT_IMPL

#define QT_TRIVIAL_MEMCONVERT_IMPL (   T)
Value:
template <> \
inline void qt_memconvert(T *dest, const T *src, int count) \
{ \
memcpy(dest, src, count * sizeof(T)); \
}
void qt_memconvert(DST *dest, const SRC *src, int count)

Definition at line 1930 of file qdrawhelper_p.h.

Typedef Documentation

◆ AlphamapBlitFunc

typedef void(* AlphamapBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *bitmap, int mapWidth, int mapHeight, int mapStride, const QClipData *clip)

Definition at line 119 of file qdrawhelper_p.h.

◆ AlphaRGBBlitFunc

typedef void(* AlphaRGBBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uint *rgbmask, int mapWidth, int mapHeight, int mapStride, const QClipData *clip)

Definition at line 125 of file qdrawhelper_p.h.

◆ BitmapBlitFunc

typedef void(* BitmapBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *bitmap, int mapWidth, int mapHeight, int mapStride)

Definition at line 114 of file qdrawhelper_p.h.

◆ CompositionFunction

typedef void(QT_FASTCALL * CompositionFunction) (uint *dest, const uint *src, int length, uint const_alpha)

Definition at line 179 of file qdrawhelper_p.h.

◆ CompositionFunctionSolid

typedef void(QT_FASTCALL * CompositionFunctionSolid) (uint *dest, int length, uint color, uint const_alpha)

Definition at line 180 of file qdrawhelper_p.h.

◆ DestFetchProc

typedef uint* QT_FASTCALL* DestFetchProc(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)

Definition at line 202 of file qdrawhelper_p.h.

◆ DestStoreProc

typedef void(QT_FASTCALL * DestStoreProc) (QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)

Definition at line 203 of file qdrawhelper_p.h.

◆ MemRotateFunc

typedef void(* MemRotateFunc) (const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)

Definition at line 155 of file qdrawhelper_p.h.

◆ ProcessSpans

Definition at line 111 of file qdrawhelper_p.h.

◆ QSpan

typedef QT_FT_Span QSpan
related

Definition at line 99 of file qdrawhelper_p.h.

◆ RectFillFunc

typedef void(* RectFillFunc) (QRasterBuffer *rasterBuffer, int x, int y, int width, int height, quint32 color)

Definition at line 131 of file qdrawhelper_p.h.

◆ SourceFetchProc

typedef const uint*(QT_FASTCALL * SourceFetchProc) (uint *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)

Definition at line 204 of file qdrawhelper_p.h.

◆ SrcOverBlendFunc

typedef void(* SrcOverBlendFunc) (uchar *destPixels, int dbpl, const uchar *src, int spbl, int w, int h, int const_alpha)

Definition at line 135 of file qdrawhelper_p.h.

◆ SrcOverScaleFunc

typedef void(* SrcOverScaleFunc) (uchar *destPixels, int dbpl, const uchar *src, int spbl, int srch, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clipRect, int const_alpha)

Definition at line 140 of file qdrawhelper_p.h.

◆ SrcOverTransformFunc

typedef void(* SrcOverTransformFunc) (uchar *destPixels, int dbpl, const uchar *src, int spbl, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clipRect, const QTransform &targetRectTransform, int const_alpha)

Definition at line 147 of file qdrawhelper_p.h.

Function Documentation

◆ BYTE_MUL()

Q_STATIC_INLINE_FUNCTION uint BYTE_MUL ( uint  x,
uint  a 
)

◆ BYTE_MUL_RGB16()

Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16 ( uint  x,
uint  a 
)

Definition at line 656 of file qdrawhelper_p.h.

Referenced by blend_color_rgb16(), qt_alphamapblit_quint16(), qt_blend_argb32_on_rgb16_const_alpha(), qt_blend_rgb16_on_rgb16(), Blend_RGB16_on_RGB16_ConstAlpha::write(), Blend_ARGB24_on_RGB16_SourceAlpha::write(), Blend_ARGB24_on_RGB16_SourceAndConstAlpha::write(), Blend_ARGB32_on_RGB16_SourceAlpha::write(), and Blend_ARGB32_on_RGB16_SourceAndConstAlpha::write().

656  {
657  a += 1;
658  uint t = (((x & 0x07e0)*a) >> 8) & 0x07e0;
659  t |= (((x & 0xf81f)*(a>>2)) >> 6) & 0xf81f;
660  return t;
661 }
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned int uint
Definition: qglobal.h:996

◆ BYTE_MUL_RGB16_32()

Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16_32 ( uint  x,
uint  a 
)

Definition at line 663 of file qdrawhelper_p.h.

Referenced by blend_color_rgb16().

663  {
664  uint t = (((x & 0xf81f07e0) >> 5)*a) & 0xf81f07e0;
665  t |= (((x & 0x07e0f81f)*a) >> 5) & 0x07e0f81f;
666  return t;
667 }
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned int uint
Definition: qglobal.h:996

◆ comp_func_Clear()

void QT_FASTCALL comp_func_Clear ( uint dest,
const uint ,
int  length,
uint  const_alpha 
)

Definition at line 1580 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1581 {
1582  comp_func_Clear_impl(dest, length, const_alpha);
1583 }
#define comp_func_Clear_impl(dest, length, const_alpha)

◆ comp_func_ColorBurn()

void QT_FASTCALL comp_func_ColorBurn ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2582 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2583 {
2584  if (const_alpha == 255)
2585  comp_func_ColorBurn_impl(dest, src, length, QFullCoverage());
2586  else
2587  comp_func_ColorBurn_impl(dest, src, length, QPartialCoverage(const_alpha));
2588 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_ColorBurn_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_ColorDodge()

void QT_FASTCALL comp_func_ColorDodge ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2499 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2500 {
2501  if (const_alpha == 255)
2502  comp_func_ColorDodge_impl(dest, src, length, QFullCoverage());
2503  else
2504  comp_func_ColorDodge_impl(dest, src, length, QPartialCoverage(const_alpha));
2505 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_ColorDodge_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_Darken()

void QT_FASTCALL comp_func_Darken ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2343 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2344 {
2345  if (const_alpha == 255)
2346  comp_func_Darken_impl(dest, src, length, QFullCoverage());
2347  else
2348  comp_func_Darken_impl(dest, src, length, QPartialCoverage(const_alpha));
2349 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Darken_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_Destination()

void QT_FASTCALL comp_func_Destination ( uint ,
const uint ,
int  ,
uint   
)

Definition at line 1622 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1623 {
1624 }

◆ comp_func_DestinationAtop()

void QT_FASTCALL comp_func_DestinationAtop ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1919 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1920 {
1921  PRELOAD_INIT2(dest, src)
1922  if (const_alpha == 255) {
1923  for (int i = 0; i < length; ++i) {
1924  PRELOAD_COND2(dest, src)
1925  uint s = src[i];
1926  uint d = dest[i];
1927  dest[i] = INTERPOLATE_PIXEL_255(d, qAlpha(s), s, qAlpha(~d));
1928  }
1929  } else {
1930  int cia = 255 - const_alpha;
1931  for (int i = 0; i < length; ++i) {
1932  PRELOAD_COND2(dest, src)
1933  uint s = BYTE_MUL(src[i], const_alpha);
1934  uint d = dest[i];
1935  uint a = qAlpha(s) + cia;
1936  dest[i] = INTERPOLATE_PIXEL_255(d, a, s, qAlpha(~d));
1937  }
1938  }
1939 }
double d
Definition: qnumeric_p.h:62
long ASN1_INTEGER_get ASN1_INTEGER * a
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_DestinationIn()

void QT_FASTCALL comp_func_DestinationIn ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1764 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1765 {
1766  PRELOAD_INIT2(dest, src)
1767  if (const_alpha == 255) {
1768  for (int i = 0; i < length; ++i) {
1769  PRELOAD_COND2(dest, src)
1770  dest[i] = BYTE_MUL(dest[i], qAlpha(src[i]));
1771  }
1772  } else {
1773  int cia = 255 - const_alpha;
1774  for (int i = 0; i < length; ++i) {
1775  PRELOAD_COND2(dest, src)
1776  uint a = BYTE_MUL(qAlpha(src[i]), const_alpha) + cia;
1777  dest[i] = BYTE_MUL(dest[i], a);
1778  }
1779  }
1780 }
long ASN1_INTEGER_get ASN1_INTEGER * a
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_DestinationOut()

void QT_FASTCALL comp_func_DestinationOut ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1842 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1843 {
1844  PRELOAD_INIT2(dest, src)
1845  if (const_alpha == 255) {
1846  for (int i = 0; i < length; ++i) {
1847  PRELOAD_COND2(dest, src)
1848  dest[i] = BYTE_MUL(dest[i], qAlpha(~src[i]));
1849  }
1850  } else {
1851  int cia = 255 - const_alpha;
1852  for (int i = 0; i < length; ++i) {
1853  PRELOAD_COND2(dest, src)
1854  uint sia = BYTE_MUL(qAlpha(~src[i]), const_alpha) + cia;
1855  dest[i] = BYTE_MUL(dest[i], sia);
1856  }
1857  }
1858 }
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_DestinationOver()

void QT_FASTCALL comp_func_DestinationOver ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1685 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1686 {
1687  PRELOAD_INIT2(dest, src)
1688  if (const_alpha == 255) {
1689  for (int i = 0; i < length; ++i) {
1690  PRELOAD_COND2(dest, src)
1691  uint d = dest[i];
1692  dest[i] = d + BYTE_MUL(src[i], qAlpha(~d));
1693  }
1694  } else {
1695  for (int i = 0; i < length; ++i) {
1696  PRELOAD_COND2(dest, src)
1697  uint d = dest[i];
1698  uint s = BYTE_MUL(src[i], const_alpha);
1699  dest[i] = d + BYTE_MUL(s, qAlpha(~d));
1700  }
1701  }
1702 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_Difference()

void QT_FASTCALL comp_func_Difference ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2826 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2827 {
2828  if (const_alpha == 255)
2829  comp_func_Difference_impl(dest, src, length, QFullCoverage());
2830  else
2831  comp_func_Difference_impl(dest, src, length, QPartialCoverage(const_alpha));
2832 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Difference_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_Exclusion()

void QT_FASTCALL comp_func_Exclusion ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2893 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2894 {
2895  if (const_alpha == 255)
2896  comp_func_Exclusion_impl(dest, src, length, QFullCoverage());
2897  else
2898  comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha));
2899 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Exclusion_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_HardLight()

void QT_FASTCALL comp_func_HardLight ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2662 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2663 {
2664  if (const_alpha == 255)
2665  comp_func_HardLight_impl(dest, src, length, QFullCoverage());
2666  else
2667  comp_func_HardLight_impl(dest, src, length, QPartialCoverage(const_alpha));
2668 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_HardLight_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_Lighten()

void QT_FASTCALL comp_func_Lighten ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2416 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2417 {
2418  if (const_alpha == 255)
2419  comp_func_Lighten_impl(dest, src, length, QFullCoverage());
2420  else
2421  comp_func_Lighten_impl(dest, src, length, QPartialCoverage(const_alpha));
2422 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Lighten_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_Multiply()

void QT_FASTCALL comp_func_Multiply ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2123 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2124 {
2125  if (const_alpha == 255)
2126  comp_func_Multiply_impl(dest, src, length, QFullCoverage());
2127  else
2128  comp_func_Multiply_impl(dest, src, length, QPartialCoverage(const_alpha));
2129 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Multiply_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_Overlay()

void QT_FASTCALL comp_func_Overlay ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2270 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2271 {
2272  if (const_alpha == 255)
2273  comp_func_Overlay_impl(dest, src, length, QFullCoverage());
2274  else
2275  comp_func_Overlay_impl(dest, src, length, QPartialCoverage(const_alpha));
2276 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Overlay_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_Plus()

void QT_FASTCALL comp_func_Plus ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2051 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2052 {
2053  if (const_alpha == 255)
2054  comp_func_Plus_impl(dest, src, length, QFullCoverage());
2055  else
2056  comp_func_Plus_impl(dest, src, length, QPartialCoverage(const_alpha));
2057 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Plus_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_Plus_one_pixel()

int comp_func_Plus_one_pixel ( uint  d,
const uint  s 
)
inline

Definition at line 2206 of file qdrawhelper_p.h.

Referenced by comp_func_Plus_impl(), and comp_func_solid_Plus_impl().

2207 {
2208  const int result = (AMIX(AMASK) | MIX(RMASK) | MIX(GMASK) | MIX(BMASK));
2209  return result;
2210 }
static const uint AMASK
Definition: qdrawhelper_p.h:89
#define MIX(mask)
static const uint GMASK
Definition: qdrawhelper_p.h:91
static const uint RMASK
Definition: qdrawhelper_p.h:90
static const uint BMASK
Definition: qdrawhelper_p.h:92
#define AMIX(mask)

◆ comp_func_Plus_one_pixel_const_alpha()

int comp_func_Plus_one_pixel_const_alpha ( uint  d,
const uint  s,
const uint  const_alpha,
const uint  one_minus_const_alpha 
)
inline

Definition at line 2200 of file qdrawhelper_p.h.

2201 {
2202  const int result = (AMIX(AMASK) | MIX(RMASK) | MIX(GMASK) | MIX(BMASK));
2203  return INTERPOLATE_PIXEL_255(result, const_alpha, d, one_minus_const_alpha);
2204 }
double d
Definition: qnumeric_p.h:62
static const uint AMASK
Definition: qdrawhelper_p.h:89
#define MIX(mask)
static const uint GMASK
Definition: qdrawhelper_p.h:91
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
static const uint RMASK
Definition: qdrawhelper_p.h:90
static const uint BMASK
Definition: qdrawhelper_p.h:92
#define AMIX(mask)

◆ comp_func_Screen()

void QT_FASTCALL comp_func_Screen ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2191 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2192 {
2193  if (const_alpha == 255)
2194  comp_func_Screen_impl(dest, src, length, QFullCoverage());
2195  else
2196  comp_func_Screen_impl(dest, src, length, QPartialCoverage(const_alpha));
2197 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Screen_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_SoftLight()

void QT_FASTCALL comp_func_SoftLight ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2753 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2754 {
2755  if (const_alpha == 255)
2756  comp_func_SoftLight_impl(dest, src, length, QFullCoverage());
2757  else
2758  comp_func_SoftLight_impl(dest, src, length, QPartialCoverage(const_alpha));
2759 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_SoftLight_impl(uint *dest, const uint *src, int length, const T &coverage)

◆ comp_func_solid_Clear()

void QT_FASTCALL comp_func_solid_Clear ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1575 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1576 {
1577  comp_func_Clear_impl(dest, length, const_alpha);
1578 }
#define comp_func_Clear_impl(dest, length, const_alpha)

◆ comp_func_solid_ColorBurn()

void QT_FASTCALL comp_func_solid_ColorBurn ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2551 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2552 {
2553  if (const_alpha == 255)
2554  comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage());
2555  else
2556  comp_func_solid_ColorBurn_impl(dest, length, color, QPartialCoverage(const_alpha));
2557 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_ColorBurn_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_ColorDodge()

void QT_FASTCALL comp_func_solid_ColorDodge ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2468 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2469 {
2470  if (const_alpha == 255)
2471  comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage());
2472  else
2473  comp_func_solid_ColorDodge_impl(dest, length, color, QPartialCoverage(const_alpha));
2474 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_ColorDodge_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Darken()

void QT_FASTCALL comp_func_solid_Darken ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2312 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2313 {
2314  if (const_alpha == 255)
2315  comp_func_solid_Darken_impl(dest, length, color, QFullCoverage());
2316  else
2317  comp_func_solid_Darken_impl(dest, length, color, QPartialCoverage(const_alpha));
2318 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Darken_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Destination()

void QT_FASTCALL comp_func_solid_Destination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1618 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1619 {
1620 }

◆ comp_func_solid_DestinationAtop()

void QT_FASTCALL comp_func_solid_DestinationAtop ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1904 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1905 {
1906  uint a = qAlpha(color);
1907  if (const_alpha != 255) {
1908  color = BYTE_MUL(color, const_alpha);
1909  a = qAlpha(color) + 255 - const_alpha;
1910  }
1911  PRELOAD_INIT(dest)
1912  for (int i = 0; i < length; ++i) {
1913  PRELOAD_COND(dest)
1914  uint d = dest[i];
1915  dest[i] = INTERPOLATE_PIXEL_255(d, a, color, qAlpha(~d));
1916  }
1917 }
double d
Definition: qnumeric_p.h:62
long ASN1_INTEGER_get ASN1_INTEGER * a
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_DestinationIn()

void QT_FASTCALL comp_func_solid_DestinationIn ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1751 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1752 {
1753  uint a = qAlpha(color);
1754  if (const_alpha != 255) {
1755  a = BYTE_MUL(a, const_alpha) + 255 - const_alpha;
1756  }
1757  PRELOAD_INIT(dest)
1758  for (int i = 0; i < length; ++i) {
1759  PRELOAD_COND(dest)
1760  dest[i] = BYTE_MUL(dest[i], a);
1761  }
1762 }
long ASN1_INTEGER_get ASN1_INTEGER * a
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_DestinationOut()

void QT_FASTCALL comp_func_solid_DestinationOut ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1830 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1831 {
1832  uint a = qAlpha(~color);
1833  if (const_alpha != 255)
1834  a = BYTE_MUL(a, const_alpha) + 255 - const_alpha;
1835  PRELOAD_INIT(dest)
1836  for (int i = 0; i < length; ++i) {
1837  PRELOAD_COND(dest)
1838  dest[i] = BYTE_MUL(dest[i], a);
1839  }
1840 }
long ASN1_INTEGER_get ASN1_INTEGER * a
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_DestinationOver()

void QT_FASTCALL comp_func_solid_DestinationOver ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1673 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1674 {
1675  if (const_alpha != 255)
1676  color = BYTE_MUL(color, const_alpha);
1677  PRELOAD_INIT(dest)
1678  for (int i = 0; i < length; ++i) {
1679  PRELOAD_COND(dest)
1680  uint d = dest[i];
1681  dest[i] = d + BYTE_MUL(color, qAlpha(~d));
1682  }
1683 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_Difference()

void QT_FASTCALL comp_func_solid_Difference ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2795 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2796 {
2797  if (const_alpha == 255)
2798  comp_func_solid_Difference_impl(dest, length, color, QFullCoverage());
2799  else
2800  comp_func_solid_Difference_impl(dest, length, color, QPartialCoverage(const_alpha));
2801 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Difference_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Exclusion()

void QT_FASTCALL comp_func_solid_Exclusion ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2862 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2863 {
2864  if (const_alpha == 255)
2865  comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage());
2866  else
2867  comp_func_solid_Exclusion_impl(dest, length, color, QPartialCoverage(const_alpha));
2868 }
Q_STATIC_TEMPLATE_FUNCTION void QT_FASTCALL comp_func_solid_Exclusion_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_HardLight()

void QT_FASTCALL comp_func_solid_HardLight ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2631 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2632 {
2633  if (const_alpha == 255)
2634  comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage());
2635  else
2636  comp_func_solid_HardLight_impl(dest, length, color, QPartialCoverage(const_alpha));
2637 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_HardLight_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Lighten()

void QT_FASTCALL comp_func_solid_Lighten ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2385 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2386 {
2387  if (const_alpha == 255)
2388  comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage());
2389  else
2390  comp_func_solid_Lighten_impl(dest, length, color, QPartialCoverage(const_alpha));
2391 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Lighten_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Multiply()

void QT_FASTCALL comp_func_solid_Multiply ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2092 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2093 {
2094  if (const_alpha == 255)
2095  comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage());
2096  else
2097  comp_func_solid_Multiply_impl(dest, length, color, QPartialCoverage(const_alpha));
2098 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Multiply_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Overlay()

void QT_FASTCALL comp_func_solid_Overlay ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2239 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2240 {
2241  if (const_alpha == 255)
2242  comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage());
2243  else
2244  comp_func_solid_Overlay_impl(dest, length, color, QPartialCoverage(const_alpha));
2245 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Overlay_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Plus()

void QT_FASTCALL comp_func_solid_Plus ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2028 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2029 {
2030  if (const_alpha == 255)
2031  comp_func_solid_Plus_impl(dest, length, color, QFullCoverage());
2032  else
2033  comp_func_solid_Plus_impl(dest, length, color, QPartialCoverage(const_alpha));
2034 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Plus_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Screen()

void QT_FASTCALL comp_func_solid_Screen ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2160 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2161 {
2162  if (const_alpha == 255)
2163  comp_func_solid_Screen_impl(dest, length, color, QFullCoverage());
2164  else
2165  comp_func_solid_Screen_impl(dest, length, color, QPartialCoverage(const_alpha));
2166 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Screen_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_SoftLight()

void QT_FASTCALL comp_func_solid_SoftLight ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2722 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2723 {
2724  if (const_alpha == 255)
2725  comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage());
2726  else
2727  comp_func_solid_SoftLight_impl(dest, length, color, QPartialCoverage(const_alpha));
2728 }
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_SoftLight_impl(uint *dest, int length, uint color, const T &coverage)

◆ comp_func_solid_Source()

void QT_FASTCALL comp_func_solid_Source ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1589 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1590 {
1591  if (const_alpha == 255) {
1592  QT_MEMFILL_UINT(dest, length, color);
1593  } else {
1594  int ialpha = 255 - const_alpha;
1595  color = BYTE_MUL(color, const_alpha);
1596  PRELOAD_INIT(dest)
1597  for (int i = 0; i < length; ++i) {
1598  PRELOAD_COND(dest)
1599  dest[i] = color + BYTE_MUL(dest[i], ialpha);
1600  }
1601  }
1602 }
#define QT_MEMFILL_UINT(dest, length, color)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_SourceAtop()

void QT_FASTCALL comp_func_solid_SourceAtop ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1866 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1867 {
1868  if (const_alpha != 255) {
1869  color = BYTE_MUL(color, const_alpha);
1870  }
1871  uint sia = qAlpha(~color);
1872  PRELOAD_INIT(dest)
1873  for (int i = 0; i < length; ++i) {
1874  PRELOAD_COND(dest)
1875  dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(dest[i]), dest[i], sia);
1876  }
1877 }
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_SourceIn()

void QT_FASTCALL comp_func_solid_SourceIn ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1708 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1709 {
1710  PRELOAD_INIT(dest)
1711  if (const_alpha == 255) {
1712  for (int i = 0; i < length; ++i) {
1713  PRELOAD_COND(dest)
1714  dest[i] = BYTE_MUL(color, qAlpha(dest[i]));
1715  }
1716  } else {
1717  color = BYTE_MUL(color, const_alpha);
1718  uint cia = 255 - const_alpha;
1719  for (int i = 0; i < length; ++i) {
1720  PRELOAD_COND(dest)
1721  uint d = dest[i];
1722  dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(d), d, cia);
1723  }
1724  }
1725 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_SourceOut()

void QT_FASTCALL comp_func_solid_SourceOut ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1787 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1788 {
1789  PRELOAD_INIT(dest)
1790  if (const_alpha == 255) {
1791  for (int i = 0; i < length; ++i) {
1792  PRELOAD_COND(dest)
1793  dest[i] = BYTE_MUL(color, qAlpha(~dest[i]));
1794  }
1795  } else {
1796  color = BYTE_MUL(color, const_alpha);
1797  int cia = 255 - const_alpha;
1798  for (int i = 0; i < length; ++i) {
1799  PRELOAD_COND(dest)
1800  uint d = dest[i];
1801  dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(~d), d, cia);
1802  }
1803  }
1804 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_SourceOver()

void QT_FASTCALL comp_func_solid_SourceOver ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1632 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1633 {
1634  if ((const_alpha & qAlpha(color)) == 255) {
1635  QT_MEMFILL_UINT(dest, length, color);
1636  } else {
1637  if (const_alpha != 255)
1638  color = BYTE_MUL(color, const_alpha);
1639  PRELOAD_INIT(dest)
1640  for (int i = 0; i < length; ++i) {
1641  PRELOAD_COND(dest)
1642  dest[i] = color + BYTE_MUL(dest[i], qAlpha(~color));
1643  }
1644  }
1645 }
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
#define QT_MEMFILL_UINT(dest, length, color)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_solid_XOR()

void QT_FASTCALL comp_func_solid_XOR ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 1947 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1948 {
1949  if (const_alpha != 255)
1950  color = BYTE_MUL(color, const_alpha);
1951  uint sia = qAlpha(~color);
1952 
1953  PRELOAD_INIT(dest)
1954  for (int i = 0; i < length; ++i) {
1955  PRELOAD_COND(dest)
1956  uint d = dest[i];
1957  dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(~d), d, sia);
1958  }
1959 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_INIT(x)
#define PRELOAD_COND(x)

◆ comp_func_Source()

void QT_FASTCALL comp_func_Source ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1604 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1605 {
1606  if (const_alpha == 255) {
1607  ::memcpy(dest, src, length * sizeof(uint));
1608  } else {
1609  int ialpha = 255 - const_alpha;
1610  PRELOAD_INIT2(dest, src)
1611  for (int i = 0; i < length; ++i) {
1612  PRELOAD_COND2(dest, src)
1613  dest[i] = INTERPOLATE_PIXEL_255(src[i], const_alpha, dest[i], ialpha);
1614  }
1615  }
1616 }
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_SourceAtop()

void QT_FASTCALL comp_func_SourceAtop ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1879 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1880 {
1881  PRELOAD_INIT2(dest, src)
1882  if (const_alpha == 255) {
1883  for (int i = 0; i < length; ++i) {
1884  PRELOAD_COND2(dest, src)
1885  uint s = src[i];
1886  uint d = dest[i];
1887  dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, qAlpha(~s));
1888  }
1889  } else {
1890  for (int i = 0; i < length; ++i) {
1891  PRELOAD_COND2(dest, src)
1892  uint s = BYTE_MUL(src[i], const_alpha);
1893  uint d = dest[i];
1894  dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, qAlpha(~s));
1895  }
1896  }
1897 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_SourceIn()

void QT_FASTCALL comp_func_SourceIn ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1727 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1728 {
1729  PRELOAD_INIT2(dest, src)
1730  if (const_alpha == 255) {
1731  for (int i = 0; i < length; ++i) {
1732  PRELOAD_COND2(dest, src)
1733  dest[i] = BYTE_MUL(src[i], qAlpha(dest[i]));
1734  }
1735  } else {
1736  uint cia = 255 - const_alpha;
1737  for (int i = 0; i < length; ++i) {
1738  PRELOAD_COND2(dest, src)
1739  uint d = dest[i];
1740  uint s = BYTE_MUL(src[i], const_alpha);
1741  dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, cia);
1742  }
1743  }
1744 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_SourceOut()

void QT_FASTCALL comp_func_SourceOut ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1806 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1807 {
1808  PRELOAD_INIT2(dest, src)
1809  if (const_alpha == 255) {
1810  for (int i = 0; i < length; ++i) {
1811  PRELOAD_COND2(dest, src)
1812  dest[i] = BYTE_MUL(src[i], qAlpha(~dest[i]));
1813  }
1814  } else {
1815  int cia = 255 - const_alpha;
1816  for (int i = 0; i < length; ++i) {
1817  PRELOAD_COND2(dest, src)
1818  uint s = BYTE_MUL(src[i], const_alpha);
1819  uint d = dest[i];
1820  dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, cia);
1821  }
1822  }
1823 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_SourceOver()

void QT_FASTCALL comp_func_SourceOver ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1647 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1648 {
1649  PRELOAD_INIT2(dest, src)
1650  if (const_alpha == 255) {
1651  for (int i = 0; i < length; ++i) {
1652  PRELOAD_COND2(dest, src)
1653  uint s = src[i];
1654  if (s >= 0xff000000)
1655  dest[i] = s;
1656  else if (s != 0)
1657  dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s));
1658  }
1659  } else {
1660  for (int i = 0; i < length; ++i) {
1661  PRELOAD_COND2(dest, src)
1662  uint s = BYTE_MUL(src[i], const_alpha);
1663  dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s));
1664  }
1665  }
1666 }
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ comp_func_XOR()

void QT_FASTCALL comp_func_XOR ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 1961 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

1962 {
1963  PRELOAD_INIT2(dest, src)
1964  if (const_alpha == 255) {
1965  for (int i = 0; i < length; ++i) {
1966  PRELOAD_COND2(dest, src)
1967  uint d = dest[i];
1968  uint s = src[i];
1969  dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, qAlpha(~s));
1970  }
1971  } else {
1972  for (int i = 0; i < length; ++i) {
1973  PRELOAD_COND2(dest, src)
1974  uint d = dest[i];
1975  uint s = BYTE_MUL(src[i], const_alpha);
1976  dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, qAlpha(~s));
1977  }
1978  }
1979 }
double d
Definition: qnumeric_p.h:62
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
unsigned int uint
Definition: qglobal.h:996
#define PRELOAD_COND2(x, y)
#define PRELOAD_INIT2(x, y)

◆ INTERPOLATE_PIXEL_255()

Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255 ( uint  x,
uint  a,
uint  y,
uint  b 
)

Definition at line 569 of file qdrawhelper_p.h.

Referenced by comp_func_DestinationAtop(), comp_func_Plus_one_pixel_const_alpha(), comp_func_solid_DestinationAtop(), comp_func_solid_SourceAtop(), comp_func_solid_SourceIn(), comp_func_solid_SourceOut(), comp_func_solid_XOR(), comp_func_Source(), comp_func_SourceAtop(), comp_func_SourceIn(), comp_func_SourceOut(), comp_func_XOR(), qt_alphamapblit_quint32(), and QPartialCoverage::store().

569  {
570  uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
571  t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
572  t &= 0xff00ff;
573 
574  x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;
575  x = (x + ((x >> 8) & 0xff00ff) + 0x800080);
576  x &= 0xff00ff00;
577  x |= t;
578  return x;
579 }
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned int uint
Definition: qglobal.h:996

◆ INTERPOLATE_PIXEL_256()

Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256 ( uint  x,
uint  a,
uint  y,
uint  b 
)

Definition at line 611 of file qdrawhelper_p.h.

Referenced by cgColorForQColor(), fetchTransformedBilinear(), QGL2GradientCache::generateGradientColorTable(), QGLGradientCache::generateGradientColorTable(), QGradientCache::generateGradientColorTable(), INTERPOLATE_PIXEL_255(), QSvgPaintEngine::saveGradientStops(), and QCosmeticStroker::setup().

611  {
612  uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
613  t >>= 8;
614  t &= 0xff00ff;
615 
616  x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;
617  x &= 0xff00ff00;
618  x |= t;
619  return x;
620 }
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned int uint
Definition: qglobal.h:996

◆ PREMUL()

Definition at line 641 of file qdrawhelper_p.h.

Referenced by QGLPixmapData::bind(), QRasterBuffer::colorizeBitmap(), colorizeBitmap(), convert_ARGB_to_ARGB_PM(), convert_ARGB_to_ARGB_PM_inplace(), convert_indexed8_to_ARGB_PM_inplace(), destFetchARGB32(), QRasterPaintEngine::drawImage(), QBlittablePixmapData::fill(), QMacPixmapData::fill(), QRasterPixmapData::fill(), QX11PixmapData::fill(), QVGPixmapData::fill(), QGLPixmapData::fill(), QImage::fill(), QGLPixmapData::fillImage(), QRasterPaintEngine::fillRect(), findNearestColor(), fix_color_table(), QMacPixmapData::fromImage(), QGL2GradientCache::generateGradientColorTable(), QGLGradientCache::generateGradientColorTable(), QGradientCache::generateGradientColorTable(), INTERPOLATE_PIXEL_255(), QMacPixmapData::macSetAlphaChannel(), QGLPixmapData::paintEngine(), QRasterBuffer::prepare(), qt_fetchPixel< QImage::Format_ARGB32 >(), qt_fetchPixel< QImage::Format_Indexed8 >(), qt_fetchPixel< QImage::Format_Mono >(), qt_fetchPixel< QImage::Format_MonoLSB >(), QSvgPaintEngine::saveGradientStops(), and QSpanData::setup().

641  {
642  uint a = x >> 24;
643  uint t = (x & 0xff00ff) * a;
644  t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
645  t &= 0xff00ff;
646 
647  x = ((x >> 8) & 0xff) * a;
648  x = (x + ((x >> 8) & 0xff) + 0x80);
649  x &= 0xff00;
650  x |= t | (a << 24);
651  return x;
652 }
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned int uint
Definition: qglobal.h:996

◆ qBlendTexture()

void qBlendTexture ( int  count,
const QSpan spans,
void *  userData 
)

Definition at line 6828 of file qdrawhelper.cpp.

Referenced by QSpanData::adjustSpanMethods().

6829 {
6830  QSpanData *data = reinterpret_cast<QSpanData *>(userData);
6832  proc(count, spans, userData);
6833 }
QImage::Format format
QT_FT_SpanFunc ProcessSpans
static const char * data(const QByteArray &arr)
static TextureBlendType getBlendType(const QSpanData *data)
QRasterBuffer * rasterBuffer
static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats]

◆ qBlendTextureCallback()

void qBlendTextureCallback ( int  count,
const QSpan spans,
void *  userData 
)

Definition at line 6836 of file qdrawhelper.cpp.

Referenced by QSpanData::adjustSpanMethods().

6837 {
6838  QSpanData *data = reinterpret_cast<QSpanData *>(userData);
6840  proc(count, spans, userData);
6841 }
QImage::Format format
static const ProcessSpans processTextureSpansCallback[NBlendTypes][QImage::NImageFormats]
QT_FT_SpanFunc ProcessSpans
static const char * data(const QByteArray &arr)
static TextureBlendType getBlendType(const QSpanData *data)
QRasterBuffer * rasterBuffer

◆ qBlue565()

int qBlue565 ( quint16  rgb)
inline

Definition at line 2147 of file qdrawhelper_p.h.

2147  {
2148  const int b = (rgb & 0x001f);
2149  return (b << 3) | (b >> 2);
2150 }
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130

◆ qConvertRgb16To32()

QRgb qConvertRgb16To32 ( uint  c)
inline

Definition at line 2129 of file qdrawhelper_p.h.

Referenced by destFetchRGB16(), and qt_fetchPixel< QImage::Format_RGB16 >().

2130 {
2131  return 0xff000000
2132  | ((((c) << 3) & 0xf8) | (((c) >> 2) & 0x7))
2133  | ((((c) << 5) & 0xfc00) | (((c) >> 1) & 0x300))
2134  | ((((c) << 8) & 0xf80000) | (((c) << 3) & 0x70000));
2135 }
unsigned char c[8]
Definition: qnumeric_p.h:62

◆ qConvertRgb32To16()

ushort qConvertRgb32To16 ( uint  c)
inline

Definition at line 2112 of file qdrawhelper_p.h.

Referenced by blend_color_rgb16().

2113 {
2114  return (((c) >> 3) & 0x001f)
2115  | (((c) >> 5) & 0x07e0)
2116  | (((c) >> 8) & 0xf800);
2117 }
unsigned char c[8]
Definition: qnumeric_p.h:62

◆ qConvertRgb32To16x2()

quint32 qConvertRgb32To16x2 ( quint64  c)
inline

Definition at line 2120 of file qdrawhelper_p.h.

2121 {
2122  c = (((c) >> 3) & Q_UINT64_C(0x001f0000001f))
2123  | (((c) >> 5) & Q_UINT64_C(0x07e0000007e0))
2124  | (((c) >> 8) & Q_UINT64_C(0xf8000000f800));
2125  return c | (c >> 16);
2126 }
unsigned char c[8]
Definition: qnumeric_p.h:62
#define Q_UINT64_C(c)
Definition: qglobal.h:941

◆ qGreen565()

int qGreen565 ( quint16  rgb)
inline

Definition at line 2142 of file qdrawhelper_p.h.

2142  {
2143  const int g = (rgb & 0x07e0);
2144  return (g >> 3) | (g >> 9);
2145 }
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130

◆ qInitDrawhelperAsm()

void qInitDrawhelperAsm ( )

Definition at line 7659 of file qdrawhelper.cpp.

Referenced by qt_memfill16_setup(), and qt_memfill32_setup().

7660 {
7661 
7662  qt_memfill32 = qt_memfill_template<quint32, quint32>;
7663  qt_memfill16 = qt_memfill_quint16; //qt_memfill_template<quint16, quint16>;
7664 
7665  CompositionFunction *functionForModeAsm = 0;
7666  CompositionFunctionSolid *functionForModeSolidAsm = 0;
7667 
7668  const uint features = qDetectCPUFeatures();
7669  if (false) {
7670 #ifdef QT_HAVE_SSE2
7671  } else if (features & SSE2) {
7672  qt_memfill32 = qt_memfill32_sse2;
7673  qt_memfill16 = qt_memfill16_sse2;
7674  qDrawHelper[QImage::Format_RGB32].bitmapBlit = qt_bitmapblit32_sse2;
7675  qDrawHelper[QImage::Format_ARGB32].bitmapBlit = qt_bitmapblit32_sse2;
7677  qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse2;
7678 #endif
7679 #ifdef QT_HAVE_SSE
7680  } else if (features & SSE) {
7681 // qt_memfill32 = qt_memfill32_sse;
7682  qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse;
7683 #ifdef QT_HAVE_3DNOW
7684  if (features & MMX3DNOW) {
7685  qt_memfill32 = qt_memfill32_sse3dnow;
7686  qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse3dnow;
7687  }
7688 #endif
7689 #endif // SSE
7690  }
7691 #ifdef QT_HAVE_MMX
7692  if (features & MMX) {
7693  functionForModeAsm = qt_functionForMode_MMX;
7694 
7695  functionForModeSolidAsm = qt_functionForModeSolid_MMX;
7696  qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_mmx;
7697 #ifdef QT_HAVE_3DNOW
7698  if (features & MMX3DNOW) {
7699  functionForModeAsm = qt_functionForMode_MMX3DNOW;
7700  functionForModeSolidAsm = qt_functionForModeSolid_MMX3DNOW;
7701  qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_mmx3dnow;
7702  }
7703 #endif // 3DNOW
7704 
7705  extern void qt_blend_rgb32_on_rgb32_mmx(uchar *destPixels, int dbpl,
7706  const uchar *srcPixels, int sbpl,
7707  int w, int h,
7708  int const_alpha);
7709  extern void qt_blend_argb32_on_argb32_mmx(uchar *destPixels, int dbpl,
7710  const uchar *srcPixels, int sbpl,
7711  int w, int h,
7712  int const_alpha);
7713 
7714  qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mmx;
7718 
7719  }
7720 #endif // MMX
7721 
7722 #ifdef QT_HAVE_SSE
7723  if (features & SSE) {
7724  extern void qt_blend_rgb32_on_rgb32_sse(uchar *destPixels, int dbpl,
7725  const uchar *srcPixels, int sbpl,
7726  int w, int h,
7727  int const_alpha);
7728  extern void qt_blend_argb32_on_argb32_sse(uchar *destPixels, int dbpl,
7729  const uchar *srcPixels, int sbpl,
7730  int w, int h,
7731  int const_alpha);
7732 
7733  qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse;
7737  }
7738 #endif // SSE
7739 
7740 #ifdef QT_HAVE_SSE2
7741  if (features & SSE2) {
7742  extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
7743  const uchar *srcPixels, int sbpl,
7744  int w, int h,
7745  int const_alpha);
7746  extern void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl,
7747  const uchar *srcPixels, int sbpl,
7748  int w, int h,
7749  int const_alpha);
7750 
7751  qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2;
7755 
7756  extern const uint * QT_FASTCALL qt_fetch_radial_gradient_sse2(uint *buffer, const Operator *op, const QSpanData *data,
7757  int y, int x, int length);
7758 
7759  qt_fetch_radial_gradient = qt_fetch_radial_gradient_sse2;
7760  }
7761 
7762 #ifdef QT_HAVE_SSSE3
7763  if (features & SSSE3) {
7764  extern void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl,
7765  const uchar *srcPixels, int sbpl,
7766  int w, int h,
7767  int const_alpha);
7768 
7769  qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
7771  }
7772 #endif // SSSE3
7773 
7774 #endif // SSE2
7775 
7776 #ifdef QT_HAVE_SSE
7777  if (features & SSE) {
7778  functionForModeAsm = qt_functionForMode_SSE;
7779  functionForModeSolidAsm = qt_functionForModeSolid_SSE;
7780  qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_sse;
7781 #ifdef QT_HAVE_3DNOW
7782  if (features & MMX3DNOW) {
7783  functionForModeAsm = qt_functionForMode_SSE3DNOW;
7784  functionForModeSolidAsm = qt_functionForModeSolid_SSE3DNOW;
7785  qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_sse3dnow;
7786  }
7787 #endif // 3DNOW
7788 
7789 
7790 #ifdef QT_HAVE_SSE2
7791  if (features & SSE2) {
7792  extern void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels,
7793  const uint *srcPixels,
7794  int length,
7795  uint const_alpha);
7796  extern void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, uint color, uint const_alpha);
7797  extern void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uint const_alpha);
7798  extern void QT_FASTCALL comp_func_Source_sse2(uint *dst, const uint *src, int length, uint const_alpha);
7799 
7800  functionForModeAsm[0] = comp_func_SourceOver_sse2;
7801  functionForModeAsm[QPainter::CompositionMode_Source] = comp_func_Source_sse2;
7802  functionForModeAsm[QPainter::CompositionMode_Plus] = comp_func_Plus_sse2;
7803  functionForModeSolidAsm[0] = comp_func_solid_SourceOver_sse2;
7804  }
7805 #endif
7806  }
7807 #elif defined(QT_HAVE_SSE2)
7808  // this is the special case when SSE2 is usable but MMX/SSE is not usable (e.g.: Windows x64 + visual studio)
7809  if (features & SSE2) {
7810  functionForModeAsm = qt_functionForMode_onlySSE2;
7811  functionForModeSolidAsm = qt_functionForModeSolid_onlySSE2;
7812  }
7813 #endif
7814 
7815 #ifdef QT_HAVE_IWMMXT
7816  if (features & IWMMXT) {
7817  functionForModeAsm = qt_functionForMode_IWMMXT;
7818  functionForModeSolidAsm = qt_functionForModeSolid_IWMMXT;
7819  qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_iwmmxt;
7820  }
7821 #endif // IWMMXT
7822 
7823 #if defined(QT_HAVE_ARM_SIMD)
7824  qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_arm_simd;
7825  qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_arm_simd;
7826  qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_arm_simd;
7828 #elif defined(QT_HAVE_NEON)
7829  if (features & NEON) {
7830  qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
7836  qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon;
7837 
7838  qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon;
7839  qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon;
7840 
7841  qTransformFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_rgb16_neon;
7842  qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon;
7843 
7844  qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon;
7845 
7846  functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon;
7847  functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon;
7848  functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon;
7849  destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon;
7850  destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon;
7851 
7852  qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon;
7853  qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon;
7854  qt_memfill32 = qt_memfill32_neon;
7855 
7856  extern const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer, const Operator *op, const QSpanData *data,
7857  int y, int x, int length);
7858 
7859  qt_fetch_radial_gradient = qt_fetch_radial_gradient_neon;
7860  }
7861 #endif
7862 
7863  if (functionForModeSolidAsm) {
7864  const int destinationMode = QPainter::CompositionMode_Destination;
7865  functionForModeSolidAsm[destinationMode] = functionForModeSolid_C[destinationMode];
7866 
7867  // use the default qdrawhelper implementation for the
7868  // extended composition modes
7869  for (int mode = 12; mode < 24; ++mode)
7870  functionForModeSolidAsm[mode] = functionForModeSolid_C[mode];
7871 
7872  functionForModeSolid = functionForModeSolidAsm;
7873  }
7874  if (functionForModeAsm)
7875  functionForMode = functionForModeAsm;
7876 
7878 }
qt_memfill16_func qt_memfill16
qt_memfill32_func qt_memfill32
AlphamapBlitFunc alphamapBlit
BitmapBlitFunc bitmapBlit
static SourceFetchProc qt_fetch_radial_gradient
static void qt_memfill_quint16(quint16 *dest, quint16 color, int count)
Definition: qsimd_p.h:217
static CompositionFunction functionForMode_C[]
SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats]
MemRotateFunc qMemRotateFunctions[QImage::NImageFormats][3]
Definition: qmemrotate.cpp:627
void qt_build_pow_tables()
#define QT_FASTCALL
Definition: qglobal.h:1161
ProcessSpans blendColor
Definition: qsimd_p.h:212
static const CompositionFunctionSolid * functionForModeSolid
unsigned char uchar
Definition: qglobal.h:994
SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats]
static DestStoreProc destStoreProc[QImage::NImageFormats]
static const char * data(const QByteArray &arr)
unsigned int uint
Definition: qglobal.h:996
DrawHelper qDrawHelper[QImage::NImageFormats]
static DestFetchProc destFetchProc[QImage::NImageFormats]
uint qDetectCPUFeatures()
Definition: qsimd.cpp:382
void(QT_FASTCALL * CompositionFunction)(uint *dest, const uint *src, int length, uint const_alpha)
Definition: qsimd_p.h:222
static CompositionFunctionSolid functionForModeSolid_C[]
void(QT_FASTCALL * CompositionFunctionSolid)(uint *dest, int length, uint color, uint const_alpha)
static const CompositionFunction * functionForMode
Definition: qsimd_p.h:220
SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats]
Definition: qsimd_p.h:216

◆ qRadialDeterminant()

static qreal qRadialDeterminant ( qreal  a,
qreal  b,
qreal  c 
)
inlinestatic

Definition at line 384 of file qdrawhelper_p.h.

385 {
386  return (b * b) - (4 * a * c);
387 }
unsigned char c[8]
Definition: qnumeric_p.h:62
long ASN1_INTEGER_get ASN1_INTEGER * a

◆ qRed565()

int qRed565 ( quint16  rgb)
inline

Definition at line 2137 of file qdrawhelper_p.h.

2137  {
2138  const int r = (rgb & 0xf800);
2139  return (r >> 8) | (r >> 13);
2140 }
#define rgb(r, g, b)
Definition: qcolor_p.cpp:130

◆ qt_colorConvert() [1/7]

template<class DST , class SRC >
DST qt_colorConvert ( SRC  color,
DST  dummy 
)
inline

Definition at line 677 of file qdrawhelper_p.h.

Referenced by qrgb444::byte_mul(), and qt_colorConvert().

678 {
679  Q_UNUSED(dummy);
680  return DST(color);
681 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_colorConvert() [2/7]

template<>
quint32 qt_colorConvert ( quint16  color,
quint32  dummy 
)
inline

Definition at line 685 of file qdrawhelper_p.h.

686 {
687  Q_UNUSED(dummy);
688  const int r = (color & 0xf800);
689  const int g = (color & 0x07e0);
690  const int b = (color & 0x001f);
691  const int tr = (r >> 8) | (r >> 13);
692  const int tg = (g >> 3) | (g >> 9);
693  const int tb = (b << 3) | (b >> 2);
694 
695  return qRgb(tr, tg, tb);
696 }
QRgb qRgb(int r, int g, int b)
Returns the ARGB quadruplet (255, {r}, {g}, {b}).
Definition: qrgb.h:69
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_colorConvert() [3/7]

template<>
quint16 qt_colorConvert ( quint32  color,
quint16  dummy 
)
inline

Definition at line 699 of file qdrawhelper_p.h.

700 {
701  Q_UNUSED(dummy);
702  const int r = qRed(color) << 8;
703  const int g = qGreen(color) << 3;
704  const int b = qBlue(color) >> 3;
705 
706  return (r & 0xf800) | (g & 0x07e0)| (b & 0x001f);
707 }
int qRed(QRgb rgb)
Returns the red component of the ARGB quadruplet rgb.
Definition: qrgb.h:57
int qGreen(QRgb rgb)
Returns the green component of the ARGB quadruplet rgb.
Definition: qrgb.h:60
int qBlue(QRgb rgb)
Returns the blue component of the ARGB quadruplet rgb.
Definition: qrgb.h:63
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_colorConvert() [4/7]

template<>
qrgb888 qt_colorConvert ( quint32  color,
qrgb888  dummy 
)
inline

Definition at line 1482 of file qdrawhelper_p.h.

1483 {
1484  Q_UNUSED(dummy);
1485  return qrgb888(color);
1486 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_colorConvert() [5/7]

template<>
quint32 qt_colorConvert ( qrgb888  color,
quint32  dummy 
)
inline

Definition at line 1489 of file qdrawhelper_p.h.

1490 {
1491  Q_UNUSED(dummy);
1492  return quint32(color);
1493 }
unsigned int quint32
Definition: qglobal.h:938
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_colorConvert() [6/7]

template<>
quint24 qt_colorConvert ( quint32  color,
quint24  dummy 
)
inline

Definition at line 1554 of file qdrawhelper_p.h.

1555 {
1556  Q_UNUSED(dummy);
1557  return quint24(color);
1558 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_colorConvert() [7/7]

template<>
quint18 qt_colorConvert ( quint32  color,
quint18  dummy 
)
inline

Definition at line 1588 of file qdrawhelper_p.h.

1589 {
1590  Q_UNUSED(dummy);
1591  return quint18(color);
1592 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_div_255()

Q_STATIC_INLINE_FUNCTION int qt_div_255 ( int  x)

◆ qt_fetch_radial_gradient_template()

template<class RadialFetchFunc >
const uint* QT_FASTCALL qt_fetch_radial_gradient_template ( uint buffer,
const Operator op,
const QSpanData data,
int  y,
int  x,
int  length 
)

Definition at line 390 of file qdrawhelper_p.h.

392 {
393  // avoid division by zero
394  if (qFuzzyIsNull(op->radial.a)) {
395  extern void (*qt_memfill32)(quint32 *dest, quint32 value, int count);
396  qt_memfill32(buffer, 0, length);
397  return buffer;
398  }
399 
400  const uint *b = buffer;
401  qreal rx = data->m21 * (y + qreal(0.5))
402  + data->dx + data->m11 * (x + qreal(0.5));
403  qreal ry = data->m22 * (y + qreal(0.5))
404  + data->dy + data->m12 * (x + qreal(0.5));
405  bool affine = !data->m13 && !data->m23;
406 
407  uint *end = buffer + length;
408  if (affine) {
409  rx -= data->gradient.radial.focal.x;
410  ry -= data->gradient.radial.focal.y;
411 
412  qreal inv_a = 1 / qreal(2 * op->radial.a);
413 
414  const qreal delta_rx = data->m11;
415  const qreal delta_ry = data->m12;
416 
417  qreal b = 2*(op->radial.dr*data->gradient.radial.focal.radius + rx * op->radial.dx + ry * op->radial.dy);
418  qreal delta_b = 2*(delta_rx * op->radial.dx + delta_ry * op->radial.dy);
419  const qreal b_delta_b = 2 * b * delta_b;
420  const qreal delta_b_delta_b = 2 * delta_b * delta_b;
421 
422  const qreal bb = b * b;
423  const qreal delta_bb = delta_b * delta_b;
424 
425  b *= inv_a;
426  delta_b *= inv_a;
427 
428  const qreal rxrxryry = rx * rx + ry * ry;
429  const qreal delta_rxrxryry = delta_rx * delta_rx + delta_ry * delta_ry;
430  const qreal rx_plus_ry = 2*(rx * delta_rx + ry * delta_ry);
431  const qreal delta_rx_plus_ry = 2 * delta_rxrxryry;
432 
433  inv_a *= inv_a;
434 
435  qreal det = (bb - 4 * op->radial.a * (op->radial.sqrfr - rxrxryry)) * inv_a;
436  qreal delta_det = (b_delta_b + delta_bb + 4 * op->radial.a * (rx_plus_ry + delta_rxrxryry)) * inv_a;
437  const qreal delta_delta_det = (delta_b_delta_b + 4 * op->radial.a * delta_rx_plus_ry) * inv_a;
438 
439  RadialFetchFunc::fetch(buffer, end, op, data, det, delta_det, delta_delta_det, b, delta_b);
440  } else {
441  qreal rw = data->m23 * (y + qreal(0.5))
442  + data->m33 + data->m13 * (x + qreal(0.5));
443 
444  while (buffer < end) {
445  if (rw == 0) {
446  *buffer = 0;
447  } else {
448  qreal invRw = 1 / rw;
449  qreal gx = rx * invRw - data->gradient.radial.focal.x;
450  qreal gy = ry * invRw - data->gradient.radial.focal.y;
451  qreal b = 2*(op->radial.dr*data->gradient.radial.focal.radius + gx*op->radial.dx + gy*op->radial.dy);
452  qreal det = qRadialDeterminant(op->radial.a, b, op->radial.sqrfr - (gx*gx + gy*gy));
453 
454  quint32 result = 0;
455  if (det >= 0) {
456  qreal detSqrt = qSqrt(det);
457 
458  qreal s0 = (-b - detSqrt) * op->radial.inv2a;
459  qreal s1 = (-b + detSqrt) * op->radial.inv2a;
460 
461  qreal s = qMax(s0, s1);
462 
463  if (data->gradient.radial.focal.radius + op->radial.dr * s >= 0)
464  result = qt_gradient_pixel(&data->gradient, s);
465  }
466 
467  *buffer = result;
468  }
469 
470  rx += data->m11;
471  ry += data->m12;
472  rw += data->m13;
473 
474  ++buffer;
475  }
476  }
477 
478  return b;
479 }
qt_memfill32_func qt_memfill32
double qreal
Definition: qglobal.h:1193
static qreal qRadialDeterminant(qreal a, qreal b, qreal c)
static uint qt_gradient_pixel(const QGradientData *data, qreal pos)
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
RadialGradientValues radial
unsigned int uint
Definition: qglobal.h:996
QGradientData gradient
struct QRadialGradientData::@232 focal
unsigned int quint32
Definition: qglobal.h:938
QRadialGradientData radial
static Q_DECL_CONSTEXPR bool qFuzzyIsNull(double d)
Definition: qglobal.h:2043
static const KeyPair *const end
qreal qSqrt(qreal v)
Definition: qmath.h:205

◆ qt_gradient_clamp()

static uint qt_gradient_clamp ( const QGradientData data,
int  ipos 
)
inlinestatic

Definition at line 353 of file qdrawhelper_p.h.

Referenced by qt_gradient_pixel(), and qt_gradient_pixel_fixed().

354 {
355  if (ipos < 0 || ipos >= GRADIENT_STOPTABLE_SIZE) {
356  if (data->spread == QGradient::RepeatSpread) {
357  ipos = ipos % GRADIENT_STOPTABLE_SIZE;
358  ipos = ipos < 0 ? GRADIENT_STOPTABLE_SIZE + ipos : ipos;
359  } else if (data->spread == QGradient::ReflectSpread) {
360  const int limit = GRADIENT_STOPTABLE_SIZE * 2;
361  ipos = ipos % limit;
362  ipos = ipos < 0 ? limit + ipos : ipos;
363  ipos = ipos >= GRADIENT_STOPTABLE_SIZE ? limit - 1 - ipos : ipos;
364  } else {
365  if (ipos < 0)
366  ipos = 0;
367  else if (ipos >= GRADIENT_STOPTABLE_SIZE)
368  ipos = GRADIENT_STOPTABLE_SIZE-1;
369  }
370  }
371 
372  Q_ASSERT(ipos >= 0);
374 
375  return ipos;
376 }
#define GRADIENT_STOPTABLE_SIZE
QGradient::Spread spread
#define Q_ASSERT(cond)
Definition: qglobal.h:1823

◆ qt_gradient_pixel()

static uint qt_gradient_pixel ( const QGradientData data,
qreal  pos 
)
inlinestatic

Definition at line 378 of file qdrawhelper_p.h.

Referenced by RadialFetchPlain::fetch(), qt_fetch_conical_gradient(), and qt_fetch_linear_gradient().

379 {
380  int ipos = int(pos * (GRADIENT_STOPTABLE_SIZE - 1) + qreal(0.5));
381  return data->colorTable[qt_gradient_clamp(data, ipos)];
382 }
double qreal
Definition: qglobal.h:1193
#define GRADIENT_STOPTABLE_SIZE
static uint qt_gradient_clamp(const QGradientData *data, int ipos)

◆ qt_memconvert() [1/2]

template<class DST , class SRC >
void qt_memconvert ( DST *  dest,
const SRC *  src,
int  count 
)
inline

Definition at line 1898 of file qdrawhelper_p.h.

Referenced by blend_sourceOver_4(), blendTiled(), blendTransformed(), blendTransformedBilinear(), blendTransformedTiled(), blendUntransformed_dest16(), convert_RGB_to_RGB16_inplace(), and qt_blend_rgb32_on_rgb32().

1899 {
1900  if (sizeof(DST) == 1) {
1901  while (count) {
1902  int n = 1;
1903  const SRC color = *src++;
1904  const DST dstColor = qt_colorConvert<DST, SRC>(color, 0);
1905  while (--count && (*src == color || dstColor == qt_colorConvert<DST, SRC>(*src, 0))) {
1906  ++n;
1907  ++src;
1908  }
1909  qt_memfill(dest, dstColor, n);
1910  dest += n;
1911  }
1912  } else {
1913  /* Duff's device */
1914  int n = (count + 7) / 8;
1915  switch (count & 0x07)
1916  {
1917  case 0: do { *dest++ = qt_colorConvert<DST, SRC>(*src++, 0);
1918  case 7: *dest++ = qt_colorConvert<DST, SRC>(*src++, 0);
1919  case 6: *dest++ = qt_colorConvert<DST, SRC>(*src++, 0);
1920  case 5: *dest++ = qt_colorConvert<DST, SRC>(*src++, 0);
1921  case 4: *dest++ = qt_colorConvert<DST, SRC>(*src++, 0);
1922  case 3: *dest++ = qt_colorConvert<DST, SRC>(*src++, 0);
1923  case 2: *dest++ = qt_colorConvert<DST, SRC>(*src++, 0);
1924  case 1: *dest++ = qt_colorConvert<DST, SRC>(*src++, 0);
1925  } while (--n > 0);
1926  }
1927  }
1928 }
void qt_memfill(T *dest, T value, int count)

◆ qt_memconvert() [2/2]

template<>
void qt_memconvert ( qrgb666 dest,
const quint32 src,
int  count 
)
inline

Definition at line 1951 of file qdrawhelper_p.h.

1952 {
1953  if (count < 3) {
1954  switch (count) {
1955  case 2: *dest++ = qrgb666(*src++);
1956  case 1: *dest = qrgb666(*src);
1957  }
1958  return;
1959  }
1960 
1961  const int align = (quintptr(dest) & 3);
1962  switch (align) {
1963  case 1: *dest++ = qrgb666(*src++); --count;
1964  case 2: *dest++ = qrgb666(*src++); --count;
1965  case 3: *dest++ = qrgb666(*src++); --count;
1966  }
1967 
1968  quint32 *dest32 = reinterpret_cast<quint32*>(dest);
1969  int sourceCount = count >> 2;
1970  while (sourceCount--) {
1971  dest32[0] = ((src[1] & 0x00000c00) << 20)
1972  | ((src[1] & 0x000000fc) << 22)
1973  | ((src[0] & 0x00fc0000) >> 6)
1974  | ((src[0] & 0x0000fc00) >> 4)
1975  | ((src[0] & 0x000000fc) >> 2);
1976  dest32[1] = ((src[2] & 0x003c0000) << 10)
1977  | ((src[2] & 0x0000fc00) << 12)
1978  | ((src[2] & 0x000000fc) << 14)
1979  | ((src[1] & 0x00fc0000) >> 14)
1980  | ((src[1] & 0x0000f000) >> 12);
1981  dest32[2] = ((src[3] & 0x00fc0000) << 2)
1982  | ((src[3] & 0x0000fc00) << 4)
1983  | ((src[3] & 0x000000fc) << 6)
1984  | ((src[2] & 0x00c00000) >> 22);
1985  dest32 += 3;
1986  src += 4;
1987  }
1988 
1989  dest = reinterpret_cast<qrgb666*>(dest32);
1990  switch (count & 3) {
1991  case 3: *dest++ = qrgb666(*src++);
1992  case 2: *dest++ = qrgb666(*src++);
1993  case 1: *dest = qrgb666(*src);
1994  }
1995 }
QIntegerForSizeof< void * >::Unsigned quintptr
Definition: qglobal.h:986
unsigned int quint32
Definition: qglobal.h:938

◆ qt_memfill() [1/4]

template<class T >
void qt_memfill ( T *  dest,
value,
int  count 
)
inline

Definition at line 1861 of file qdrawhelper_p.h.

Referenced by blendColor(), qrgb444::byte_mul(), comp_func_solid_Source(), comp_func_solid_SourceOver(), qt_bitmapblit_template(), qt_blend_color_argb_x86(), qt_memconvert(), qt_memfill_template(), qt_rectfill(), and rasterop_solid_NotSource().

1862 {
1863  if (!count)
1864  return;
1865 
1866  int n = (count + 7) / 8;
1867  switch (count & 0x07)
1868  {
1869  case 0: do { *dest++ = value;
1870  case 7: *dest++ = value;
1871  case 6: *dest++ = value;
1872  case 5: *dest++ = value;
1873  case 4: *dest++ = value;
1874  case 3: *dest++ = value;
1875  case 2: *dest++ = value;
1876  case 1: *dest++ = value;
1877  } while (--n > 0);
1878  }
1879 }

◆ qt_memfill() [2/4]

template<>
void qt_memfill ( quint32 dest,
quint32  color,
int  count 
)
inline

Definition at line 1843 of file qdrawhelper_p.h.

1844 {
1845  extern void (*qt_memfill32)(quint32 *dest, quint32 value, int count);
1846  qt_memfill32(dest, color, count);
1847 }
qt_memfill32_func qt_memfill32
unsigned int quint32
Definition: qglobal.h:938

◆ qt_memfill() [3/4]

template<>
void qt_memfill ( quint16 dest,
quint16  color,
int  count 
)
inline

Definition at line 1849 of file qdrawhelper_p.h.

1850 {
1851  extern void (*qt_memfill16)(quint16 *dest, quint16 value, int count);
1852  qt_memfill16(dest, color, count);
1853 }
qt_memfill16_func qt_memfill16
unsigned short quint16
Definition: qglobal.h:936

◆ qt_memfill() [4/4]

template<>
void qt_memfill ( quint8 dest,
quint8  color,
int  count 
)
inline

Definition at line 1855 of file qdrawhelper_p.h.

1856 {
1857  memset(dest, color, count);
1858 }

◆ qt_rectconvert()

template<class DST , class SRC >
void qt_rectconvert ( DST *  dest,
const SRC *  src,
int  x,
int  y,
int  width,
int  height,
int  dstStride,
int  srcStride 
)
inline

Definition at line 2013 of file qdrawhelper_p.h.

Referenced by blit_template(), and qt_memfill16_setup().

2016 {
2017  char *d = (char*)(dest + x) + y * dstStride;
2018  const char *s = (char*)(src);
2019  for (int i = 0; i < height; ++i) {
2020  qt_memconvert<DST,SRC>((DST*)d, (const SRC*)s, width);
2021  d += dstStride;
2022  s += srcStride;
2023  }
2024 }
double d
Definition: qnumeric_p.h:62

◆ qt_rectcopy()

template<class T >
void qt_rectcopy ( T *  dest,
const T *  src,
int  x,
int  y,
int  width,
int  height,
int  dstStride,
int  srcStride 
)
inline

Definition at line 1999 of file qdrawhelper_p.h.

Referenced by QGLPixmapBlurFilter::processGL(), and QGLPixmapDropShadowFilter::processGL().

2002 {
2003  char *d = (char*)(dest + x) + y * dstStride;
2004  const char *s = (char*)(src);
2005  for (int i = 0; i < height; ++i) {
2006  ::memcpy(d, s, width * sizeof(T));
2007  d += dstStride;
2008  s += srcStride;
2009  }
2010 }
double d
Definition: qnumeric_p.h:62

◆ qt_rectfill()

template<class T >
void qt_rectfill ( T *  dest,
value,
int  x,
int  y,
int  width,
int  height,
int  stride 
)
inline

Definition at line 1882 of file qdrawhelper_p.h.

Referenced by solidFill_template().

1884 {
1885  char *d = reinterpret_cast<char*>(dest + x) + y * stride;
1886  if (uint(stride) == (width * sizeof(T))) {
1887  qt_memfill(reinterpret_cast<T*>(d), value, width * height);
1888  } else {
1889  for (int j = 0; j < height; ++j) {
1890  dest = reinterpret_cast<T*>(d);
1891  qt_memfill(dest, value, width);
1892  d += stride;
1893  }
1894  }
1895 }
double d
Definition: qnumeric_p.h:62
unsigned int uint
Definition: qglobal.h:996
void qt_memfill(T *dest, T value, int count)

◆ rasterop_NotSource()

void QT_FASTCALL rasterop_NotSource ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 3054 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3056 {
3057  Q_UNUSED(const_alpha);
3058  while (length--)
3059  *dest++ = ~(*src++) | 0xff000000;
3060 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_NotSourceAndDestination()

void QT_FASTCALL rasterop_NotSourceAndDestination ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 3075 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3079 {
3080  Q_UNUSED(const_alpha);
3081  while (length--) {
3082  *dest = (~(*src) & *dest) | 0xff000000;
3083  ++dest; ++src;
3084  }
3085 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_NotSourceAndNotDestination()

void QT_FASTCALL rasterop_NotSourceAndNotDestination ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2985 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2989 {
2990  Q_UNUSED(const_alpha);
2991  while (length--) {
2992  *dest = (~(*src) & ~(*dest)) | 0xff000000;
2993  ++dest; ++src;
2994  }
2995 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_NotSourceOrNotDestination()

void QT_FASTCALL rasterop_NotSourceOrNotDestination ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 3010 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3014 {
3015  Q_UNUSED(const_alpha);
3016  while (length--) {
3017  *dest = ~(*src) | ~(*dest) | 0xff000000;
3018  ++dest; ++src;
3019  }
3020 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_NotSourceXorDestination()

void QT_FASTCALL rasterop_NotSourceXorDestination ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 3035 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3039 {
3040  Q_UNUSED(const_alpha);
3041  while (length--) {
3042  *dest = ((~(*src)) ^ (*dest)) | 0xff000000;
3043  ++dest; ++src;
3044  }
3045 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_solid_NotSource()

void QT_FASTCALL rasterop_solid_NotSource ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 3047 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3049 {
3050  Q_UNUSED(const_alpha);
3051  qt_memfill(dest, ~color | 0xff000000, length);
3052 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
void qt_memfill(T *dest, T value, int count)

◆ rasterop_solid_NotSourceAndDestination()

void QT_FASTCALL rasterop_solid_NotSourceAndDestination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 3062 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3066 {
3067  Q_UNUSED(const_alpha);
3068  color = ~color | 0xff000000;
3069  while (length--) {
3070  *dest = color & *dest;
3071  ++dest;
3072  }
3073 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_solid_NotSourceAndNotDestination()

void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2972 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2976 {
2977  Q_UNUSED(const_alpha);
2978  color = ~color;
2979  while (length--) {
2980  *dest = (color & ~(*dest)) | 0xff000000;
2981  ++dest;
2982  }
2983 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_solid_NotSourceOrNotDestination()

void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2997 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3001 {
3002  Q_UNUSED(const_alpha);
3003  color = ~color | 0xff000000;
3004  while (length--) {
3005  *dest = color | ~(*dest);
3006  ++dest;
3007  }
3008 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_solid_NotSourceXorDestination()

void QT_FASTCALL rasterop_solid_NotSourceXorDestination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 3022 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3026 {
3027  Q_UNUSED(const_alpha);
3028  color = ~color & 0x00ffffff;
3029  while (length--) {
3030  *dest = color ^ (*dest);
3031  ++dest;
3032  }
3033 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_solid_SourceAndDestination()

void QT_FASTCALL rasterop_solid_SourceAndDestination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2926 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2930 {
2931  Q_UNUSED(const_alpha);
2932  color |= 0xff000000;
2933  while (length--)
2934  *dest++ &= color;
2935 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_solid_SourceAndNotDestination()

void QT_FASTCALL rasterop_solid_SourceAndNotDestination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 3087 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3091 {
3092  Q_UNUSED(const_alpha);
3093  while (length--) {
3094  *dest = (color & ~(*dest)) | 0xff000000;
3095  ++dest;
3096  }
3097 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_solid_SourceOrDestination()

void QT_FASTCALL rasterop_solid_SourceOrDestination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2906 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2910 {
2911  Q_UNUSED(const_alpha);
2912  while (length--)
2913  *dest++ |= color;
2914 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_solid_SourceXorDestination()

void QT_FASTCALL rasterop_solid_SourceXorDestination ( uint dest,
int  length,
uint  color,
uint  const_alpha 
)

Definition at line 2949 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2953 {
2954  Q_UNUSED(const_alpha);
2955  color &= 0x00ffffff;
2956  while (length--)
2957  *dest++ ^= color;
2958 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_SourceAndDestination()

void QT_FASTCALL rasterop_SourceAndDestination ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2937 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2941 {
2942  Q_UNUSED(const_alpha);
2943  while (length--) {
2944  *dest = (*src & *dest) | 0xff000000;
2945  ++dest; ++src;
2946  }
2947 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_SourceAndNotDestination()

void QT_FASTCALL rasterop_SourceAndNotDestination ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 3099 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

3103 {
3104  Q_UNUSED(const_alpha);
3105  while (length--) {
3106  *dest = (*src & ~(*dest)) | 0xff000000;
3107  ++dest; ++src;
3108  }
3109 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_SourceOrDestination()

void QT_FASTCALL rasterop_SourceOrDestination ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2916 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2920 {
2921  Q_UNUSED(const_alpha);
2922  while (length--)
2923  *dest++ |= *src++;
2924 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ rasterop_SourceXorDestination()

void QT_FASTCALL rasterop_SourceXorDestination ( uint dest,
const uint src,
int  length,
uint  const_alpha 
)

Definition at line 2960 of file qdrawhelper.cpp.

Referenced by comp_func_Plus_one_pixel().

2964 {
2965  Q_UNUSED(const_alpha);
2966  while (length--) {
2967  *dest = (*src ^ *dest) | 0xff000000;
2968  ++dest; ++src;
2969  }
2970 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

Variable Documentation

◆ AMASK

const uint AMASK = 0xff000000
static

◆ BMASK

const uint BMASK = 0x000000ff
static

◆ GMASK

const uint GMASK = 0x0000ff00
static

◆ Q_PACKED

class qrgb444 Q_PACKED

Referenced by qrgb444::byte_mul().

◆ qBlendFunctions

SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats]

Definition at line 1062 of file qblendfunctions.cpp.

Referenced by QRasterPaintEngine::drawImage(), and qInitDrawhelperAsm().

◆ qDrawHelper

DrawHelper qDrawHelper[QImage::NImageFormats]

Definition at line 7377 of file qdrawhelper.cpp.

Referenced by QRasterBuffer::prepare().

◆ qDrawHelperCallback

DrawHelper qDrawHelperCallback[QImage::NImageFormats]

Definition at line 7494 of file qdrawhelper.cpp.

Referenced by QRasterBuffer::prepare().

◆ qMemRotateFunctions

MemRotateFunc qMemRotateFunctions[QImage::NImageFormats][3]

Definition at line 627 of file qmemrotate.cpp.

Referenced by QRasterPaintEngine::drawImage(), and qInitDrawhelperAsm().

◆ qScaleFunctions

SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats]

Definition at line 770 of file qblendfunctions.cpp.

Referenced by QRasterPaintEngine::drawImage(), and qInitDrawhelperAsm().

◆ qt_bayer_matrix

const uint qt_bayer_matrix[16][16]

◆ qTransformFunctions

SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats]

Definition at line 1353 of file qblendfunctions.cpp.

Referenced by QRasterPaintEngine::drawImage(), and qInitDrawhelperAsm().

◆ RMASK

const uint RMASK = 0x00ff0000
static