40 #ifndef QDRAWHELPER_P_H
41 #define QDRAWHELPER_P_H
54 #include <QtGui/private/qtguiglobal_p.h>
55 #include "QtCore/qmath.h"
56 #include "QtGui/qcolor.h"
57 #include "QtGui/qpainter.h"
58 #include "QtGui/qimage.h"
59 #include "QtGui/qrgba64.h"
60 #ifndef QT_FT_BEGIN_HEADER
61 #define QT_FT_BEGIN_HEADER
62 #define QT_FT_END_HEADER
64 #include "private/qpixellayout_p.h"
65 #include "private/qrasterdefs_p.h"
66 #include <private/qsimd_p.h>
68 #include <QtCore/qsharedpointer.h>
73 # define Q_DECL_RESTRICT __restrict__
74 # if defined(Q_PROCESSOR_X86_32) && defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
75 # define Q_DECL_VECTORCALL __attribute__((sseregparm,regparm(3)))
77 # define Q_DECL_VECTORCALL
79 #elif defined(Q_CC_MSVC)
80 # define Q_DECL_RESTRICT __restrict
81 # define Q_DECL_VECTORCALL __vectorcall
83 # define Q_DECL_RESTRICT
84 # define Q_DECL_VECTORCALL
87 static const uint AMASK = 0xff000000;
88 static const uint RMASK = 0x00ff0000;
89 static const uint GMASK = 0x0000ff00;
90 static const uint BMASK = 0x000000ff;
118 int mapWidth,
int mapHeight,
int mapStride);
123 int mapWidth,
int mapHeight,
int mapStride,
124 const QClipData *clip,
bool useGammaCorrection);
129 int mapWidth,
int mapHeight,
int mapStride,
130 const QClipData *clip,
bool useGammaCorrection);
142 const uchar *
src,
int spbl,
int srch,
145 const QRect &clipRect,
152 const QRect &clipRect,
309 #define GRADIENT_STOPTABLE_SIZE 1024
310 #define GRADIENT_STOPTABLE_SIZE_SHIFT 10
312 #if QT_CONFIG(raster_64bit) || QT_CONFIG(raster_fp)
399 ipos = ipos < 0 ?
limit + ipos : ipos;
418 return data->colorTable32[qt_gradient_clamp(
data, ipos)];
421 #if QT_CONFIG(raster_64bit)
425 return data->colorTable64[qt_gradient_clamp(
data, ipos)];
431 return (
b *
b) - (4 *
a *
c);
434 template <
class RadialFetchFunc,
typename BlendType>
static
435 const BlendType * QT_FASTCALL qt_fetch_radial_gradient_template(BlendType *
buffer,
const Operator *
op,
440 RadialFetchFunc::memfill(
buffer, RadialFetchFunc::null(),
length);
449 bool affine = !
data->m13 && !
data->m23;
453 rx -=
data->gradient.radial.focal.x;
454 ry -=
data->gradient.radial.focal.y;
461 qreal b = 2*(
op->radial.dr*
data->gradient.radial.focal.radius +
rx *
op->radial.dx +
ry *
op->radial.dy);
462 qreal delta_b = 2*(delta_rx *
op->radial.dx + delta_ry *
op->radial.dy);
463 const qreal b_delta_b = 2 *
b * delta_b;
464 const qreal delta_b_delta_b = 2 * delta_b * delta_b;
467 const qreal delta_bb = delta_b * delta_b;
473 const qreal delta_rxrxryry = delta_rx * delta_rx + delta_ry * delta_ry;
474 const qreal rx_plus_ry = 2*(
rx * delta_rx +
ry * delta_ry);
475 const qreal delta_rx_plus_ry = 2 * delta_rxrxryry;
479 qreal det = (bb - 4 *
op->radial.a * (
op->radial.sqrfr - rxrxryry)) * inv_a;
480 qreal delta_det = (b_delta_b + delta_bb + 4 *
op->radial.a * (rx_plus_ry + delta_rxrxryry)) * inv_a;
481 const qreal delta_delta_det = (delta_b_delta_b + 4 *
op->radial.a * delta_rx_plus_ry) * inv_a;
483 RadialFetchFunc::fetch(
buffer,
end,
op,
data, det, delta_det, delta_delta_det,
b, delta_b);
490 *
buffer = RadialFetchFunc::null();
492 qreal invRw = 1 / rw;
493 qreal gx =
rx * invRw -
data->gradient.radial.focal.x;
494 qreal gy =
ry * invRw -
data->gradient.radial.focal.y;
495 qreal b = 2*(
op->radial.dr*
data->gradient.radial.focal.radius + gx*
op->radial.dx + gy*
op->radial.dy);
496 qreal det = qRadialDeterminant(
op->radial.a,
b,
op->radial.sqrfr - (gx*gx + gy*gy));
498 BlendType
result = RadialFetchFunc::null();
507 if (
data->gradient.radial.focal.radius +
op->radial.dr *
s >= 0)
508 result = RadialFetchFunc::fetchSingle(
data->gradient,
s);
525 template <
class Simd>
529 static uint null() {
return 0; }
532 return qt_gradient_pixel(&gradient,
v);
541 typename Simd::Vect_buffer_f det_vec;
542 typename Simd::Vect_buffer_f delta_det4_vec;
543 typename Simd::Vect_buffer_f b_vec;
545 for (
int i = 0;
i < 4; ++
i) {
547 delta_det4_vec.f[
i] = 4 * delta_det;
551 delta_det += delta_delta_det;
555 const typename Simd::Float32x4 v_delta_delta_det16 = Simd::v_dup(16 * delta_delta_det);
556 const typename Simd::Float32x4 v_delta_delta_det6 = Simd::v_dup(6 * delta_delta_det);
557 const typename Simd::Float32x4 v_delta_b4 = Simd::v_dup(4 * delta_b);
559 const typename Simd::Float32x4 v_r0 = Simd::v_dup(
data->gradient.radial.focal.radius);
560 const typename Simd::Float32x4 v_dr = Simd::v_dup(
op->radial.dr);
562 #if defined(__ARM_NEON__)
566 const typename Simd::Float32x4 v_min = Simd::v_dup(0.0f);
569 const typename Simd::Float32x4 v_half = Simd::v_dup(0.5f);
576 const int extended_mask =
op->radial.extended ? 0x0 : ~0x0;
578 #define FETCH_RADIAL_LOOP_PROLOGUE \
579 while (buffer < end) { \
580 typename Simd::Vect_buffer_i v_buffer_mask; \
581 v_buffer_mask.v = Simd::v_greaterOrEqual(det_vec.v, v_min); \
582 const typename Simd::Float32x4 v_index_local = Simd::v_sub(Simd::v_sqrt(Simd::v_max(v_min, det_vec.v)), b_vec.v); \
583 const typename Simd::Float32x4 v_index = Simd::v_add(Simd::v_mul(v_index_local, v_max), v_half); \
584 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)); \
585 typename Simd::Vect_buffer_i index_vec;
586 #define FETCH_RADIAL_LOOP_CLAMP_REPEAT \
587 index_vec.v = Simd::v_and(v_repeat_mask, Simd::v_toInt(v_index));
588 #define FETCH_RADIAL_LOOP_CLAMP_REFLECT \
589 const typename Simd::Int32x4 v_index_i = Simd::v_and(v_reflect_mask, Simd::v_toInt(v_index)); \
590 const typename Simd::Int32x4 v_index_i_inv = Simd::v_sub(v_reflect_limit, v_index_i); \
591 index_vec.v = Simd::v_min_16(v_index_i, v_index_i_inv);
592 #define FETCH_RADIAL_LOOP_CLAMP_PAD \
593 index_vec.v = Simd::v_toInt(Simd::v_min(v_max, Simd::v_max(v_min, v_index)));
594 #define FETCH_RADIAL_LOOP_EPILOGUE \
595 det_vec.v = Simd::v_add(Simd::v_add(det_vec.v, delta_det4_vec.v), v_delta_delta_det6); \
596 delta_det4_vec.v = Simd::v_add(delta_det4_vec.v, v_delta_delta_det16); \
597 b_vec.v = Simd::v_add(b_vec.v, v_delta_b4); \
598 for (int i = 0; i < 4; ++i) \
599 *buffer++ = (extended_mask | v_buffer_mask.i[i]) & data->gradient.colorTable32[index_vec.i[i]]; \
602 #define FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP) \
603 FETCH_RADIAL_LOOP_PROLOGUE \
604 FETCH_RADIAL_LOOP_CLAMP \
605 FETCH_RADIAL_LOOP_EPILOGUE
607 switch (
data->gradient.spread) {
624 uint t = (
x & 0xff00ff) *
a + (
y & 0xff00ff) *
b;
625 t = (
t + ((
t >> 8) & 0xff00ff) + 0x800080) >> 8;
628 x = ((
x >> 8) & 0xff00ff) *
a + ((
y >> 8) & 0xff00ff) *
b;
629 x = (
x + ((
x >> 8) & 0xff00ff) + 0x800080);
635 #if Q_PROCESSOR_WORDSIZE == 8
641 t &= 0x00ff00ff00ff00ff;
647 t = (
t + ((
t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080) >> 8;
648 t &= 0x00ff00ff00ff00ff;
655 uint t = (
x & 0xff00ff) *
a + (
y & 0xff00ff) *
b;
659 x = ((
x >> 8) & 0xff00ff) *
a + ((
y >> 8) & 0xff00ff) *
b;
667 t = (
t + ((
t >> 8) & 0xff00ff) + 0x800080) >> 8;
670 x = ((
x >> 8) & 0xff00ff) *
a;
671 x = (
x + ((
x >> 8) & 0xff00ff) + 0x800080);
680 if (
src >= 0xff000000)
688 if (const_alpha == 255)
689 return blend_pixel(
dst,
src);
696 #if defined(__SSE2__)
700 vt = _mm_unpacklo_epi8(vt, _mm_setzero_si128());
701 vb = _mm_unpacklo_epi8(vb, _mm_setzero_si128());
702 vt = _mm_mullo_epi16(vt, _mm_set1_epi16(256 - disty));
703 vb = _mm_mullo_epi16(vb, _mm_set1_epi16(disty));
704 __m128i vlr = _mm_add_epi16(vt, vb);
705 vlr = _mm_srli_epi16(vlr, 8);
709 const __m128i vidistx = _mm_shufflelo_epi16(_mm_cvtsi32_si128(256 - distx), _MM_SHUFFLE(0, 0, 0, 0));
710 const __m128i vdistx = _mm_shufflelo_epi16(_mm_cvtsi32_si128(distx), _MM_SHUFFLE(0, 0, 0, 0));
711 const __m128i vmulx = _mm_unpacklo_epi16(vidistx, vdistx);
712 vlr = _mm_unpacklo_epi16(vlr, _mm_srli_si128(vlr, 8));
714 vlr = _mm_madd_epi16(vlr, vmulx);
715 vlr = _mm_srli_epi32(vlr, 8);
716 vlr = _mm_packs_epi32(vlr, vlr);
717 vlr = _mm_packus_epi16(vlr, vlr);
718 return _mm_cvtsi128_si32(vlr);
723 __m128i vt = _mm_unpacklo_epi32(_mm_cvtsi32_si128(tl), _mm_cvtsi32_si128(
tr));
724 __m128i vb = _mm_unpacklo_epi32(_mm_cvtsi32_si128(bl), _mm_cvtsi32_si128(br));
725 return interpolate_4_pixels_sse2(vt, vb, distx, disty);
730 __m128i vt = _mm_loadl_epi64((
const __m128i*)
t);
731 __m128i vb = _mm_loadl_epi64((
const __m128i*)
b);
732 return interpolate_4_pixels_sse2(vt, vb, distx, disty);
735 static constexpr
inline bool hasFastInterpolate4() {
return true; }
737 #elif defined(__ARM_NEON__)
738 static inline uint interpolate_4_pixels_neon(uint32x2_t vt32, uint32x2_t vb32,
uint distx,
uint disty)
740 uint16x8_t vt16 = vmovl_u8(vreinterpret_u8_u32(vt32));
741 uint16x8_t vb16 = vmovl_u8(vreinterpret_u8_u32(vb32));
742 vt16 = vmulq_n_u16(vt16, 256 - disty);
743 vt16 = vmlaq_n_u16(vt16, vb16, disty);
744 vt16 = vshrq_n_u16(vt16, 8);
745 uint16x4_t vl16 = vget_low_u16(vt16);
746 uint16x4_t vr16 = vget_high_u16(vt16);
747 vl16 = vmul_n_u16(vl16, 256 - distx);
748 vl16 = vmla_n_u16(vl16, vr16, distx);
749 vl16 = vshr_n_u16(vl16, 8);
750 uint8x8_t vr = vmovn_u16(vcombine_u16(vl16, vl16));
751 return vget_lane_u32(vreinterpret_u32_u8(vr), 0);
756 uint32x2_t vt32 = vmov_n_u32(tl);
757 uint32x2_t vb32 = vmov_n_u32(bl);
758 vt32 = vset_lane_u32(
tr, vt32, 1);
759 vb32 = vset_lane_u32(br, vb32, 1);
760 return interpolate_4_pixels_neon(vt32, vb32, distx, disty);
765 uint32x2_t vt32 = vld1_u32(
t);
766 uint32x2_t vb32 = vld1_u32(
b);
767 return interpolate_4_pixels_neon(vt32, vb32, distx, disty);
770 static constexpr
inline bool hasFastInterpolate4() {
return true; }
775 uint idistx = 256 - distx;
776 uint idisty = 256 - disty;
777 uint xtop = INTERPOLATE_PIXEL_256(tl, idistx,
tr, distx);
778 uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx);
779 return INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty);
784 return interpolate_4_pixels(
t[0],
t[1],
b[0],
b[1], distx, disty);
787 static constexpr
inline bool hasFastInterpolate4() {
return false; }
794 (rgba64.
green() * alpha256) >> 8,
795 (rgba64.
blue() * alpha256) >> 8,
796 (rgba64.
alpha() * alpha256) >> 8);
806 __m128i vt = _mm_loadu_si128((
const __m128i*)
t);
808 __m128i vb = _mm_loadu_si128((
const __m128i*)
b);
809 vt = _mm_mulhi_epu16(vt, _mm_set1_epi16(0x10000 - disty));
810 vb = _mm_mulhi_epu16(vb, _mm_set1_epi16(disty));
811 vt = _mm_add_epi16(vt, vb);
814 const __m128i vdistx = _mm_shufflelo_epi16(_mm_cvtsi32_si128(distx), _MM_SHUFFLE(0, 0, 0, 0));
815 const __m128i vidistx = _mm_shufflelo_epi16(_mm_cvtsi32_si128(0x10000 - distx), _MM_SHUFFLE(0, 0, 0, 0));
816 vt = _mm_mulhi_epu16(vt, _mm_unpacklo_epi64(vidistx, vdistx));
817 vt = _mm_add_epi16(vt, _mm_srli_si128(vt, 8));
819 #ifdef Q_PROCESSOR_X86_64
823 _mm_storel_epi64((__m128i*)&
out, vt);
827 #elif defined(__ARM_NEON__)
830 uint64x1x2_t vt = vld2_u64(
reinterpret_cast<const uint64_t *
>(
t));
832 uint64x1x2_t vb = vld2_u64(
reinterpret_cast<const uint64_t *
>(
b));
833 uint32x4_t vt0 = vmull_n_u16(vreinterpret_u16_u64(vt.val[0]), 0x10000 - disty);
834 uint32x4_t vt1 = vmull_n_u16(vreinterpret_u16_u64(vt.val[1]), 0x10000 - disty);
835 vt0 = vmlal_n_u16(vt0, vreinterpret_u16_u64(vb.val[0]), disty);
836 vt1 = vmlal_n_u16(vt1, vreinterpret_u16_u64(vb.val[1]), disty);
837 vt.val[0] = vreinterpret_u64_u16(vshrn_n_u32(vt0, 16));
838 vt.val[1] = vreinterpret_u64_u16(vshrn_n_u32(vt1, 16));
841 uint32x4_t vt0 = vmull_n_u16(vreinterpret_u16_u64(vt.val[0]), 0x10000 - distx);
842 vt0 = vmlal_n_u16(vt0, vreinterpret_u16_u64(vt.val[1]), distx);
843 vt.val[0] = vreinterpret_u64_u16(vshrn_n_u32(vt0, 16));
846 vst1_u64(
reinterpret_cast<uint64_t *
>(&
out), vt.val[0]);
852 const uint dx = distx>>8;
853 const uint dy = disty>>8;
855 const uint idy = 256 - dy;
858 return interpolate256(xtop, idy, xbot, dy);
862 #if QT_CONFIG(raster_fp)
870 x = multiplyAlpha_rgba32f(
x, alpha1);
871 y = multiplyAlpha_rgba32f(
y, alpha2);
875 static inline __m128
Q_DECL_VECTORCALL interpolate_rgba32f(__m128
x, __m128 alpha1, __m128
y, __m128 alpha2)
877 return _mm_add_ps(_mm_mul_ps(
x, alpha1), _mm_mul_ps(
y, alpha2));
883 constexpr
float f = 1.0f / 65536.0f;
884 const float dx = distx *
f;
885 const float dy = disty *
f;
886 const float idx = 1.0f - dx;
887 const float idy = 1.0f - dy;
889 const __m128 vtl = _mm_load_ps((
const float *)&
t[0]);
890 const __m128 vtr = _mm_load_ps((
const float *)&
t[1]);
891 const __m128
vbl = _mm_load_ps((
const float *)&
b[0]);
892 const __m128 vbr = _mm_load_ps((
const float *)&
b[1]);
894 const __m128 vdx = _mm_set1_ps(dx);
895 const __m128 vidx = _mm_set1_ps(
idx);
896 __m128 vt = interpolate_rgba32f(vtl, vidx, vtr, vdx);
897 __m128 vb = interpolate_rgba32f(
vbl, vidx, vbr, vdx);
898 const __m128 vdy = _mm_set1_ps(dy);
899 const __m128 vidy = _mm_set1_ps(idy);
900 vt = interpolate_rgba32f(vt, vidy, vb, vdy);
902 _mm_store_ps((
float*)&
res, vt);
907 xtop = interpolate_rgba32f(xtop, idy, xbot, dy);
915 uint t = (((
x & 0x07e0)*
a) >> 8) & 0x07e0;
916 t |= (((
x & 0xf81f)*(
a>>2)) >> 6) & 0xf81f;
921 uint t = (((
x & 0xf81f07e0) >> 5)*
a) & 0xf81f07e0;
922 t |= (((
x & 0x07e0f81f)*
a) >> 5) & 0x07e0f81f;
927 static constexpr
inline int qt_div_255(
int x) {
return (
x + (
x>>8) + 0x80) >> 8; }
928 static constexpr
inline uint qt_div_257_floor(
uint x) {
return (
x - (
x >> 8)) >> 8; }
929 static constexpr
inline uint qt_div_257(
uint x) {
return qt_div_257_floor(
x + 128); }
930 static constexpr
inline uint qt_div_65535(
uint x) {
return (
x + (
x>>16) + 0x8000U) >> 16; }
938 switch (
count & 0x07)
947 case 1: *dest++ =
color;
982 template <
class T>
static
983 inline void qt_rectfill(
T *dest,
T value,
986 char *
d =
reinterpret_cast<char*
>(dest +
x) +
y *
stride;
991 dest =
reinterpret_cast<T*
>(
d);
1000 return (((
c) >> 3) & 0x001f)
1001 | (((
c) >> 5) & 0x07e0)
1002 | (((
c) >> 8) & 0xf800);
1008 | ((((
c) << 3) & 0xf8) | (((
c) >> 2) & 0x7))
1009 | ((((
c) << 5) & 0xfc00) | (((
c) >> 1) & 0x300))
1010 | ((((
c) << 8) & 0xf80000) | (((
c) << 3) & 0x70000));
1014 { 0x1, 0xc0, 0x30, 0xf0, 0xc, 0xcc, 0x3c, 0xfc,
1015 0x3, 0xc3, 0x33, 0xf3, 0xf, 0xcf, 0x3f, 0xff},
1016 { 0x80, 0x40, 0xb0, 0x70, 0x8c, 0x4c, 0xbc, 0x7c,
1017 0x83, 0x43, 0xb3, 0x73, 0x8f, 0x4f, 0xbf, 0x7f},
1018 { 0x20, 0xe0, 0x10, 0xd0, 0x2c, 0xec, 0x1c, 0xdc,
1019 0x23, 0xe3, 0x13, 0xd3, 0x2f, 0xef, 0x1f, 0xdf},
1020 { 0xa0, 0x60, 0x90, 0x50, 0xac, 0x6c, 0x9c, 0x5c,
1021 0xa3, 0x63, 0x93, 0x53, 0xaf, 0x6f, 0x9f, 0x5f},
1022 { 0x8, 0xc8, 0x38, 0xf8, 0x4, 0xc4, 0x34, 0xf4,
1023 0xb, 0xcb, 0x3b, 0xfb, 0x7, 0xc7, 0x37, 0xf7},
1024 { 0x88, 0x48, 0xb8, 0x78, 0x84, 0x44, 0xb4, 0x74,
1025 0x8b, 0x4b, 0xbb, 0x7b, 0x87, 0x47, 0xb7, 0x77},
1026 { 0x28, 0xe8, 0x18, 0xd8, 0x24, 0xe4, 0x14, 0xd4,
1027 0x2b, 0xeb, 0x1b, 0xdb, 0x27, 0xe7, 0x17, 0xd7},
1028 { 0xa8, 0x68, 0x98, 0x58, 0xa4, 0x64, 0x94, 0x54,
1029 0xab, 0x6b, 0x9b, 0x5b, 0xa7, 0x67, 0x97, 0x57},
1030 { 0x2, 0xc2, 0x32, 0xf2, 0xe, 0xce, 0x3e, 0xfe,
1031 0x1, 0xc1, 0x31, 0xf1, 0xd, 0xcd, 0x3d, 0xfd},
1032 { 0x82, 0x42, 0xb2, 0x72, 0x8e, 0x4e, 0xbe, 0x7e,
1033 0x81, 0x41, 0xb1, 0x71, 0x8d, 0x4d, 0xbd, 0x7d},
1034 { 0x22, 0xe2, 0x12, 0xd2, 0x2e, 0xee, 0x1e, 0xde,
1035 0x21, 0xe1, 0x11, 0xd1, 0x2d, 0xed, 0x1d, 0xdd},
1036 { 0xa2, 0x62, 0x92, 0x52, 0xae, 0x6e, 0x9e, 0x5e,
1037 0xa1, 0x61, 0x91, 0x51, 0xad, 0x6d, 0x9d, 0x5d},
1038 { 0xa, 0xca, 0x3a, 0xfa, 0x6, 0xc6, 0x36, 0xf6,
1039 0x9, 0xc9, 0x39, 0xf9, 0x5, 0xc5, 0x35, 0xf5},
1040 { 0x8a, 0x4a, 0xba, 0x7a, 0x86, 0x46, 0xb6, 0x76,
1041 0x89, 0x49, 0xb9, 0x79, 0x85, 0x45, 0xb5, 0x75},
1042 { 0x2a, 0xea, 0x1a, 0xda, 0x26, 0xe6, 0x16, 0xd6,
1043 0x29, 0xe9, 0x19, 0xd9, 0x25, 0xe5, 0x15, 0xd5},
1044 { 0xaa, 0x6a, 0x9a, 0x5a, 0xa6, 0x66, 0x96, 0x56,
1045 0xa9, 0x69, 0x99, 0x59, 0xa5, 0x65, 0x95, 0x55}
1048 #define ARGB_COMBINE_ALPHA(argb, alpha) \
1049 ((((argb >> 24) * alpha) >> 8) << 24) | (argb & 0x00ffffff)
1052 #if Q_PROCESSOR_WORDSIZE == 8
1053 #define AMIX(mask) (qMin(((quint64(s)&mask) + (quint64(d)&mask)), quint64(mask)))
1054 #define MIX(mask) (qMin(((quint64(s)&mask) + (quint64(d)&mask)), quint64(mask)))
1057 #define AMIX(mask) quint32(qMin(((quint64(s)&mask) + (quint64(d)&mask)), quint64(mask)))
1058 #define MIX(mask) (qMin(((quint32(s)&mask) + (quint32(d)&mask)), quint32(mask)))
1064 return INTERPOLATE_PIXEL_255(
result, const_alpha,
d, one_minus_const_alpha);
small capitals from c petite p scientific i
[1]
The QBrush class defines the fill pattern of shapes drawn by QPainter.
The QGradient class is used in combination with QBrush to specify gradient fills.
The QImage class provides a hardware-independent image representation that allows direct access to th...
static void memfill(uint *buffer, uint fill, int length)
static void fetch(uint *buffer, uint *end, const Operator *op, const QSpanData *data, qreal det, qreal delta_det, qreal delta_delta_det, qreal b, qreal delta_b)
static uint fetchSingle(const QGradientData &gradient, qreal v)
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded ...
The QRectF class defines a finite rectangle in the plane using floating point precision.
The QRect class defines a rectangle in the plane using integer precision.
constexpr quint16 red() const
constexpr quint16 alpha() const
constexpr quint16 green() const
constexpr static QRgba64 fromRgba64(quint64 c)
constexpr quint16 blue() const
The QSharedPointer class holds a strong reference to a shared pointer.
set set set set set set set macro pixldst1 op
void qt_memfill24(quint24 *dest, quint24 value, qsizetype count)
void(QT_FASTCALL * CompositionFunction64)(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
void(* RectFillFunc)(QRasterBuffer *rasterBuffer, int x, int y, int width, int height, const QRgba64 &color)
void qBlendTexture(int count, const QSpan *spans, void *userData)
DrawHelper qDrawHelper[QImage::NImageFormats]
void qt_memfill(T *dest, T value, qsizetype count)
uint comp_func_Plus_one_pixel_const_alpha(uint d, const uint s, const uint const_alpha, const uint one_minus_const_alpha)
#define FETCH_RADIAL_LOOP_CLAMP_PAD
void(QT_FASTCALL * CompositionFunctionSolid)(uint *dest, int length, uint color, uint const_alpha)
void(QT_FASTCALL * CompositionFunction)(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
#define FETCH_RADIAL_LOOP_CLAMP_REPEAT
void qBlendGradient(int count, const QSpan *spans, void *userData)
QRgba64 *(QT_FASTCALL * DestFetchProc64)(QRgba64 *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
const uint *(QT_FASTCALL * SourceFetchProc)(uint *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)
void(* SrcOverBlendFunc)(uchar *destPixels, int dbpl, const uchar *src, int spbl, int w, int h, int const_alpha)
void(QT_FASTCALL * DestStoreProcFP)(QRasterBuffer *rasterBuffer, int x, int y, const QRgbaFloat32 *buffer, int length)
void qt_memfill16(quint16 *dest, quint16 value, qsizetype count)
ushort qConvertRgb32To16(uint c)
#define FETCH_RADIAL_LOOP_CLAMP_REFLECT
void(QT_FASTCALL * DestStoreProc)(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats]
QT_FT_SpanFunc ProcessSpans
QRgbaFloat< float > QRgbaFloat32
void(* BitmapBlitFunc)(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 &color, const uchar *bitmap, int mapWidth, int mapHeight, int mapStride)
#define FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP)
const QRgba64 *(QT_FASTCALL * SourceFetchProc64)(QRgba64 *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)
void qt_memfill32(quint32 *dest, quint32 value, qsizetype count)
SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats]
void(QT_FASTCALL * CompositionFunctionFP)(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
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)
void(QT_FASTCALL * CompositionFunctionSolid64)(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
uint comp_func_Plus_one_pixel(uint d, const uint s)
#define GRADIENT_STOPTABLE_SIZE_SHIFT
QRgbaFloat32 *(QT_FASTCALL * DestFetchProcFP)(QRgbaFloat32 *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
const QRgbaFloat32 *(QT_FASTCALL * SourceFetchProcFP)(QRgbaFloat32 *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)
void(QT_FASTCALL * CompositionFunctionSolidFP)(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
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)
#define GRADIENT_STOPTABLE_SIZE
uint *QT_FASTCALL * DestFetchProc(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
void(QT_FASTCALL * DestStoreProc64)(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length)
const uint qt_bayer_matrix[16][16]
QRgb qConvertRgb16To32(uint c)
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)
void qt_memfill_template(T *dest, T color, qsizetype count)
SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats]
void qt_memfill64(quint64 *dest, quint64 value, qsizetype count)
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)
#define Q_DECL_VECTORCALL
EGLOutputLayerEXT EGLint EGLAttrib value
bool qFuzzyIsNull(qfloat16 f) noexcept
QT_BEGIN_INCLUDE_NAMESPACE typedef unsigned char uchar
QT_END_INCLUDE_NAMESPACE typedef double qreal
unsigned long long quint64
GLenum GLuint GLenum GLsizei length
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
GLenum GLenum GLsizei count
const void GLsizei GLsizei stride
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat GLfloat GLfloat GLfloat h
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s0
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
GLfloat GLfloat GLfloat alpha
void(* QT_FT_SpanFunc)(int count, const QT_FT_Span *spans, void *worker)
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
QTextStream out(stdout)
[7]
AlphaRGBBlitFunc alphaRGBBlit
AlphamapBlitFunc alphamapBlit
BitmapBlitFunc bitmapBlit
LinearGradientValues linear
CompositionFunction64 func64
DestStoreProcFP destStoreFP
CompositionFunctionSolidFP funcSolidFP
CompositionFunctionSolid funcSolid
DestStoreProc64 destStore64
SourceFetchProcFP srcFetchFP
SourceFetchProc64 srcFetch64
QPainter::CompositionMode mode
CompositionFunctionFP funcFP
DestFetchProcFP destFetchFP
DestFetchProc64 destFetch64
RadialGradientValues radial
CompositionFunctionSolid64 funcSolid64
struct QConicalGradientData::@537 center
QRadialGradientData radial
const QRgb * colorTable32
QLinearGradientData linear
QConicalGradientData conical
struct QLinearGradientData::@534 end
struct QLinearGradientData::@533 origin
struct QRadialGradientData::@536 focal
struct QRadialGradientData::@535 center
void setup(const QBrush &brush, int alpha, QPainter::CompositionMode compositionMode)
AlphaRGBBlitFunc alphaRGBBlit
QRasterBuffer * rasterBuffer
void initTexture(const QImage *image, int alpha, QTextureData::Type=QTextureData::Plain, const QRect &sourceRect=QRect())
BitmapBlitFunc bitmapBlit
enum QSpanData::Type type
ProcessSpans unclipped_blend
void init(QRasterBuffer *rb, const QRasterPaintEngine *pe)
AlphamapBlitFunc alphamapBlit
QSharedPointer< const Pinnable > cachedGradient
void setupMatrix(const QTransform &matrix, int bilinear)
const uchar * scanLine(int y) const
const QList< QRgb > * colorTable