QtBase  v6.3.1
Classes | Macros | Typedefs | Functions | Variables
qdrawhelper_p.h File Reference
#include <QtGui/private/qtguiglobal_p.h>
#include "QtCore/qmath.h"
#include "QtGui/qcolor.h"
#include "QtGui/qpainter.h"
#include "QtGui/qimage.h"
#include "QtGui/qrgba64.h"
#include "private/qpixellayout_p.h"
#include "private/qrasterdefs_p.h"
#include <private/qsimd_p.h>
#include <QtCore/qsharedpointer.h>
Include dependency graph for qdrawhelper_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DrawHelper
 
struct  quint24
 
struct  LinearGradientValues
 
struct  RadialGradientValues
 
struct  Operator
 
struct  QLinearGradientData
 
struct  QRadialGradientData
 
struct  QConicalGradientData
 
struct  QGradientData
 
struct  QTextureData
 
struct  QSpanData
 
class  QSpanData::Pinnable
 
class  QRadialFetchSimd< Simd >
 
struct  IntermediateBuffer
 

Macros

#define QT_FT_BEGIN_HEADER
 
#define QT_FT_END_HEADER
 
#define Q_DECL_RESTRICT
 
#define Q_DECL_VECTORCALL
 
#define GRADIENT_STOPTABLE_SIZE   1024
 
#define GRADIENT_STOPTABLE_SIZE_SHIFT   10
 
#define FETCH_RADIAL_LOOP_PROLOGUE
 
#define FETCH_RADIAL_LOOP_CLAMP_REPEAT    index_vec.v = Simd::v_and(v_repeat_mask, Simd::v_toInt(v_index));
 
#define FETCH_RADIAL_LOOP_CLAMP_REFLECT
 
#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_EPILOGUE
 
#define FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP)
 
#define ARGB_COMBINE_ALPHA(argb, alpha)    ((((argb >> 24) * alpha) >> 8) << 24) | (argb & 0x00ffffff)
 
#define AMIX(mask)   quint32(qMin(((quint64(s)&mask) + (quint64(d)&mask)), quint64(mask)))
 
#define MIX(mask)   (qMin(((quint32(s)&mask) + (quint32(d)&mask)), quint32(mask)))
 

Typedefs

typedef QT_FT_Span QSpan
 
typedef QRgbaFloat< float > QRgbaFloat32
 
typedef QT_FT_SpanFunc ProcessSpans
 
typedef void(* BitmapBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 &color, const uchar *bitmap, int mapWidth, int mapHeight, int mapStride)
 
typedef void(* AlphamapBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 &color, const uchar *bitmap, int mapWidth, int mapHeight, int mapStride, const QClipData *clip, bool useGammaCorrection)
 
typedef void(* AlphaRGBBlitFunc) (QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 &color, const uint *rgbmask, int mapWidth, int mapHeight, int mapStride, const QClipData *clip, bool useGammaCorrection)
 
typedef void(* RectFillFunc) (QRasterBuffer *rasterBuffer, int x, int y, int width, int height, const QRgba64 &color)
 
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)
 
typedef void(QT_FASTCALL * CompositionFunction) (uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
 
typedef void(QT_FASTCALL * CompositionFunction64) (QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
 
typedef void(QT_FASTCALL * CompositionFunctionFP) (QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
 
typedef void(QT_FASTCALL * CompositionFunctionSolid) (uint *dest, int length, uint color, uint const_alpha)
 
typedef void(QT_FASTCALL * CompositionFunctionSolid64) (QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
 
typedef void(QT_FASTCALL * CompositionFunctionSolidFP) (QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
 
typedef uint *QT_FASTCALL * DestFetchProc(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
 
typedef QRgba64 *(QT_FASTCALL * DestFetchProc64) (QRgba64 *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
 
typedef QRgbaFloat32 *(QT_FASTCALL * DestFetchProcFP) (QRgbaFloat32 *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
 
typedef void(QT_FASTCALL * DestStoreProc) (QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
 
typedef void(QT_FASTCALL * DestStoreProc64) (QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length)
 
typedef void(QT_FASTCALL * DestStoreProcFP) (QRasterBuffer *rasterBuffer, int x, int y, const QRgbaFloat32 *buffer, int length)
 
typedef const uint *(QT_FASTCALL * SourceFetchProc) (uint *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)
 
typedef const QRgba64 *(QT_FASTCALL * SourceFetchProc64) (QRgba64 *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)
 
typedef const QRgbaFloat32 *(QT_FASTCALL * SourceFetchProcFP) (QRgbaFloat32 *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)
 

Functions

void qBlendGradient (int count, const QSpan *spans, void *userData)
 
void qBlendTexture (int count, const QSpan *spans, void *userData)
 
void qt_memfill64 (quint64 *dest, quint64 value, qsizetype count)
 
void qt_memfill32 (quint32 *dest, quint32 value, qsizetype count)
 
void qt_memfill24 (quint24 *dest, quint24 value, qsizetype count)
 
void qt_memfill16 (quint16 *dest, quint16 value, qsizetype count)
 
template<class T >
void qt_memfill_template (T *dest, T color, qsizetype count)
 
template<class T >
void qt_memfill (T *dest, T value, qsizetype count)
 
template<>
void qt_memfill (quint64 *dest, quint64 color, qsizetype count)
 
template<>
void qt_memfill (quint32 *dest, quint32 color, qsizetype count)
 
template<>
void qt_memfill (quint24 *dest, quint24 color, qsizetype count)
 
template<>
void qt_memfill (quint16 *dest, quint16 color, qsizetype count)
 
template<>
void qt_memfill (quint8 *dest, quint8 color, qsizetype count)
 
ushort qConvertRgb32To16 (uint c)
 
QRgb qConvertRgb16To32 (uint c)
 
uint comp_func_Plus_one_pixel_const_alpha (uint d, const uint s, const uint const_alpha, const uint one_minus_const_alpha)
 
uint comp_func_Plus_one_pixel (uint d, const uint s)
 

Variables

SrcOverBlendFunc qBlendFunctions [QImage::NImageFormats][QImage::NImageFormats]
 
SrcOverScaleFunc qScaleFunctions [QImage::NImageFormats][QImage::NImageFormats]
 
SrcOverTransformFunc qTransformFunctions [QImage::NImageFormats][QImage::NImageFormats]
 
DrawHelper qDrawHelper [QImage::NImageFormats]
 
const uint qt_bayer_matrix [16][16]
 

Macro Definition Documentation

◆ AMIX

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

Definition at line 1057 of file qdrawhelper_p.h.

◆ ARGB_COMBINE_ALPHA

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

Definition at line 1048 of file qdrawhelper_p.h.

◆ FETCH_RADIAL_LOOP

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

◆ 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);

◆ 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.colorTable32[index_vec.i[i]]; \
}
small capitals from c petite p scientific i
[1]
Definition: afcover.h:80
GLenum GLuint buffer
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data

◆ 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;
GLuint GLuint end

◆ GRADIENT_STOPTABLE_SIZE

#define GRADIENT_STOPTABLE_SIZE   1024

Definition at line 309 of file qdrawhelper_p.h.

◆ GRADIENT_STOPTABLE_SIZE_SHIFT

#define GRADIENT_STOPTABLE_SIZE_SHIFT   10

Definition at line 310 of file qdrawhelper_p.h.

◆ MIX

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

Definition at line 1058 of file qdrawhelper_p.h.

◆ Q_DECL_RESTRICT

#define Q_DECL_RESTRICT

Definition at line 83 of file qdrawhelper_p.h.

◆ Q_DECL_VECTORCALL

#define Q_DECL_VECTORCALL

Definition at line 84 of file qdrawhelper_p.h.

◆ 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.

Typedef Documentation

◆ AlphamapBlitFunc

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

Definition at line 120 of file qdrawhelper_p.h.

◆ AlphaRGBBlitFunc

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

Definition at line 126 of file qdrawhelper_p.h.

◆ BitmapBlitFunc

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

Definition at line 115 of file qdrawhelper_p.h.

◆ CompositionFunction

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

Definition at line 198 of file qdrawhelper_p.h.

◆ CompositionFunction64

typedef void(QT_FASTCALL * CompositionFunction64) (QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)

Definition at line 199 of file qdrawhelper_p.h.

◆ CompositionFunctionFP

typedef void(QT_FASTCALL * CompositionFunctionFP) (QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)

Definition at line 200 of file qdrawhelper_p.h.

◆ CompositionFunctionSolid

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

Definition at line 201 of file qdrawhelper_p.h.

◆ CompositionFunctionSolid64

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

Definition at line 202 of file qdrawhelper_p.h.

◆ CompositionFunctionSolidFP

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

Definition at line 203 of file qdrawhelper_p.h.

◆ DestFetchProc

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

Definition at line 225 of file qdrawhelper_p.h.

◆ DestFetchProc64

typedef QRgba64*(QT_FASTCALL * DestFetchProc64) (QRgba64 *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)

Definition at line 226 of file qdrawhelper_p.h.

◆ DestFetchProcFP

typedef QRgbaFloat32*(QT_FASTCALL * DestFetchProcFP) (QRgbaFloat32 *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)

Definition at line 227 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 228 of file qdrawhelper_p.h.

◆ DestStoreProc64

typedef void(QT_FASTCALL * DestStoreProc64) (QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length)

Definition at line 229 of file qdrawhelper_p.h.

◆ DestStoreProcFP

typedef void(QT_FASTCALL * DestStoreProcFP) (QRasterBuffer *rasterBuffer, int x, int y, const QRgbaFloat32 *buffer, int length)

Definition at line 230 of file qdrawhelper_p.h.

◆ ProcessSpans

Definition at line 114 of file qdrawhelper_p.h.

◆ QRgbaFloat32

typedef QRgbaFloat<float> QRgbaFloat32

Definition at line 112 of file qdrawhelper_p.h.

◆ QSpan

typedef QT_FT_Span QSpan
related

Definition at line 97 of file qdrawhelper_p.h.

◆ RectFillFunc

typedef void(* RectFillFunc) (QRasterBuffer *rasterBuffer, int x, int y, int width, int height, const QRgba64 &color)

Definition at line 132 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 231 of file qdrawhelper_p.h.

◆ SourceFetchProc64

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

Definition at line 232 of file qdrawhelper_p.h.

◆ SourceFetchProcFP

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

Definition at line 233 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 136 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 141 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 148 of file qdrawhelper_p.h.

Function Documentation

◆ comp_func_Plus_one_pixel()

uint comp_func_Plus_one_pixel ( uint  d,
const uint  s 
)
inline

Definition at line 1067 of file qdrawhelper_p.h.

Here is the caller graph for this function:

◆ comp_func_Plus_one_pixel_const_alpha()

uint 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 1061 of file qdrawhelper_p.h.

◆ qBlendGradient()

void qBlendGradient ( int  count,
const QSpan spans,
void userData 
)

Definition at line 4939 of file qdrawhelper.cpp.

Here is the caller graph for this function:

◆ qBlendTexture()

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

Definition at line 4816 of file qdrawhelper.cpp.

Here is the caller graph for this function:

◆ qConvertRgb16To32()

QRgb qConvertRgb16To32 ( uint  c)
inline

Definition at line 1005 of file qdrawhelper_p.h.

Here is the caller graph for this function:

◆ qConvertRgb32To16()

ushort qConvertRgb32To16 ( uint  c)
inline

Definition at line 998 of file qdrawhelper_p.h.

Here is the caller graph for this function:

◆ qt_memfill() [1/6]

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

Definition at line 972 of file qdrawhelper_p.h.

Here is the call graph for this function:

◆ qt_memfill() [2/6]

template<>
void qt_memfill ( quint24 dest,
quint24  color,
qsizetype  count 
)
inline

Definition at line 967 of file qdrawhelper_p.h.

Here is the call graph for this function:

◆ qt_memfill() [3/6]

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

Definition at line 962 of file qdrawhelper_p.h.

Here is the call graph for this function:

◆ qt_memfill() [4/6]

template<>
void qt_memfill ( quint64 dest,
quint64  color,
qsizetype  count 
)
inline

Definition at line 957 of file qdrawhelper_p.h.

Here is the call graph for this function:

◆ qt_memfill() [5/6]

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

Definition at line 977 of file qdrawhelper_p.h.

◆ qt_memfill() [6/6]

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

Definition at line 952 of file qdrawhelper_p.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qt_memfill16()

void qt_memfill16 ( quint16 dest,
quint16  value,
qsizetype  count 
)

Definition at line 6190 of file qdrawhelper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qt_memfill24()

void qt_memfill24 ( quint24 dest,
quint24  value,
qsizetype  count 
)

Definition at line 6148 of file qdrawhelper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qt_memfill32()

void qt_memfill32 ( quint32 dest,
quint32  value,
qsizetype  count 
)

Definition at line 6206 of file qdrawhelper.cpp.

Here is the caller graph for this function:

◆ qt_memfill64()

void qt_memfill64 ( quint64 dest,
quint64  value,
qsizetype  count 
)

Definition at line 6139 of file qdrawhelper.cpp.

Here is the caller graph for this function:

◆ qt_memfill_template()

template<class T >
void qt_memfill_template ( T dest,
T  color,
qsizetype  count 
)
inline

Definition at line 932 of file qdrawhelper_p.h.

Here is the caller graph for this function:

Variable Documentation

◆ qBlendFunctions

Definition at line 585 of file qblendfunctions.cpp.

◆ qDrawHelper

DrawHelper qDrawHelper[QImage::NImageFormats]
extern

Definition at line 5861 of file qdrawhelper.cpp.

◆ qScaleFunctions

Definition at line 584 of file qblendfunctions.cpp.

◆ qt_bayer_matrix

const uint qt_bayer_matrix[16][16]

Definition at line 1013 of file qdrawhelper_p.h.

◆ qTransformFunctions

Definition at line 586 of file qblendfunctions.cpp.