42 #include <private/qdrawhelper_p.h> 43 #include <private/qpaintengine_raster_p.h> 44 #include <private/qpainter_p.h> 45 #include <private/qdrawhelper_x86_p.h> 46 #ifdef QT_HAVE_ARM_SIMD 47 #include <private/qdrawhelper_arm_simd_p.h> 49 #include <private/qdrawhelper_neon_p.h> 50 #include <private/qmath_p.h> 56 #define MASK(src, a) src = BYTE_MUL(src, a) 58 #if defined(Q_OS_IRIX) && defined(Q_CC_GNU) && __GNUC__ == 3 && __GNUC__ < 4 && QT_POINTER_SIZE == 8 59 #define Q_IRIX_GCC3_3_WORKAROUND 63 static uint gccBug(
uint value) __attribute__((noinline));
91 const uint *
end = buffer + length;
92 while (buffer < end) {
103 uint *start = buffer;
104 const uint *
end = buffer + length;
105 while (buffer < end) {
116 for (
int i = 0; i < length; ++i)
117 buffer[i] =
PREMUL(data[i]);
129 for (
int i = 0; i < length; ++i)
136 int x,
int y,
int length)
138 const DST *src =
reinterpret_cast<DST*
>(rasterBuffer->
scanLine(y)) + x;
145 # define SPANFUNC_POINTER_DESTFETCH(Arg) destFetch<Arg> 179 int b =
qBlue(color);
183 rx = r -
qRed(color_0);
185 bx = b -
qBlue(color_0);
186 dist_0 = rx*rx + gx*gx + bx*bx;
188 rx = r -
qRed(color_1);
190 bx = b -
qBlue(color_1);
191 dist_1 = rx*rx + gx*gx + bx*bx;
206 for (
int i = 0; i < length; ++i) {
208 data[x >> 3] &= ~(0x80 >> (x & 7));
209 }
else if (buffer[i] == rasterBuffer->
destColor1) {
210 data[x >> 3] |= 0x80 >> (x & 7);
212 data[x >> 3] &= ~(0x80 >> (x & 7));
214 data[x >> 3] |= 0x80 >> (x & 7);
219 for (
int i = 0; i < length; ++i) {
221 data[x >> 3] |= 0x80 >> (x & 7);
223 data[x >> 3] &= ~(0x80 >> (x & 7));
233 for (
int i = 0; i < length; ++i) {
235 data[x >> 3] &= ~(1 << (x & 7));
236 }
else if (buffer[i] == rasterBuffer->
destColor1) {
237 data[x >> 3] |= 1 << (x & 7);
239 data[x >> 3] &= ~(1 << (x & 7));
241 data[x >> 3] |= 1 << (x & 7);
246 for (
int i = 0; i < length; ++i) {
248 data[x >> 3] |= 1 << (x & 7);
250 data[x >> 3] &= ~(1 << (x & 7));
259 for (
int i = 0; i < length; ++i) {
267 int inv_alpha = 0xff0000/
qAlpha(buffer[i]);
268 data[i] = (p & 0xff000000)
269 | ((
qRed(p)*inv_alpha) & 0xff0000)
270 | (((
qGreen(p)*inv_alpha) >> 8) & 0xff00)
271 | ((
qBlue(p)*inv_alpha) >> 16);
279 qt_memconvert<quint16, quint32>(
data, buffer, length);
285 const uint *buffer,
int length)
287 DST *dest =
reinterpret_cast<DST*
>(rasterBuffer->
scanLine(y)) + x;
290 *dest++ = DST(*src++);
293 # define SPANFUNC_POINTER_DESTSTORE(DEST) destStore<DEST> 330 template <QImage::Format format>
338 bool pixel = scanLine[x>>3] & (0x80 >> (x & 7));
339 if (rgb)
return PREMUL(rgb->
at(pixel ? 1 : 0));
340 return pixel ? 0xff000000 : 0xffffffff;
348 bool pixel = scanLine[x>>3] & (0x1 << (x & 7));
349 if (rgb)
return PREMUL(rgb->
at(pixel ? 1 : 0));
350 return pixel ? 0xff000000 : 0xffffffff;
358 return PREMUL(rgb->
at(scanLine[x]));
374 return ((
const uint *)scanLine)[x];
392 return qt_colorConvert<quint32, qargb8565>(color, 0);
401 const qrgb666 color =
reinterpret_cast<const qrgb666*
>(scanLine)[x];
402 return qt_colorConvert<quint32, qrgb666>(color, 0);
412 return qt_colorConvert<quint32, qargb6666>(color, 0);
421 const qrgb555 color =
reinterpret_cast<const qrgb555*
>(scanLine)[x];
422 return qt_colorConvert<quint32, qrgb555>(color, 0);
432 return qt_colorConvert<quint32, qargb8555>(color, 0);
441 const qrgb888 color =
reinterpret_cast<const qrgb888*
>(scanLine)[x];
442 return qt_colorConvert<quint32, qrgb888>(color, 0);
451 const qrgb444 color =
reinterpret_cast<const qrgb444*
>(scanLine)[x];
452 return qt_colorConvert<quint32, qrgb444>(color, 0);
462 return qt_colorConvert<quint32, qargb4444>(color, 0);
476 #define SPANFUNC_POINTER_FETCHPIXEL(Arg) qt_fetchPixel<QImage::Arg> 509 template <QImage::Format format>
511 int y,
int x,
int length)
514 for (
int i = 0; i < length; ++i)
521 qt_fetchUntransformed<QImage::Format_ARGB32_Premultiplied>(
uint *,
const Operator *,
525 const uchar *scanLine = data->texture.scanLine(y);
526 return ((
const uint *)scanLine) + x;
529 template<TextureBlendType blendType>
532 int y,
int x,
int length)
540 const qreal cy = y +
qreal(0.5);
542 const uint *
end = buffer + length;
549 int fx = int((data->
m21 * cy
551 int fy = int((data->
m22 * cy
561 if (px < 0) px += image_width;
562 if (py < 0) py += image_height;
567 if ((px < 0) || (px >= image_width)
568 || (py < 0) || (py >= image_height)) {
580 const qreal fdx = data->
m11;
581 const qreal fdy = data->
m12;
582 const qreal fdw = data->
m13;
584 qreal fx = data->
m21 * cy + data->
m11 * cx + data->
dx;
585 qreal fy = data->
m22 * cy + data->
m12 * cx + data->
dy;
586 qreal fw = data->
m23 * cy + data->
m13 * cx + data->
m33;
589 const qreal iw = fw == 0 ? 1 : 1 / fw;
590 const qreal tx = fx * iw;
591 const qreal ty = fy * iw;
592 int px = int(tx) - (tx < 0);
593 int py = int(ty) - (ty < 0);
598 if (px < 0) px += image_width;
599 if (py < 0) py += image_height;
604 if ((px < 0) || (px >= image_width)
605 || (py < 0) || (py >= image_height)) {
632 uint distxy = distx * disty;
635 uint tlrb = (tl & 0x00ff00ff) * (16*16 - 16*distx - 16*disty + distxy);
636 uint tlag = ((tl & 0xff00ff00) >> 8) * (16*16 - 16*distx - 16*disty + distxy);
637 uint trrb = ((tr & 0x00ff00ff) * (distx*16 - distxy));
638 uint trag = (((tr & 0xff00ff00) >> 8) * (distx*16 - distxy));
639 uint blrb = ((bl & 0x00ff00ff) * (disty*16 - distxy));
640 uint blag = (((bl & 0xff00ff00) >> 8) * (disty*16 - distxy));
641 uint brrb = ((br & 0x00ff00ff) * (distxy));
642 uint brag = (((br & 0xff00ff00) >> 8) * (distxy));
643 return (((tlrb + trrb + blrb + brrb) >> 8) & 0x00ff00ff) | ((tlag + trag + blag + brag) & 0xff00ff00);
646 #if defined(QT_ALWAYS_HAVE_SSE2) 647 #define interpolate_4_pixels_16_sse2(tl, tr, bl, br, distx, disty, colorMask, v_256, b) \ 649 const __m128i dxdy = _mm_mullo_epi16 (distx, disty); \ 650 const __m128i distx_ = _mm_slli_epi16(distx, 4); \ 651 const __m128i disty_ = _mm_slli_epi16(disty, 4); \ 652 const __m128i idxidy = _mm_add_epi16(dxdy, _mm_sub_epi16(v_256, _mm_add_epi16(distx_, disty_))); \ 653 const __m128i dxidy = _mm_sub_epi16(distx_, dxdy); \ 654 const __m128i idxdy = _mm_sub_epi16(disty_, dxdy); \ 656 __m128i tlAG = _mm_srli_epi16(tl, 8); \ 657 __m128i tlRB = _mm_and_si128(tl, colorMask); \ 658 __m128i trAG = _mm_srli_epi16(tr, 8); \ 659 __m128i trRB = _mm_and_si128(tr, colorMask); \ 660 __m128i blAG = _mm_srli_epi16(bl, 8); \ 661 __m128i blRB = _mm_and_si128(bl, colorMask); \ 662 __m128i brAG = _mm_srli_epi16(br, 8); \ 663 __m128i brRB = _mm_and_si128(br, colorMask); \ 665 tlAG = _mm_mullo_epi16(tlAG, idxidy); \ 666 tlRB = _mm_mullo_epi16(tlRB, idxidy); \ 667 trAG = _mm_mullo_epi16(trAG, dxidy); \ 668 trRB = _mm_mullo_epi16(trRB, dxidy); \ 669 blAG = _mm_mullo_epi16(blAG, idxdy); \ 670 blRB = _mm_mullo_epi16(blRB, idxdy); \ 671 brAG = _mm_mullo_epi16(brAG, dxdy); \ 672 brRB = _mm_mullo_epi16(brRB, dxdy); \ 675 __m128i rAG =_mm_add_epi16(_mm_add_epi16(tlAG, trAG), _mm_add_epi16(blAG, brAG)); \ 676 __m128i rRB =_mm_add_epi16(_mm_add_epi16(tlRB, trRB), _mm_add_epi16(blRB, brRB)); \ 677 rAG = _mm_andnot_si128(colorMask, rAG); \ 678 rRB = _mm_srli_epi16(rRB, 8); \ 679 _mm_storeu_si128((__m128i*)(b), _mm_or_si128(rAG, rRB)); \ 683 #if defined(QT_ALWAYS_HAVE_NEON) 684 #define interpolate_4_pixels_16_neon(tl, tr, bl, br, distx, disty, disty_, colorMask, invColorMask, v_256, b) \ 686 const int16x8_t dxdy = vmulq_s16(distx, disty); \ 687 const int16x8_t distx_ = vshlq_n_s16(distx, 4); \ 688 const int16x8_t idxidy = vaddq_s16(dxdy, vsubq_s16(v_256, vaddq_s16(distx_, disty_))); \ 689 const int16x8_t dxidy = vsubq_s16(distx_, dxdy); \ 690 const int16x8_t idxdy = vsubq_s16(disty_, dxdy); \ 692 int16x8_t tlAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tl), 8)); \ 693 int16x8_t tlRB = vandq_s16(tl, colorMask); \ 694 int16x8_t trAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tr), 8)); \ 695 int16x8_t trRB = vandq_s16(tr, colorMask); \ 696 int16x8_t blAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bl), 8)); \ 697 int16x8_t blRB = vandq_s16(bl, colorMask); \ 698 int16x8_t brAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(br), 8)); \ 699 int16x8_t brRB = vandq_s16(br, colorMask); \ 701 int16x8_t rAG = vmulq_s16(tlAG, idxidy); \ 702 int16x8_t rRB = vmulq_s16(tlRB, idxidy); \ 703 rAG = vmlaq_s16(rAG, trAG, dxidy); \ 704 rRB = vmlaq_s16(rRB, trRB, dxidy); \ 705 rAG = vmlaq_s16(rAG, blAG, idxdy); \ 706 rRB = vmlaq_s16(rRB, blRB, idxdy); \ 707 rAG = vmlaq_s16(rAG, brAG, dxdy); \ 708 rRB = vmlaq_s16(rRB, brRB, dxdy); \ 710 rAG = vandq_s16(invColorMask, rAG); \ 711 rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8)); \ 712 vst1q_s16((int16_t*)(b), vorrq_s16(rAG, rRB)); \ 716 template<TextureBlendType blendType>
721 if (v1 < 0) v1 += max;
727 }
else if (v1 >= l2) {
738 template<TextureBlendType blendType, QImage::Format format>
741 int y,
int x,
int length)
743 #ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 746 fetch = qt_fetchPixel<format>;
762 const qreal cy = y +
qreal(0.5);
764 uint *
end = buffer + length;
771 int fx = int((data->
m21 * cy
773 int fy = int((data->
m22 * cy
782 fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2);
786 if (fdx <= fixed_scale && fdx > 0) {
787 int disty = (fy & 0x0000ffff) >> 8;
788 int idisty = 256 - disty;
796 quint32 intermediate_buffer[2][buffer_size + 2];
798 int count =
qCeil(length * data->
m11) + 2;
804 if (x < 0) x += image_width;
806 lim =
qMin(count, image_x2-x+1);
811 quint32 rb = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff;
812 quint32 ag = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
814 intermediate_buffer[0][f] = rb;
815 intermediate_buffer[1][f] = ag;
818 }
while (x < image_x1 && f < lim);
824 #if defined(QT_ALWAYS_HAVE_SSE2) 825 const __m128i disty_ = _mm_set1_epi16(disty);
826 const __m128i idisty_ = _mm_set1_epi16(idisty);
827 const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
830 for (; f < lim; x += 4, f += 4) {
832 __m128i top = _mm_loadu_si128((__m128i*)((
const uint *)(s1)+x));
833 __m128i topAG = _mm_srli_epi16(top, 8);
834 __m128i topRB = _mm_and_si128(top, colorMask);
836 topAG = _mm_mullo_epi16 (topAG, idisty_);
837 topRB = _mm_mullo_epi16 (topRB, idisty_);
840 __m128i bottom = _mm_loadu_si128((__m128i*)((
const uint *)(s2)+x));
841 __m128i bottomAG = _mm_srli_epi16(bottom, 8);
842 __m128i bottomRB = _mm_and_si128(bottom, colorMask);
843 bottomAG = _mm_mullo_epi16 (bottomAG, disty_);
844 bottomRB = _mm_mullo_epi16 (bottomRB, disty_);
847 __m128i rAG =_mm_add_epi16(topAG, bottomAG);
848 rAG = _mm_srli_epi16(rAG, 8);
849 _mm_storeu_si128((__m128i*)(&intermediate_buffer[1][f]), rAG);
850 __m128i rRB =_mm_add_epi16(topRB, bottomRB);
851 rRB = _mm_srli_epi16(rRB, 8);
852 _mm_storeu_si128((__m128i*)(&intermediate_buffer[0][f]), rRB);
854 #elif defined(QT_ALWAYS_HAVE_NEON) 855 const int16x8_t disty_ = vdupq_n_s16(disty);
856 const int16x8_t idisty_ = vdupq_n_s16(idisty);
857 const int16x8_t colorMask = vdupq_n_s16(0x00ff);
860 for (; f < lim; x += 4, f += 4) {
862 int16x8_t top = vld1q_s16((int16_t*)((
const uint *)(s1)+x));
863 int16x8_t topAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(top), 8));
864 int16x8_t topRB = vandq_s16(top, colorMask);
866 topAG = vmulq_s16(topAG, idisty_);
867 topRB = vmulq_s16(topRB, idisty_);
870 int16x8_t bottom = vld1q_s16((int16_t*)((
const uint *)(s2)+x));
871 int16x8_t bottomAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bottom), 8));
872 int16x8_t bottomRB = vandq_s16(bottom, colorMask);
873 bottomAG = vmulq_s16(bottomAG, disty_);
874 bottomRB = vmulq_s16(bottomRB, disty_);
877 int16x8_t rAG = vaddq_s16(topAG, bottomAG);
878 rAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rAG), 8));
879 vst1q_s16((int16_t*)(&intermediate_buffer[1][f]), rAG);
880 int16x8_t rRB = vaddq_s16(topRB, bottomRB);
881 rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8));
882 vst1q_s16((int16_t*)(&intermediate_buffer[0][f]), rRB);
886 for (; f < count; f++) {
888 if (x >= image_width) x -= image_width;
890 x =
qMin(x, image_x2);
896 intermediate_buffer[0][f] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff;
897 intermediate_buffer[1][f] = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff;
904 register int x1 = (fx >> 16);
905 register int x2 = x1 + 1;
909 register int distx = (fx & 0x0000ffff) >> 8;
910 register int idistx = 256 - distx;
911 int rb = ((intermediate_buffer[0][x1] * idistx + intermediate_buffer[0][x2] * distx) >> 8) & 0xff00ff;
912 int ag = (intermediate_buffer[1][x1] * idistx + intermediate_buffer[1][x2] * distx) & 0xff00ff00;
917 }
else if ((fdx < 0 && fdx > -(
fixed_scale / 8)) || fabs(data->
m22) < (1./8.)) {
920 fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2);
923 int disty = (fy & 0x0000ffff) >> 8;
924 int idisty = 256 - disty;
928 fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2);
934 int distx = (fx & 0x0000ffff) >> 8;
935 int idistx = 256 - distx;
947 fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2);
950 int disty = (fy & 0x0000ffff) >> 12;
955 #define BILINEAR_DOWNSCALE_BOUNDS_PROLOG \ 957 int x1 = (fx >> 16); \ 959 fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); \ 962 uint tl = fetch(s1, x1, data->texture.colorTable); \ 963 uint tr = fetch(s1, x2, data->texture.colorTable); \ 964 uint bl = fetch(s2, x1, data->texture.colorTable); \ 965 uint br = fetch(s2, x2, data->texture.colorTable); \ 966 int distx = (fx & 0x0000ffff) >> 12; \ 967 *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); \ 973 boundedEnd = qMin(end, buffer + uint((image_x2 - (fx >> 16)) / data->m11)); \ 975 boundedEnd = qMin(end, buffer + uint((image_x1 - (fx >> 16)) / data->m11)); \ 978 #if defined(QT_ALWAYS_HAVE_SSE2) 981 const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
982 const __m128i v_256 = _mm_set1_epi16(256);
983 const __m128i v_disty = _mm_set1_epi16(disty);
984 __m128i v_fdx = _mm_set1_epi32(fdx*4);
986 ptrdiff_t secondLine =
reinterpret_cast<const uint *
>(s2) - reinterpret_cast<const uint *>(s1);
988 union Vect_buffer { __m128i vect;
quint32 i[4]; };
991 for (
int i = 0; i < 4; i++) {
996 while (b < boundedEnd) {
998 Vect_buffer tl, tr, bl, br;
1000 for (
int i = 0; i < 4; i++) {
1001 int x1 = v_fx.i[i] >> 16;
1002 const uint *addr_tl =
reinterpret_cast<const uint *
>(s1) + x1;
1003 const uint *addr_tr = addr_tl + 1;
1006 bl.i[i] = *(addr_tl+secondLine);
1007 br.i[i] = *(addr_tr+secondLine);
1009 __m128i v_distx = _mm_srli_epi16(v_fx.vect, 12);
1010 v_distx = _mm_shufflehi_epi16(v_distx, _MM_SHUFFLE(2,2,0,0));
1011 v_distx = _mm_shufflelo_epi16(v_distx, _MM_SHUFFLE(2,2,0,0));
1013 interpolate_4_pixels_16_sse2(tl.vect, tr.vect, bl.vect, br.vect, v_distx, v_disty, colorMask, v_256, b);
1015 v_fx.vect = _mm_add_epi32(v_fx.vect, v_fdx);
1018 #elif defined(QT_ALWAYS_HAVE_NEON) 1021 const int16x8_t colorMask = vdupq_n_s16(0x00ff);
1022 const int16x8_t invColorMask = vmvnq_s16(colorMask);
1023 const int16x8_t v_256 = vdupq_n_s16(256);
1024 const int16x8_t v_disty = vdupq_n_s16(disty);
1025 const int16x8_t v_disty_ = vshlq_n_s16(v_disty, 4);
1026 int32x4_t v_fdx = vdupq_n_s32(fdx*4);
1028 ptrdiff_t secondLine =
reinterpret_cast<const uint *
>(s2) - reinterpret_cast<const uint *>(s1);
1030 union Vect_buffer { int32x4_t vect;
quint32 i[4]; };
1033 for (
int i = 0; i < 4; i++) {
1038 const int32x4_t v_ffff_mask = vdupq_n_s32(0x0000ffff);
1040 while (b < boundedEnd) {
1042 Vect_buffer tl, tr, bl, br;
1044 Vect_buffer v_fx_shifted;
1045 v_fx_shifted.vect = vshrq_n_s32(v_fx.vect, 16);
1047 int32x4_t v_distx = vshrq_n_s32(vandq_s32(v_fx.vect, v_ffff_mask), 12);
1049 for (
int i = 0; i < 4; i++) {
1050 int x1 = v_fx_shifted.i[i];
1051 const uint *addr_tl =
reinterpret_cast<const uint *
>(s1) + x1;
1052 const uint *addr_tr = addr_tl + 1;
1055 bl.i[i] = *(addr_tl+secondLine);
1056 br.i[i] = *(addr_tr+secondLine);
1059 v_distx = vorrq_s32(v_distx, vshlq_n_s32(v_distx, 16));
1061 interpolate_4_pixels_16_neon(vreinterpretq_s16_s32(tl.vect), vreinterpretq_s16_s32(tr.vect), vreinterpretq_s16_s32(bl.vect), vreinterpretq_s16_s32(br.vect), vreinterpretq_s16_s32(v_distx), v_disty, v_disty_, colorMask, invColorMask, v_256, b);
1063 v_fx.vect = vaddq_s32(v_fx.vect, v_fdx);
1070 int x1 = (fx >> 16);
1072 fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2);
1077 int distx = (fx & 0x0000ffff) >> 12;
1084 if (fabs(data->
m11) > 8 || fabs(data->
m22) > 8) {
1087 int x1 = (fx >> 16);
1089 int y1 = (fy >> 16);
1092 fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2);
1093 fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2);
1103 int distx = (fx & 0x0000ffff) >> 8;
1104 int disty = (fy & 0x0000ffff) >> 8;
1105 int idistx = 256 - distx;
1106 int idisty = 256 - disty;
1119 int x1 = (fx >> 16);
1121 int y1 = (fy >> 16);
1124 fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2);
1125 fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2);
1135 int distx = (fx & 0x0000ffff) >> 12;
1136 int disty = (fy & 0x0000ffff) >> 12;
1147 const qreal fdx = data->
m11;
1148 const qreal fdy = data->
m12;
1149 const qreal fdw = data->
m13;
1151 qreal fx = data->
m21 * cy + data->
m11 * cx + data->
dx;
1152 qreal fy = data->
m22 * cy + data->
m12 * cx + data->
dy;
1153 qreal fw = data->
m23 * cy + data->
m13 * cx + data->
m33;
1156 const qreal iw = fw == 0 ? 1 : 1 / fw;
1157 const qreal px = fx * iw -
qreal(0.5);
1158 const qreal py = fy * iw -
qreal(0.5);
1160 int x1 = int(px) - (px < 0);
1162 int y1 = int(py) - (py < 0);
1165 int distx = int((px - x1) * 256);
1166 int disty = int((py - y1) * 256);
1167 int idistx = 256 - distx;
1168 int idisty = 256 - disty;
1170 fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2);
1171 fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2);
1199 #define SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Arg) qt_fetchUntransformed<QImage::Arg> 1243 fetchTransformed<BlendTransformed>,
1244 fetchTransformed<BlendTransformed>,
1245 fetchTransformed<BlendTransformed>,
1246 fetchTransformed<BlendTransformed>,
1247 fetchTransformed<BlendTransformed>,
1248 fetchTransformed<BlendTransformed>,
1249 fetchTransformed<BlendTransformed>,
1250 fetchTransformed<BlendTransformed>,
1251 fetchTransformed<BlendTransformed>,
1252 fetchTransformed<BlendTransformed>,
1253 fetchTransformed<BlendTransformed>,
1254 fetchTransformed<BlendTransformed>,
1255 fetchTransformed<BlendTransformed>,
1256 fetchTransformed<BlendTransformed>,
1257 fetchTransformed<BlendTransformed>,
1261 fetchTransformed<BlendTransformedTiled>,
1262 fetchTransformed<BlendTransformedTiled>,
1263 fetchTransformed<BlendTransformedTiled>,
1264 fetchTransformed<BlendTransformedTiled>,
1265 fetchTransformed<BlendTransformedTiled>,
1266 fetchTransformed<BlendTransformedTiled>,
1267 fetchTransformed<BlendTransformedTiled>,
1268 fetchTransformed<BlendTransformedTiled>,
1269 fetchTransformed<BlendTransformedTiled>,
1270 fetchTransformed<BlendTransformedTiled>,
1271 fetchTransformed<BlendTransformedTiled>,
1272 fetchTransformed<BlendTransformedTiled>,
1273 fetchTransformed<BlendTransformedTiled>,
1274 fetchTransformed<BlendTransformedTiled>,
1275 fetchTransformed<BlendTransformedTiled>,
1279 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1280 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1281 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1282 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_ARGB32_Premultiplied>,
1283 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_ARGB32>,
1284 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_ARGB32_Premultiplied>,
1285 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1286 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1287 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1288 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1289 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1290 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1291 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1292 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>,
1293 fetchTransformedBilinear<BlendTransformedBilinear, QImage::Format_Invalid>
1297 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1298 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1299 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1300 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_ARGB32_Premultiplied>,
1301 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_ARGB32>,
1302 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_ARGB32_Premultiplied>,
1303 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1304 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1305 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1306 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1307 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1308 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1309 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1310 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>,
1311 fetchTransformedBilinear<BlendTransformedBilinearTiled, QImage::Format_Invalid>
1315 #define FIXPT_BITS 8 1316 #define FIXPT_SIZE (1<<FIXPT_BITS) 1338 int y,
int x,
int length)
1340 const uint *b = buffer;
1352 affine = !data->
m13 && !data->
m23;
1360 const uint *
end = buffer + length;
1362 if (inc >
qreal(-1e-5) && inc <
qreal(1e-5)) {
1369 int inc_fixed = int(inc * FIXPT_SIZE);
1370 while (buffer < end) {
1372 t_fixed += inc_fixed;
1377 while (buffer < end) {
1386 while (buffer < end) {
1414 v->
inv2a = 1 / (2 * v->
a);
1426 while (buffer < end) {
1437 delta_det += delta_delta_det;
1443 while (buffer < end) {
1447 delta_det += delta_delta_det;
1455 int y,
int x,
int length)
1457 return qt_fetch_radial_gradient_template<RadialFetchPlain>(buffer, op,
data, y, x, length);
1463 int y,
int x,
int length)
1465 const uint *b = buffer;
1470 bool affine = !data->
m13 && !data->
m23;
1472 const uint *
end = buffer + length;
1476 while (buffer < end) {
1490 while (buffer < end) {
1509 #if defined(Q_CC_RVCT) 1513 # if defined(QT_HAVE_ARMV6) 1514 static __forceinline
void preload(
const uint *start)
1516 asm(
"pld [start]" );
1518 static const uint L2CacheLineLength = 32;
1519 static const uint L2CacheLineLengthInInts = L2CacheLineLength/
sizeof(
uint);
1520 # define PRELOAD_INIT(x) preload(x); 1521 # define PRELOAD_INIT2(x,y) PRELOAD_INIT(x) PRELOAD_INIT(y) 1522 # define PRELOAD_COND(x) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); 1524 # define PRELOAD_COND2(x,y) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); \ 1525 if (((uint)&y[i])%L2CacheLineLength == 16) preload(&y[i] + L2CacheLineLengthInInts); 1526 # endif // QT_HAVE_ARMV6 1529 #if !defined(Q_CC_RVCT) || !defined(QT_HAVE_ARMV6) 1530 # define PRELOAD_INIT(x) 1531 # define PRELOAD_INIT2(x,y) 1532 # define PRELOAD_COND(x) 1533 # define PRELOAD_COND2(x,y) 1561 #define comp_func_Clear_impl(dest, length, const_alpha)\ 1563 if (const_alpha == 255) {\ 1564 QT_MEMFILL_UINT(dest, length, 0);\ 1566 int ialpha = 255 - const_alpha;\ 1568 for (int i = 0; i < length; ++i) {\ 1570 dest[i] = BYTE_MUL(dest[i], ialpha);\ 1591 if (const_alpha == 255) {
1594 int ialpha = 255 - const_alpha;
1595 color =
BYTE_MUL(color, const_alpha);
1597 for (
int i = 0; i < length; ++i) {
1599 dest[i] = color +
BYTE_MUL(dest[i], ialpha);
1606 if (const_alpha == 255) {
1607 ::memcpy(dest, src, length *
sizeof(uint));
1609 int ialpha = 255 - const_alpha;
1611 for (
int i = 0; i < length; ++i) {
1634 if ((const_alpha &
qAlpha(color)) == 255) {
1637 if (const_alpha != 255)
1638 color =
BYTE_MUL(color, const_alpha);
1640 for (
int i = 0; i < length; ++i) {
1650 if (const_alpha == 255) {
1651 for (
int i = 0; i < length; ++i) {
1654 if (s >= 0xff000000)
1660 for (
int i = 0; i < length; ++i) {
1662 uint s =
BYTE_MUL(src[i], const_alpha);
1675 if (const_alpha != 255)
1676 color =
BYTE_MUL(color, const_alpha);
1678 for (
int i = 0; i < length; ++i) {
1688 if (const_alpha == 255) {
1689 for (
int i = 0; i < length; ++i) {
1695 for (
int i = 0; i < length; ++i) {
1698 uint s =
BYTE_MUL(src[i], const_alpha);
1711 if (const_alpha == 255) {
1712 for (
int i = 0; i < length; ++i) {
1717 color =
BYTE_MUL(color, const_alpha);
1718 uint cia = 255 - const_alpha;
1719 for (
int i = 0; i < length; ++i) {
1730 if (const_alpha == 255) {
1731 for (
int i = 0; i < length; ++i) {
1736 uint cia = 255 - const_alpha;
1737 for (
int i = 0; i < length; ++i) {
1740 uint s =
BYTE_MUL(src[i], const_alpha);
1754 if (const_alpha != 255) {
1755 a =
BYTE_MUL(a, const_alpha) + 255 - const_alpha;
1758 for (
int i = 0; i < length; ++i) {
1767 if (const_alpha == 255) {
1768 for (
int i = 0; i < length; ++i) {
1773 int cia = 255 - const_alpha;
1774 for (
int i = 0; i < length; ++i) {
1790 if (const_alpha == 255) {
1791 for (
int i = 0; i < length; ++i) {
1796 color =
BYTE_MUL(color, const_alpha);
1797 int cia = 255 - const_alpha;
1798 for (
int i = 0; i < length; ++i) {
1809 if (const_alpha == 255) {
1810 for (
int i = 0; i < length; ++i) {
1815 int cia = 255 - const_alpha;
1816 for (
int i = 0; i < length; ++i) {
1818 uint s =
BYTE_MUL(src[i], const_alpha);
1833 if (const_alpha != 255)
1834 a =
BYTE_MUL(a, const_alpha) + 255 - const_alpha;
1836 for (
int i = 0; i < length; ++i) {
1845 if (const_alpha == 255) {
1846 for (
int i = 0; i < length; ++i) {
1851 int cia = 255 - const_alpha;
1852 for (
int i = 0; i < length; ++i) {
1868 if (const_alpha != 255) {
1869 color =
BYTE_MUL(color, const_alpha);
1871 uint sia =
qAlpha(~color);
1873 for (
int i = 0; i < length; ++i) {
1882 if (const_alpha == 255) {
1883 for (
int i = 0; i < length; ++i) {
1890 for (
int i = 0; i < length; ++i) {
1892 uint s =
BYTE_MUL(src[i], const_alpha);
1907 if (const_alpha != 255) {
1908 color =
BYTE_MUL(color, const_alpha);
1909 a =
qAlpha(color) + 255 - const_alpha;
1912 for (
int i = 0; i < length; ++i) {
1922 if (const_alpha == 255) {
1923 for (
int i = 0; i < length; ++i) {
1930 int cia = 255 - const_alpha;
1931 for (
int i = 0; i < length; ++i) {
1933 uint s =
BYTE_MUL(src[i], const_alpha);
1949 if (const_alpha != 255)
1950 color =
BYTE_MUL(color, const_alpha);
1951 uint sia =
qAlpha(~color);
1954 for (
int i = 0; i < length; ++i) {
1964 if (const_alpha == 255) {
1965 for (
int i = 0; i < length; ++i) {
1972 for (
int i = 0; i < length; ++i) {
1975 uint s =
BYTE_MUL(src[i], const_alpha);
1982 inline void store(uint *dest,
const uint src)
const 1991 , ica(255 - const_alpha)
1995 inline void store(uint *dest,
const uint src)
const 2007 return 255 - ((255 - sa) * (255 - da) >> 8);
2014 template <
typename T>
2020 for (
int i = 0; i < length; ++i) {
2024 coverage.store(&dest[i], d);
2030 if (const_alpha == 255)
2036 template <
typename T>
2040 for (
int i = 0; i < length; ++i) {
2047 coverage.store(&dest[i], d);
2053 if (const_alpha == 255)
2064 return qt_div_255(src * dst + src * (255 - da) + dst * (255 - sa));
2067 template <
typename T>
2071 int sr =
qRed(color);
2073 int sb =
qBlue(color);
2076 for (
int i = 0; i < length; ++i) {
2081 #define OP(a, b) multiply_op(a, b, da, sa) 2082 int r =
OP(
qRed(d), sr);
2088 coverage.store(&dest[i],
qRgba(r, g, b, a));
2094 if (const_alpha == 255)
2100 template <
typename T>
2104 for (
int i = 0; i < length; ++i) {
2112 #define OP(a, b) multiply_op(a, b, da, sa) 2119 coverage.store(&dest[i],
qRgba(r, g, b, a));
2125 if (const_alpha == 255)
2135 template <
typename T>
2139 int sr =
qRed(color);
2141 int sb =
qBlue(color);
2144 for (
int i = 0; i < length; ++i) {
2149 #define OP(a, b) 255 - qt_div_255((255-a) * (255-b)) 2150 int r =
OP(
qRed(d), sr);
2156 coverage.store(&dest[i],
qRgba(r, g, b, a));
2162 if (const_alpha == 255)
2168 template <
typename T>
2172 for (
int i = 0; i < length; ++i) {
2180 #define OP(a, b) 255 - (((255-a) * (255-b)) >> 8) 2187 coverage.store(&dest[i],
qRgba(r, g, b, a));
2193 if (const_alpha == 255)
2207 const int temp = src * (255 - da) + dst * (255 - sa);
2211 return qt_div_255(sa * da - 2 * (da - dst) * (sa - src) + temp);
2214 template <
typename T>
2218 int sr =
qRed(color);
2220 int sb =
qBlue(color);
2223 for (
int i = 0; i < length; ++i) {
2228 #define OP(a, b) overlay_op(a, b, da, sa) 2229 int r =
OP(
qRed(d), sr);
2235 coverage.store(&dest[i],
qRgba(r, g, b, a));
2241 if (const_alpha == 255)
2247 template <
typename T>
2251 for (
int i = 0; i < length; ++i) {
2259 #define OP(a, b) overlay_op(a, b, da, sa) 2266 coverage.store(&dest[i],
qRgba(r, g, b, a));
2272 if (const_alpha == 255)
2282 static inline int darken_op(
int dst,
int src,
int da,
int sa)
2284 return qt_div_255(
qMin(src * da, dst * sa) + src * (255 - da) + dst * (255 - sa));
2287 template <
typename T>
2291 int sr =
qRed(color);
2293 int sb =
qBlue(color);
2296 for (
int i = 0; i < length; ++i) {
2301 #define OP(a, b) darken_op(a, b, da, sa) 2302 int r =
OP(
qRed(d), sr);
2308 coverage.store(&dest[i],
qRgba(r, g, b, a));
2314 if (const_alpha == 255)
2320 template <
typename T>
2324 for (
int i = 0; i < length; ++i) {
2332 #define OP(a, b) darken_op(a, b, da, sa) 2339 coverage.store(&dest[i],
qRgba(r, g, b, a));
2345 if (const_alpha == 255)
2357 return qt_div_255(
qMax(src * da, dst * sa) + src * (255 - da) + dst * (255 - sa));
2360 template <
typename T>
2364 int sr =
qRed(color);
2366 int sb =
qBlue(color);
2369 for (
int i = 0; i < length; ++i) {
2374 #define OP(a, b) lighten_op(a, b, da, sa) 2375 int r =
OP(
qRed(d), sr);
2381 coverage.store(&dest[i],
qRgba(r, g, b, a));
2387 if (const_alpha == 255)
2393 template <
typename T>
2397 for (
int i = 0; i < length; ++i) {
2405 #define OP(a, b) lighten_op(a, b, da, sa) 2412 coverage.store(&dest[i],
qRgba(r, g, b, a));
2418 if (const_alpha == 255)
2432 const int sa_da = sa * da;
2433 const int dst_sa = dst * sa;
2434 const int src_da = src * da;
2436 const int temp = src * (255 - da) + dst * (255 - sa);
2437 if (src_da + dst_sa >= sa_da)
2440 return qt_div_255(255 * dst_sa / (255 - 255 * src / sa) + temp);
2443 template <
typename T>
2447 int sr =
qRed(color);
2449 int sb =
qBlue(color);
2452 for (
int i = 0; i < length; ++i) {
2457 #define OP(a,b) color_dodge_op(a, b, da, sa) 2458 int r =
OP(
qRed(d), sr);
2464 coverage.store(&dest[i],
qRgba(r, g, b, a));
2470 if (const_alpha == 255)
2476 template <
typename T>
2480 for (
int i = 0; i < length; ++i) {
2488 #define OP(a, b) color_dodge_op(a, b, da, sa) 2495 coverage.store(&dest[i],
qRgba(r, g, b, a));
2501 if (const_alpha == 255)
2515 const int src_da = src * da;
2516 const int dst_sa = dst * sa;
2517 const int sa_da = sa * da;
2519 const int temp = src * (255 - da) + dst * (255 - sa);
2521 if (src == 0 || src_da + dst_sa <= sa_da)
2523 return qt_div_255(sa * (src_da + dst_sa - sa_da) / src + temp);
2526 template <
typename T>
2530 int sr =
qRed(color);
2532 int sb =
qBlue(color);
2535 for (
int i = 0; i < length; ++i) {
2540 #define OP(a, b) color_burn_op(a, b, da, sa) 2541 int r =
OP(
qRed(d), sr);
2547 coverage.store(&dest[i],
qRgba(r, g, b, a));
2553 if (const_alpha == 255)
2559 template <
typename T>
2563 for (
int i = 0; i < length; ++i) {
2571 #define OP(a, b) color_burn_op(a, b, da, sa) 2578 coverage.store(&dest[i],
qRgba(r, g, b, a));
2584 if (const_alpha == 255)
2598 const uint temp = src * (255 - da) + dst * (255 - sa);
2603 return qt_div_255(sa * da - 2 * (da - dst) * (sa - src) + temp);
2606 template <
typename T>
2610 int sr =
qRed(color);
2612 int sb =
qBlue(color);
2615 for (
int i = 0; i < length; ++i) {
2620 #define OP(a, b) hardlight_op(a, b, da, sa) 2621 int r =
OP(
qRed(d), sr);
2627 coverage.store(&dest[i],
qRgba(r, g, b, a));
2633 if (const_alpha == 255)
2639 template <
typename T>
2643 for (
int i = 0; i < length; ++i) {
2651 #define OP(a, b) hardlight_op(a, b, da, sa) 2658 coverage.store(&dest[i],
qRgba(r, g, b, a));
2664 if (const_alpha == 255)
2680 const int src2 = src << 1;
2681 const int dst_np = da != 0 ? (255 * dst) / da : 0;
2682 const int temp = (src * (255 - da) + dst * (255 - sa)) * 255;
2685 return (dst * (sa * 255 + (src2 - sa) * (255 - dst_np)) + temp) / 65025;
2686 else if (4 * dst <= da)
2687 return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025;
2689 # ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 2690 return (dst * sa * 255 + da * (src2 - sa) * (
qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025;
2692 return (dst * sa * 255 + da * (src2 - sa) * (int(
qSqrt(
qreal(dst_np * 255))) - dst_np) + temp) / 65025;
2697 template <
typename T>
2701 int sr =
qRed(color);
2703 int sb =
qBlue(color);
2706 for (
int i = 0; i < length; ++i) {
2711 #define OP(a, b) soft_light_op(a, b, da, sa) 2712 int r =
OP(
qRed(d), sr);
2718 coverage.store(&dest[i],
qRgba(r, g, b, a));
2724 if (const_alpha == 255)
2730 template <
typename T>
2734 for (
int i = 0; i < length; ++i) {
2742 #define OP(a, b) soft_light_op(a, b, da, sa) 2749 coverage.store(&dest[i],
qRgba(r, g, b, a));
2755 if (const_alpha == 255)
2770 template <
typename T>
2774 int sr =
qRed(color);
2776 int sb =
qBlue(color);
2779 for (
int i = 0; i < length; ++i) {
2784 #define OP(a, b) difference_op(a, b, da, sa) 2785 int r =
OP(
qRed(d), sr);
2791 coverage.store(&dest[i],
qRgba(r, g, b, a));
2797 if (const_alpha == 255)
2803 template <
typename T>
2807 for (
int i = 0; i < length; ++i) {
2815 #define OP(a, b) difference_op(a, b, da, sa) 2822 coverage.store(&dest[i],
qRgba(r, g, b, a));
2828 if (const_alpha == 255)
2837 template <
typename T>
2841 int sr =
qRed(color);
2843 int sb =
qBlue(color);
2846 for (
int i = 0; i < length; ++i) {
2851 #define OP(a, b) (a + b - qt_div_255(2*(a*b))) 2852 int r =
OP(
qRed(d), sr);
2858 coverage.store(&dest[i],
qRgba(r, g, b, a));
2864 if (const_alpha == 255)
2870 template <
typename T>
2874 for (
int i = 0; i < length; ++i) {
2882 #define OP(a, b) (a + b - ((a*b) >> 7)) 2889 coverage.store(&dest[i],
qRgba(r, g, b, a));
2895 if (const_alpha == 255)
2901 #if defined(Q_CC_RVCT) 2932 color |= 0xff000000;
2944 *dest = (*src & *dest) | 0xff000000;
2955 color &= 0x00ffffff;
2967 *dest = (*src ^ *dest) | 0xff000000;
2980 *dest = (color & ~(*dest)) | 0xff000000;
2992 *dest = (~(*src) & ~(*dest)) | 0xff000000;
3003 color = ~color | 0xff000000;
3005 *dest = color | ~(*dest);
3017 *dest = ~(*src) | ~(*dest) | 0xff000000;
3028 color = ~color & 0x00ffffff;
3030 *dest = color ^ (*dest);
3042 *dest = ((~(*src)) ^ (*dest)) | 0xff000000;
3048 uint color, uint const_alpha)
3051 qt_memfill(dest, ~color | 0xff000000, length);
3055 int length, uint const_alpha)
3059 *dest++ = ~(*src++) | 0xff000000;
3068 color = ~color | 0xff000000;
3070 *dest = color & *dest;
3082 *dest = (~(*src) & *dest) | 0xff000000;
3094 *dest = (color & ~(*dest)) | 0xff000000;
3106 *dest = (*src & ~(*dest)) | 0xff000000;
3211 bool solidSource =
false;
3213 switch(data->
type) {
3250 const QSpan *lastSpan = spans + spanCount;
3251 bool alphaSpans =
false;
3252 while (spans < lastSpan) {
3268 op.
func = functionForMode[op.
mode];
3282 #if !defined(Q_CC_SUN) 3286 int x,
int y,
int length, uint const_alpha)
3288 #if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS) 3301 #if !defined(Q_CC_SUN) 3312 int length = spans->
len;
3314 int l =
qMin(buffer_size, length);
3326 #if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS) 3336 #endif // QT_NO_RASTERCALLBACKS 3352 int ialpha = 255 - spans->
coverage;
3353 for (
int i = 0; i < spans->
len; ++i)
3354 target[i] = c +
BYTE_MUL(target[i], ialpha);
3383 const T color = c.byte_mul(alpha);
3384 const int ialpha = T::ialpha(spans->
coverage);
3385 const T *
end = target + spans->
len;
3386 while (target < end) {
3387 *target = color + target->byte_mul(ialpha);
3402 const T *
end = target + spans->
len;
3403 while (target !=
end) {
3404 *target = c + target->byte_mul(ialpha);
3415 #define SPANFUNC_POINTER_BLENDCOLOR(DST) blendColor<DST> 3440 int ialpha = 255 - spans->
coverage;
3442 while (target < end) {
3455 int ialpha =
qAlpha(~color);
3458 int len = spans->
len;
3459 bool pre = (((
quintptr)target) & 0x3) != 0;
3471 uint *target32 = (uint*)target;
3472 uint c32 = c | (c<<16);
3474 uint salpha = (ialpha+1) >> 3;
3493 template <
typename T>
3496 uint const_alpha = 256;
3503 const int y = spans->
y;
3507 for (
int i = 1; i < count && spans[i].
y == y && spans[i].
x ==
right; ++i)
3508 right += spans[i].len;
3509 int length = right - x;
3512 int l =
qMin(buffer_size, length);
3515 int process_length =
l;
3518 const uint *src = handler.fetch(process_x, y, process_length);
3522 coverage = (spans->
coverage * const_alpha) >> 8;
3524 int right = spans->
x + spans->
len;
3525 int len =
qMin(l, right - x);
3527 handler.process(x, y, len, coverage, src, offset);
3538 handler.store(process_x, y, process_length);
3561 template <SpanMethod spanMethod>
3570 const uint *
fetch(
int x,
int y,
int len)
3573 dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, y, len) : buffer;
3575 return op.src_fetch(src_buffer, &op, data, y, x, len);
3578 void process(
int x,
int y,
int len,
int coverage,
const uint *src,
int offset)
3581 op.func(dest + offset, src + offset, len, coverage);
3589 op.dest_store(data->rasterBuffer, x, y, dest, len);
3594 template <SpanMethod spanMethod>
3602 template <SpanMethod spanMethod>
3618 int length = spans->
len;
3620 int sy = yoff + spans->
y;
3621 if (sy >= 0 && sy < image_height && sx < image_width) {
3627 if (sx + length > image_width)
3628 length = image_width - sx;
3632 int l =
qMin(buffer_size, length);
3633 const uint *src = op.
src_fetch(src_buffer, &op, data, sy, sx, l);
3636 op.
func(dest, src, l, coverage);
3653 template <SpanMethod spanMethod>
3659 blend_untransformed_generic<spanMethod>(count, spans, userData);
3672 int length = spans->
len;
3674 int sy = yoff + spans->
y;
3675 if (sy >= 0 && sy < image_height && sx < image_width) {
3681 if (sx + length > image_width)
3682 length = image_width - sx;
3688 op.
func(dest, src, length, coverage);
3691 spans->
y, length, coverage);
3702 quint16 t = ((((x & 0x07e0) * a) + ((y & 0x07e0) * b)) >> 5) & 0x07e0;
3703 t |= ((((x & 0xf81f) * a) + ((y & 0xf81f) * b)) >> 5) & 0xf81f;
3712 t = ((((x & 0xf81f07e0) >> 5) *
a) + (((y & 0xf81f07e0) >> 5) * b)) & 0xf81f07e0;
3713 t |= ((((x & 0x07e0f81f) * a) + ((y & 0x07e0f81f) * b)) >> 5) & 0x07e0f81f;
3723 const int dstAlign = ((
quintptr)dest) & 0x3;
3730 const int srcAlign = ((
quintptr)src) & 0x3;
3731 int length32 = length >> 1;
3732 if (length32 && srcAlign == 0) {
3733 while (length32--) {
3750 template <
class DST,
class SRC>
3756 dest[0] = dest[0].byte_mul(alpha >> 8) + DST(src[0]);
3757 dest[1] = dest[1].byte_mul(alpha & 0xff) + DST(src[1]);
3760 template <
class DST,
class SRC>
3766 dest[0] = dest[0].byte_mul(alpha >> 24) + DST(src[0]);
3767 dest[1] = dest[1].byte_mul((alpha >> 16) & 0xff) + DST(src[1]);
3768 dest[2] = dest[2].byte_mul((alpha >> 8) & 0xff) + DST(src[2]);
3769 dest[3] = dest[3].byte_mul(alpha & 0xff) + DST(src[3]);
3772 #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN 3792 t = ((((x & 0x0007e0ff) * a8) >> 5) & 0x0007e0ff) + (y & 0x0007c0f8);
3795 t |= ((((x & 0x00f81f00) * a8) >> 5) & 0x00f81f00) + (y & 0x00f81f00);
3797 a8 = (a >> 16) & 0xff;
3800 t |= ((((x & 0xff000000) >> 5) * a8) & 0xff000000) + (y & 0xf8000000);
3809 t = ((((x & 0x0000f81f) * a8) >> 5) & 0x0000f81f) + (y & 0x0000f81f);
3812 t |= ((((x & 0x000007e0) * a8) >> 5) & 0x000007e0) + (y & 0x000007c0);
3814 a8 = (a >> 8) & 0xff;
3817 t |= ((((x & 0x00ff0000) * a8) >> 5) & 0x00ff0000) + (y & 0x00f80000);
3821 quint16 x16 = (x >> 24) | ((dest32[2] & 0x000000ff) << 8);
3822 quint16 y16 = (y >> 24) | ((src32[2] & 0x000000ff) << 8);
3825 t16 = ((((x16 & 0xf81f) * a8) >> 5) & 0xf81f) + (y16 & 0xf81f);
3826 t16 |= ((((x16 & 0x07e0) * a8) >> 5) & 0x07e0) + (y16 & 0x07c0);
3829 t |= ((t16 & 0x00ff) << 24);
3844 t |= ((((x & 0x07e0ff00) * a8) >> 5) & 0x07e0ff00) + (y & 0x07c0f800);
3847 t |= ((((x & 0xf81f0000) >> 5) * a8) & 0xf81f0000)+ (y & 0xf81f0000);
3854 #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN 3874 t = ((((x & 0x0003e0ff) * a8) >> 5) & 0x0003e0ff) + (y & 0x0003e0f8);
3877 t |= ((((x & 0x007c1f00) * a8) >> 5) & 0x007c1f00) + (y & 0x007c1f00);
3879 a8 = (a >> 16) & 0xff;
3882 t |= ((((x & 0xff000000) >> 5) * a8) & 0xff000000) + (y & 0xf8000000);
3891 t = ((((x & 0x00007c1f) * a8) >> 5) & 0x00007c1f) + (y & 0x00007c1f);
3894 t |= ((((x & 0x000003e0) * a8) >> 5) & 0x000003e0) + (y & 0x000003e0);
3896 a8 = (a >> 8) & 0xff;
3899 t |= ((((x & 0x00ff0000) * a8) >> 5) & 0x00ff0000) + (y & 0x00f80000);
3903 quint16 x16 = (x >> 24) | ((dest32[2] & 0x000000ff) << 8);
3904 quint16 y16 = (y >> 24) | ((src32[2] & 0x000000ff) << 8);
3907 t16 = ((((x16 & 0x7c1f) * a8) >> 5) & 0x7c1f) + (y16 & 0x7c1f);
3908 t16 |= ((((x16 & 0x03e0) * a8) >> 5) & 0x03e0) + (y16 & 0x03e0);
3911 t |= ((t16 & 0x00ff) << 24);
3926 t |= ((((x & 0x03e0ff00) * a8) >> 5) & 0x03e0ff00) + (y & 0x03e0f800);
3929 t |= ((((x & 0x7c1f0000) >> 5) * a8) & 0x7c1f0000)+ (y & 0x7c1f0000);
3943 return (src[0].alpha() << 8) | src[1].alpha();
3954 if (T::hasAlpha()) {
3955 return (src[0].alpha() << 24) | (src[1].alpha() << 16)
3956 | (src[2].alpha() << 8) | src[3].alpha();
3966 const quint8 *src8 =
reinterpret_cast<const quint8*
>(src);
3967 return src8[0] << 24 | src8[3] << 16 | src8[6] << 8 | src8[9];
3974 const quint8 *src8 =
reinterpret_cast<const quint8*
>(src);
3975 return ((src8[2] & 0xfc) | (src8[2] >> 6)) << 24
3976 | ((src8[5] & 0xfc) | (src8[5] >> 6)) << 16
3977 | ((src8[8] & 0xfc) | (src8[8] >> 6)) << 8
3978 | ((src8[11] & 0xfc) | (src8[11] >> 6));
3986 const quint8 *src8 =
reinterpret_cast<const quint8*
>(src);
3987 return src8[0] << 24 | src8[3] << 16 | src8[6] << 8 | src8[9];
3995 const quint32 t = (*src32 & 0xf000f000) |
3996 ((*src32 & 0xf000f000) >> 4);
3997 return (t >> 24) | (t & 0xff00);
4004 return (T::alpha((alpha >> 8) & 0xff) << 8)
4005 | T::alpha(alpha & 0xff);
4012 return ((((a & 0xff00) + 0x0100) >> 3) & 0xff00)
4013 | ((((a & 0x00ff) + 0x0001) >> 3) & 0x00ff);
4020 return (((a & 0x00ff) + 0x0001) >> 4)
4021 | ((((a & 0xff00) + 0x0100) >> 4) & 0xff00);
4028 return (((a & 0x00ff) + 0x0001) >> 4)
4029 | ((((a & 0xff00) + 0x0100) >> 4) & 0xff00);
4036 return (T::ialpha((alpha >> 8) & 0xff) << 8)
4037 | T::ialpha(alpha & 0xff);
4065 return (T::alpha(alpha >> 24) << 24)
4066 | (T::alpha((alpha >> 16) & 0xff) << 16)
4067 | (T::alpha((alpha >> 8) & 0xff) << 8)
4068 | T::alpha(alpha & 0xff);
4082 return ((((a & 0xff00ff00) + 0x01000100) >> 3) & 0xff00ff00)
4083 | ((((a & 0x00ff00ff) + 0x00010001) >> 3) & 0x00ff00ff);
4090 return ((((a & 0xff00ff00) >> 2) + 0x00400040) & 0xff00ff00)
4091 | ((((a & 0x00ff00ff) + 0x00010001) >> 2) & 0x00ff00ff);
4098 return ((((a & 0xff00ff00) >> 2) + 0x00400040) & 0xff00ff00)
4099 | ((((a & 0x00ff00ff) + 0x00010001) >> 2) & 0x00ff00ff);
4106 return ((((a & 0xff00ff00) + 0x01000100) >> 3) & 0xff00ff00)
4107 | ((((a & 0x00ff00ff) + 0x00010001) >> 3) & 0x00ff00ff);
4114 return (T::ialpha(alpha >> 24) << 24)
4115 | (T::ialpha((alpha >> 16) & 0xff) << 16)
4116 | (T::ialpha((alpha >> 8) & 0xff) << 8)
4117 | T::ialpha(alpha & 0xff);
4155 template <
class DST,
class SRC>
4161 dest[0] = DST(src[0]).byte_mul(a >> 8) + dest[0].byte_mul(ia >> 8);
4162 dest[1] = DST(src[1]).byte_mul(a & 0xff) + dest[1].byte_mul(ia & 0xff);
4165 template <
class DST,
class SRC>
4174 dest[0] = DST(src[0]).byte_mul(a >> 8) + dest[0].byte_mul(ia >> 8);
4175 dest[1] = DST(src[1]).byte_mul(a & 0xff) + dest[1].byte_mul(ia & 0xff);
4178 template <
class DST,
class SRC>
4181 if (SRC::hasAlpha() && !DST::hasAlpha())
4184 dest = dest.byte_mul(a) + DST(src).byte_mul(b);
4192 const quint8 *s =
reinterpret_cast<const quint8*
>(&src);
4193 d[0] = (d[0] * a + s[0] * b) >> 5;
4195 const quint16 x = (d[2] << 8) | d[1];
4196 const quint16 y = (s[2] << 8) | s[1];
4197 quint16 t = (((x & 0x07e0) * a + (y & 0x07e0) * b) >> 5) & 0x07e0;
4198 t |= (((x & 0xf81f) * a + (y & 0xf81f) * b) >> 5) & 0xf81f;
4210 quint16 t = (((x & 0x07e0) * a + (y & 0x07e0) * b) >> 5) & 0x07e0;
4211 t |= (((x & 0xf81f) * a + (y & 0xf81f) * b) >> 5) & 0xf81f;
4221 quint16 t = (((x & 0x03e0) * a + (y & 0x03e0) * b) >> 5) & 0x03e0;
4222 t |= ((((x & 0x7c1f) * a) + ((y & 0x7c1f) * b)) >> 5) & 0x7c1f;
4232 quint16 t = ((x & 0x00f0) * a + (y & 0x00f0) * b) & 0x0f00;
4233 t |= ((x & 0x0f0f) * a + (y & 0x0f0f) * b) & 0xf0f0;
4238 template <
class DST,
class SRC>
4240 const SRC *src,
quint8 b)
4247 dest[0] = dest[0].byte_mul(a) + DST(src[0]).byte_mul(b);
4248 dest[1] = dest[1].byte_mul(a) + DST(src[1]).byte_mul(b);
4257 quint32 t = (((*x & 0xf81f07e0) >> 5) * a +
4258 ((*y & 0xf81f07e0) >> 5) * b) & 0xf81f07e0;
4259 t |= (((*x & 0x07e0f81f) * a
4260 + (*y & 0x07e0f81f) * b) >> 5) & 0x07e0f81f;
4270 quint32 t = (((*x & 0x7c1f03e0) >> 5) * a +
4271 ((*y & 0x7c1f03e0) >> 5) * b) & 0x7c1f03e0;
4272 t |= (((*x & 0x03e07c1f) * a
4273 + (*y & 0x03e07c1f) * b) >> 5) & 0x03e07c1f;
4283 quint32 t = ((*x & 0x0f0f0f0f) * a + (*y & 0x0f0f0f0f) * b) & 0xf0f0f0f0;
4284 t |= ((*x & 0x00f000f0) * a + (*y & 0x00f000f0) * b) & 0x0f000f00;
4288 template <
class DST,
class SRC>
4296 dest[0] = DST(src[0]).byte_mul(a >> 24)
4297 + dest[0].byte_mul(ia >> 24);
4298 dest[1] = DST(src[1]).byte_mul((a >> 16) & 0xff)
4299 + dest[1].byte_mul((ia >> 16) & 0xff);
4300 dest[2] = DST(src[2]).byte_mul((a >> 8) & 0xff)
4301 + dest[2].byte_mul((ia >> 8) & 0xff);
4302 dest[3] = DST(src[3]).byte_mul(a & 0xff)
4303 + dest[3].byte_mul(ia & 0xff);
4306 #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN 4329 t = (((x & 0x0007e0ff) * a8 + (y & 0x0007e0ff) * ia8) >> 5)
4333 t |= (((x & 0x00f81f00) * a8 + (y & 0x00f81f00) * ia8) >> 5)
4336 a8 = (a >> 16) & 0xff;
4337 ia8 = (ia >> 16) & 0xff;
4340 t |= (((x & 0xff000000) >> 5) * a8 + ((y & 0xff000000) >> 5) * ia8)
4350 t = (((x & 0x0000f81f) * a8 + (y & 0x0000f81f) * ia8) >> 5)
4354 t |= (((x & 0x000007e0) * a8 + (y & 0x000007e0) * ia8) >> 5)
4357 a8 = (a >> 8) & 0xff;
4358 ia8 = (ia >> 8) & 0xff;
4361 t |= (((x & 0x00ff0000) * a8 + (y & 0x00ff0000) * ia8) >> 5)
4366 quint16 x16 = (x >> 24) | ((src32[2] & 0x000000ff) << 8);
4367 quint16 y16 = (y >> 24) | ((dest32[2] & 0x000000ff) << 8);
4370 t16 = (((x16 & 0xf81f) * a8 + (y16 & 0xf81f) * ia8) >> 5) & 0xf81f;
4371 t16 |= (((x16 & 0x07e0) * a8 + (y16 & 0x07e0) * ia8) >> 5) & 0x07e0;
4374 t |= ((t16 & 0x00ff) << 24);
4390 t |= (((x & 0x07e0ff00) * a8 + (y & 0x07e0ff00) * ia8) >> 5)
4394 t |= (((x & 0xf81f0000) >> 5) * a8 + ((y & 0xf81f0000) >> 5) * ia8)
4402 #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN 4426 t = (((x & 0x0003e0ff) * a8 + (y & 0x0003e0ff) * ia8) >> 5)
4430 t |= (((x & 0x007c1f00) * a8 + (y & 0x007c1f00) * ia8) >> 5)
4433 a8 = (a >> 16) & 0xff;
4434 ia8 = (ia >> 16) & 0xff;
4437 t |= (((x & 0xff000000) >> 5) * a8 + ((y & 0xff000000) >> 5) * ia8)
4447 t = (((x & 0x00007c1f) * a8 + (y & 0x00007c1f) * ia8) >> 5)
4451 t |= (((x & 0x000003e0) * a8 + (y & 0x000003e0) * ia8) >> 5)
4454 a8 = (a >> 8) & 0xff;
4455 ia8 = (ia >> 8) & 0xff;
4458 t |= (((x & 0x00ff0000) * a8 + (y & 0x00ff0000) * ia8) >> 5)
4463 quint16 x16 = (x >> 24) | ((src32[2] & 0x000000ff) << 8);
4464 quint16 y16 = (y >> 24) | ((dest32[2] & 0x000000ff) << 8);
4467 t16 = (((x16 & 0x7c1f) * a8 + (y16 & 0x7c1f) * ia8) >> 5) & 0x7c1f;
4468 t16 |= (((x16 & 0x03e0) * a8 + (y16 & 0x03e0) * ia8) >> 5) & 0x03e0;
4471 t |= ((t16 & 0x00ff) << 24);
4487 t |= (((x & 0x03e0ff00) * a8 + (y & 0x03e0ff00) * ia8) >> 5)
4491 t |= (((x & 0x7c1f0000) >> 5) * a8 + ((y & 0x7c1f0000) >> 5) * ia8)
4516 t = ((x >> 8) & 0xff00ff) * (a >> 24)
4517 + ((y >> 8) & 0xff00ff) * (ia >> 24);
4518 t = (t + ((t >> 8) & 0xff00ff) + 0x800080);
4521 x = (x & 0xff0000) * (a >> 24)
4522 + (x & 0x0000ff) * ((a >> 16) & 0xff)
4523 + (y & 0xff0000) * (ia >> 24)
4524 + (y & 0x0000ff) * ((ia >> 16) & 0xff);
4525 x = (x + ((x >> 8) & 0xff00ff) + 0x800080) >> 8;
4535 t = ((x >> 8) & 0xff0000) * ((a >> 16) & 0xff)
4536 + ((x >> 8) & 0x0000ff) * ((a >> 8) & 0xff)
4537 + ((y >> 8) & 0xff0000) * ((ia >> 16) & 0xff)
4538 + ((y >> 8) & 0x0000ff) * ((ia >> 8) & 0xff);
4539 t = (t + ((t >> 8) & 0xff00ff) + 0x800080);
4542 x = (x & 0xff0000) * ((a >> 16) & 0xff)
4543 + (x & 0x0000ff) * ((a >> 8) & 0xff)
4544 + (y & 0xff0000) * ((ia >> 16) & 0xff)
4545 + (y & 0x0000ff) * ((ia >> 8) & 0xff);
4546 x = (x + ((x >> 8) & 0xff00ff) + 0x800080) >> 8;
4556 t = ((x >> 8) & 0xff0000) * ((a >> 8) & 0xff)
4557 + ((x >> 8) & 0x0000ff) * (a & 0xff)
4558 + ((y >> 8) & 0xff0000) * ((ia >> 8) & 0xff)
4559 + ((y >> 8) & 0x0000ff) * (ia & 0xff);
4560 t = (t + ((t >> 8) & 0xff00ff) + 0x800080);
4563 x = (x & 0xff00ff) * (a & 0xff)
4564 + (y & 0xff00ff) * (ia & 0xff);
4565 x = (x + ((x >> 8) & 0xff00ff) + 0x800080) >> 8;
4572 template <
class DST,
class SRC>
4574 const SRC *src,
quint8 b)
4579 dest[0] = dest[0].byte_mul(a) + DST(src[0]).byte_mul(b);
4580 dest[1] = dest[1].byte_mul(a) + DST(src[1]).byte_mul(b);
4581 dest[2] = dest[2].byte_mul(a) + DST(src[2]).byte_mul(b);
4582 dest[3] = dest[3].byte_mul(a) + DST(src[3]).byte_mul(b);
4585 template <
class DST,
class SRC>
4592 if (a == 0xffffffff) {
4608 if (a == 0xffffffff) {
4622 if (a == 0xffffffff) {
4636 if (a == 0xffffffff) {
4643 template <
class DST,
class SRC>
4645 quint8 coverage,
int length)
4649 if (coverage < 255) {
4650 if (SRC::hasAlpha()) {
4651 for (
int i = 0; i < length; ++i) {
4652 if (src[i].alpha()) {
4655 src[i], DST::alpha(alpha));
4659 const quint8 alpha = DST::alpha(coverage);
4660 const quint8 ialpha = DST::ialpha(coverage);
4662 for (
int i = 0; i < length; ++i)
4672 if (SRC::hasAlpha()) {
4673 for (
int i = 0; i < length; ++i) {
4674 const quint8 a = src->alpha();
4678 if (DST::hasAlpha())
4679 *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(a));
4681 *dest = DST(SRC(*src).truncedAlpha()) + dest->byte_mul(DST::ialpha(a));
4689 template <
class DST,
class SRC>
4691 quint8 coverage,
int length)
4698 const int align =
quintptr(dest) & 0x3;
4700 if (coverage < 255) {
4703 const quint8 alpha = SRC::hasAlpha()
4704 ?
qt_div_255(
int(src->alpha()) *
int(coverage))
4708 *src, DST::alpha(alpha));
4715 if (SRC::hasAlpha()) {
4716 while (length >= 2) {
4724 const quint8 alpha = DST::alpha(coverage);
4725 const quint8 ialpha = DST::ialpha(coverage);
4727 while (length >= 2) {
4737 const quint8 alpha = SRC::hasAlpha()
4738 ?
qt_div_255(
int(src->alpha()) *
int(coverage))
4742 *src, DST::alpha(alpha));
4750 if (SRC::hasAlpha()) {
4752 const quint8 alpha = src->alpha();
4756 *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(alpha));
4762 while (length >= 2) {
4771 if (
sizeof(DST) == 2)
4782 const quint8 alpha = src->alpha();
4786 *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(alpha));
4791 template <
class DST,
class SRC>
4793 quint8 coverage,
int length)
4799 const int align =
quintptr(dest) & 0x3;
4801 if (coverage < 255) {
4803 for (
int i = 0; i < align; ++i) {
4804 if (SRC::hasAlpha()) {
4808 *src, DST::alpha(alpha));
4811 *src, DST::alpha(coverage));
4818 if (SRC::hasAlpha()) {
4819 while (length >= 4) {
4828 const quint8 alpha = DST::alpha(coverage);
4829 const quint8 ialpha = DST::ialpha(coverage);
4830 while (length >= 4) {
4840 if (SRC::hasAlpha()) {
4844 *src, DST::alpha(alpha));
4847 *src, DST::alpha(coverage));
4860 if (SRC::hasAlpha()) {
4862 for (
int i = 0; i < align; ++i) {
4863 const quint8 a = src->alpha();
4867 *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(a));
4874 while (length >= 4) {
4883 const quint8 a = src->alpha();
4887 *dest = DST(*src).truncedAlpha() + dest->byte_mul(DST::ialpha(a));
4895 template <
class DST,
class SRC>
4905 blend_src_generic<RegularSpans>(count, spans, userData);
4909 const bool modeSource = !SRC::hasAlpha() ||
4918 if (coverage == 0) {
4924 int length = spans->
len;
4926 int sy = yoff + spans->
y;
4927 if (sy >= 0 && sy < image_height && sx < image_width) {
4933 if (sx + length > image_width)
4934 length = image_width - sx;
4938 if (modeSource && coverage == 255) {
4939 qt_memconvert<DST, SRC>(dest, src, length);
4940 }
else if (
sizeof(DST) == 3 &&
sizeof(SRC) == 3 && length >= 3 &&
4944 }
else if (
sizeof(DST) == 2 &&
sizeof(SRC) == 2 && length >= 3 &&
4960 #if defined(QT_QWS_DEPTH_24) 4964 blendUntransformed<qrgb888, qrgb888>(count, spans, userData);
4967 blend_untransformed_generic<RegularSpans>(count, spans, userData);
4973 #if defined(QT_QWS_DEPTH_18) 4977 blendUntransformed<qargb6666, qargb6666>(count, spans, userData);
4979 blendUntransformed<qargb6666, qrgb666>(count, spans, userData);
4982 blend_untransformed_generic<RegularSpans>(count, spans, userData);
4988 #if defined(QT_QWS_DEPTH_18) 4992 blendUntransformed<qrgb666, qargb6666>(count, spans, userData);
4994 blendUntransformed<qrgb666, qrgb666>(count, spans, userData);
4997 blend_untransformed_generic<RegularSpans>(count, spans, userData);
5003 #if defined(QT_QWS_DEPTH_16) 5007 blendUntransformed<qargb8565, qargb8565>(count, spans, userData);
5009 blendUntransformed<qargb8565, qrgb565>(count, spans, userData);
5012 blend_untransformed_generic<RegularSpans>(count, spans, userData);
5018 #if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16) 5022 blendUntransformed<qrgb565, qargb8565>(count, spans, userData);
5024 blendUntransformed<qrgb565, qrgb565>(count, spans, userData);
5027 blend_untransformed_generic<RegularSpans>(count, spans, userData);
5033 #if defined(QT_QWS_DEPTH_15) 5037 blendUntransformed<qargb8555, qargb8555>(count, spans, userData);
5039 blendUntransformed<qargb8555, qrgb555>(count, spans, userData);
5042 blend_untransformed_generic<RegularSpans>(count, spans, userData);
5048 #if defined(QT_QWS_DEPTH_15) 5052 blendUntransformed<qrgb555, qargb8555>(count, spans, userData);
5054 blendUntransformed<qrgb555, qrgb555>(count, spans, userData);
5057 blend_untransformed_generic<RegularSpans>(count, spans, userData);
5063 #if defined(QT_QWS_DEPTH_12) 5067 blendUntransformed<qargb4444, qargb4444>(count, spans, userData);
5069 blendUntransformed<qargb4444, qrgb444>(count, spans, userData);
5072 blend_untransformed_generic<RegularSpans>(count, spans, userData);
5078 #if defined(QT_QWS_DEPTH_12) 5082 blendUntransformed<qrgb444, qargb4444>(count, spans, userData);
5084 blendUntransformed<qrgb444, qrgb444>(count, spans, userData);
5087 blend_untransformed_generic<RegularSpans>(count, spans, userData);
5090 template <SpanMethod spanMethod>
5101 int xoff = -
qRound(-data->
dx) % image_width;
5102 int yoff = -
qRound(-data->
dy) % image_height;
5105 xoff += image_width;
5107 yoff += image_height;
5111 int length = spans->
len;
5112 int sx = (xoff + spans->
x) % image_width;
5113 int sy = (spans->
y + yoff) % image_height;
5121 int l =
qMin(image_width - sx, length);
5122 if (buffer_size < l)
5124 const uint *src = op.
src_fetch(src_buffer, &op, data, sy, sx, l);
5127 op.
func(dest, src, l, coverage);
5137 if (sx >= image_width)
5144 template <SpanMethod spanMethod>
5150 blend_tiled_generic<spanMethod>(count, spans, userData);
5158 int xoff = -
qRound(-data->
dx) % image_width;
5159 int yoff = -
qRound(-data->
dy) % image_height;
5162 xoff += image_width;
5164 yoff += image_height;
5168 int length = spans->
len;
5169 int sx = (xoff + spans->
x) % image_width;
5170 int sy = (spans->
y + yoff) % image_height;
5178 int l =
qMin(image_width - sx, length);
5179 if (buffer_size < l)
5184 op.
func(dest, src, l, coverage);
5187 x, spans->
y, l, coverage);
5197 template <
class DST,
class SRC>
5206 blend_src_generic<RegularSpans>(count, spans, userData);
5210 const bool modeSource = !SRC::hasAlpha() ||
5214 int xoff = -
qRound(-data->
dx) % image_width;
5215 int yoff = -
qRound(-data->
dy) % image_height;
5218 xoff += image_width;
5220 yoff += image_height;
5224 if (coverage == 0) {
5230 int length = spans->
len;
5231 int sx = (xoff + spans->
x) % image_width;
5232 int sy = (spans->
y + yoff) % image_height;
5238 if (modeSource && coverage == 255) {
5240 length =
qMin(image_width,length);
5243 int l =
qMin(image_width - sx, length);
5244 if (buffer_size < l)
5249 qt_memconvert<DST, SRC>(dest, src,
l);
5261 int copy_image_width =
qMin(image_width,
int(spans->
len));
5262 length = spans->
len - copy_image_width;
5264 DST *dest = src + copy_image_width;
5265 while (copy_image_width < length) {
5267 dest += copy_image_width;
5268 length -= copy_image_width;
5269 copy_image_width *= 2;
5275 int l =
qMin(image_width - sx, length);
5276 if (buffer_size < l)
5280 if (
sizeof(DST) == 3 &&
sizeof(SRC) == 3 && l >= 4 &&
5284 }
else if (
sizeof(DST) == 2 &&
sizeof(SRC) == 2 && l >= 2 &&
5303 #if defined(QT_QWS_DEPTH_24) 5307 blendTiled<qrgb888, qrgb888>(count, spans, userData);
5310 blend_tiled_generic<RegularSpans>(count, spans, userData);
5315 #if defined(QT_QWS_DEPTH_18) 5319 blendTiled<qargb6666, qargb6666>(count, spans, userData);
5321 blendTiled<qargb6666, qrgb666>(count, spans, userData);
5324 blend_tiled_generic<RegularSpans>(count, spans, userData);
5329 #if defined(QT_QWS_DEPTH_18) 5333 blendTiled<qrgb666, qargb6666>(count, spans, userData);
5335 blendTiled<qrgb666, qrgb666>(count, spans, userData);
5338 blend_tiled_generic<RegularSpans>(count, spans, userData);
5343 #if defined(QT_QWS_DEPTH_16) 5347 blendTiled<qargb8565, qargb8565>(count, spans, userData);
5349 blendTiled<qargb8565, qrgb565>(count, spans, userData);
5352 blend_tiled_generic<RegularSpans>(count, spans, userData);
5357 #if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16) 5361 blendTiled<qrgb565, qargb8565>(count, spans, userData);
5363 blendTiled<qrgb565, qrgb565>(count, spans, userData);
5366 blend_tiled_generic<RegularSpans>(count, spans, userData);
5371 #if defined(QT_QWS_DEPTH_15) 5375 blendTiled<qargb8555, qargb8555>(count, spans, userData);
5377 blendTiled<qargb8555, qrgb555>(count, spans, userData);
5380 blend_tiled_generic<RegularSpans>(count, spans, userData);
5385 #if defined(QT_QWS_DEPTH_15) 5389 blendTiled<qrgb555, qargb8555>(count, spans, userData);
5391 blendTiled<qrgb555, qrgb555>(count, spans, userData);
5394 blend_tiled_generic<RegularSpans>(count, spans, userData);
5399 #if defined(QT_QWS_DEPTH_12) 5403 blendTiled<qargb4444, qargb4444>(count, spans, userData);
5405 blendTiled<qargb4444, qrgb444>(count, spans, userData);
5408 blend_tiled_generic<RegularSpans>(count, spans, userData);
5413 #if defined(QT_QWS_DEPTH_12) 5417 blendTiled<qrgb444, qargb4444>(count, spans, userData);
5419 blendTiled<qrgb444, qrgb444>(count, spans, userData);
5422 blend_tiled_generic<RegularSpans>(count, spans, userData);
5425 template <
class DST,
class SRC>
5434 blend_src_generic<RegularSpans>(count, spans, userData);
5442 const int src_maxx = data->
texture.
x2 - 1;
5443 const int src_maxy = data->
texture.
y2 - 1;
5452 if (coverage == 0) {
5461 int x = int((data->
m21 * cy
5463 int y = int((data->
m22 * cy
5465 int length = spans->
len;
5468 const int l =
qMin(length, buffer_size);
5470 const SRC *
end = buffer +
l;
5478 const int distx = (x & 0x0000ffff) >> 8;
5479 const int disty = (y & 0x0000ffff) >> 8;
5481 if (x1 < src_minx) {
5483 }
else if (x1 >= src_maxx) {
5488 if (y1 < src_miny) {
5490 }
else if (y1 >= src_maxy) {
5503 t, SRC::alpha(disty));
5505 }
else if (y1 == y2) {
5509 t, SRC::alpha(distx));
5516 const SRC tr = src1[x2];
5518 const SRC br = src2[x2];
5519 const quint8 ax = SRC::alpha(distx);
5520 const quint8 iax = SRC::ialpha(distx);
5525 bl, SRC::alpha(disty));
5534 if (!SRC::hasAlpha() && coverage == 255) {
5536 }
else if (
sizeof(DST) == 3 && l >= 4 &&
5540 }
else if (
sizeof(DST) == 2 &&
sizeof(SRC) == 2 && l >= 2 &&
5559 if (coverage == 0) {
5574 int length = spans->
len;
5576 const int l =
qMin(length, buffer_size);
5577 const SRC *
end = buffer +
l;
5580 const qreal iw = w == 0 ? 1 : 1 / w;
5582 const qreal py = y * iw -
qreal(0.5);
5584 int x1 = int(px) - (px < 0);
5586 int y1 = int(py) - (py < 0);
5589 const int distx = int((px - x1) * 256);
5590 const int disty = int((py - y1) * 256);
5592 if (x1 < src_minx) {
5594 }
else if (x1 >= src_maxx) {
5599 if (y1 < src_miny) {
5601 }
else if (y1 >= src_maxy) {
5610 const SRC tr = src1[x2];
5612 const SRC br = src2[x2];
5613 const quint8 ax = SRC::alpha(distx);
5614 const quint8 iax = SRC::ialpha(distx);
5619 bl, SRC::alpha(disty));
5627 if (!SRC::hasAlpha() && coverage == 255) {
5629 }
else if (
sizeof(DST) == 3 && l >= 4 &&
5633 }
else if (
sizeof(DST) == 2 &&
sizeof(SRC) == 2 && l >= 2 &&
5650 #if defined(QT_QWS_DEPTH_24) 5654 blendTransformedBilinear<qrgb888, qrgb888>(count, spans, userData);
5657 blend_src_generic<RegularSpans>(count, spans, userData);
5662 #if defined(QT_QWS_DEPTH_18) 5666 blendTransformedBilinear<qargb6666, qargb6666>(count, spans, userData);
5668 blendTransformedBilinear<qargb6666, qrgb666>(count, spans, userData);
5671 blend_src_generic<RegularSpans>(count, spans, userData);
5676 #if defined(QT_QWS_DEPTH_18) 5680 blendTransformedBilinear<qrgb666, qargb6666>(count, spans, userData);
5682 blendTransformedBilinear<qrgb666, qrgb666>(count, spans, userData);
5685 blend_src_generic<RegularSpans>(count, spans, userData);
5690 #if defined(QT_QWS_DEPTH_16) 5694 blendTransformedBilinear<qargb8565, qargb8565>(count, spans, userData);
5696 blendTransformedBilinear<qargb8565, qrgb565>(count, spans, userData);
5699 blend_src_generic<RegularSpans>(count, spans, userData);
5705 #if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16) 5709 blendTransformedBilinear<qrgb565, qrgb565>(count, spans, userData);
5711 blendTransformedBilinear<qrgb565, qargb8565>(count, spans, userData);
5714 blend_src_generic<RegularSpans>(count, spans, userData);
5719 #if defined(QT_QWS_DEPTH_15) 5723 blendTransformedBilinear<qargb8555, qargb8555>(count, spans, userData);
5725 blendTransformedBilinear<qargb8555, qrgb555>(count, spans, userData);
5728 blend_src_generic<RegularSpans>(count, spans, userData);
5733 #if defined(QT_QWS_DEPTH_15) 5737 blendTransformedBilinear<qrgb555, qargb8555>(count, spans, userData);
5739 blendTransformedBilinear<qrgb555, qrgb555>(count, spans, userData);
5742 blend_src_generic<RegularSpans>(count, spans, userData);
5747 #if defined(QT_QWS_DEPTH_12) 5751 blendTransformedBilinear<qargb4444, qargb4444>(count, spans, userData);
5753 blendTransformedBilinear<qargb4444, qrgb444>(count, spans, userData);
5756 blend_src_generic<RegularSpans>(count, spans, userData);
5761 #if defined(QT_QWS_DEPTH_12) 5765 blendTransformedBilinear<qrgb444, qargb4444>(count, spans, userData);
5767 blendTransformedBilinear<qrgb444, qrgb444>(count, spans, userData);
5770 blend_src_generic<RegularSpans>(count, spans, userData);
5773 template <SpanMethod spanMethod>
5779 blend_src_generic<spanMethod>(count, spans, userData);
5798 uint *target = ((uint *)t) + spans->
x;
5804 int x = int((data->
m21 * cy
5806 int y = int((data->
m22 * cy
5809 int length = spans->
len;
5812 int l =
qMin(length, buffer_size);
5813 const uint *
end = buffer +
l;
5819 bool out = (px < 0) || (px >= image_width)
5820 || (py < 0) || (py >= image_height);
5822 int y_offset = py * scanline_offset;
5823 *b = out ?
uint(0) : image_bits[y_offset + px];
5829 func(target, buffer, l, coverage);
5832 spans->
x + spans->
len - length,
5833 spans->
y, l, coverage);
5846 uint *target = ((uint *)t) + spans->
x;
5856 int length = spans->
len;
5859 int l =
qMin(length, buffer_size);
5860 const uint *
end = buffer +
l;
5863 const qreal iw = w == 0 ? 1 : 1 / w;
5864 const qreal tx = x * iw;
5865 const qreal ty = y * iw;
5866 const int px = int(tx) - (tx < 0);
5867 const int py = int(ty) - (ty < 0);
5869 bool out = (px < 0) || (px >= image_width)
5870 || (py < 0) || (py >= image_height);
5872 int y_offset = py * scanline_offset;
5873 *b = out ?
uint(0) : image_bits[y_offset + px];
5881 func(target, buffer, l, coverage);
5884 spans->
x + spans->
len - length,
5885 spans->
y, l, coverage);
5894 template <
class DST,
class SRC>
5901 blend_src_generic<RegularSpans>(count, spans, userData);
5916 if (coverage == 0) {
5925 int x = int((data->
m21 * cy
5927 int y = int((data->
m22 * cy
5929 int length = spans->
len;
5932 const int l =
qMin(length, buffer_size);
5934 const SRC *
end = buffer +
l;
5937 const int px = (x >> 16);
5938 const int py = (y >> 16);
5940 if ((px < 0) || (px >= image_width) ||
5941 (py < 0) || (py >= image_height))
5953 if (!SRC::hasAlpha() && coverage == 255) {
5955 }
else if (
sizeof(DST) == 3 &&
sizeof(SRC) == 3 && l >= 4 &&
5959 }
else if (
sizeof(DST) == 2 &&
sizeof(SRC) == 2 && l >= 2 &&
5978 if (coverage == 0) {
5993 int length = spans->
len;
5995 const int l =
qMin(length, buffer_size);
5996 const SRC *
end = buffer +
l;
5999 const qreal iw = w == 0 ? 1 : 1 / w;
6000 const qreal tx = x * iw;
6001 const qreal ty = y * iw;
6003 const int px = int(tx) - (tx < 0);
6004 const int py = int(ty) - (ty < 0);
6006 if ((px < 0) || (px >= image_width) ||
6007 (py < 0) || (py >= image_height))
6019 if (!SRC::hasAlpha() && coverage == 255) {
6021 }
else if (
sizeof(DST) == 3 &&
sizeof(SRC) == 3 && l >= 4 &&
6025 }
else if (
sizeof(DST) == 2 &&
sizeof(SRC) == 2 && l >= 2 &&
6043 #if defined(QT_QWS_DEPTH_24) 6047 blendTransformed<qrgb888, qrgb888>(count, spans, userData);
6050 blend_src_generic<RegularSpans>(count, spans, userData);
6056 #if defined(QT_QWS_DEPTH_18) 6060 blendTransformed<qargb6666, qargb6666>(count, spans, userData);
6062 blendTransformed<qargb6666, qrgb666>(count, spans, userData);
6065 blend_src_generic<RegularSpans>(count, spans, userData);
6071 #if defined(QT_QWS_DEPTH_18) 6075 blendTransformed<qrgb666, qargb6666>(count, spans, userData);
6077 blendTransformed<qrgb666, qrgb666>(count, spans, userData);
6080 blend_src_generic<RegularSpans>(count, spans, userData);
6086 #if defined(QT_QWS_DEPTH_16) 6090 blendTransformed<qargb8565, qargb8565>(count, spans, userData);
6092 blendTransformed<qargb8565, qrgb565>(count, spans, userData);
6095 blend_src_generic<RegularSpans>(count, spans, userData);
6101 #if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16) 6105 blendTransformed<qrgb565, qargb8565>(count, spans, userData);
6107 blendTransformed<qrgb565, qrgb565>(count, spans, userData);
6110 blend_src_generic<RegularSpans>(count, spans, userData);
6116 #if defined(QT_QWS_DEPTH_15) 6120 blendTransformed<qargb8555, qargb8555>(count, spans, userData);
6122 blendTransformed<qargb8555, qrgb555>(count, spans, userData);
6125 blend_src_generic<RegularSpans>(count, spans, userData);
6131 #if defined(QT_QWS_DEPTH_15) 6135 blendTransformed<qrgb555, qargb8555>(count, spans, userData);
6137 blendTransformed<qrgb555, qrgb555>(count, spans, userData);
6140 blend_src_generic<RegularSpans>(count, spans, userData);
6146 #if defined(QT_QWS_DEPTH_12) 6150 blendTransformed<qargb4444, qargb4444>(count, spans, userData);
6152 blendTransformed<qargb4444, qrgb444>(count, spans, userData);
6155 blend_src_generic<RegularSpans>(count, spans, userData);
6161 #if defined(QT_QWS_DEPTH_12) 6165 blendTransformed<qrgb444, qargb4444>(count, spans, userData);
6167 blendTransformed<qrgb444, qrgb444>(count, spans, userData);
6170 blend_src_generic<RegularSpans>(count, spans, userData);
6173 template <SpanMethod spanMethod>
6179 blend_src_generic<spanMethod>(count, spans, userData);
6198 uint *target = ((uint *)t) + spans->
x;
6204 int x = int((data->
m21 * cy
6206 int y = int((data->
m22 * cy
6210 int length = spans->
len;
6212 int l =
qMin(length, buffer_size);
6213 const uint *
end = buffer +
l;
6220 if (px < 0) px += image_width;
6221 if (py < 0) py += image_height;
6222 int y_offset = py * scanline_offset;
6224 Q_ASSERT(px >= 0 && px < image_width);
6225 Q_ASSERT(py >= 0 && py < image_height);
6227 *b = image_bits[y_offset + px];
6233 func(target, buffer, l, coverage);
6236 spans->
x + spans->
len - length,
6237 spans->
y, l, coverage);
6250 uint *target = ((uint *)t) + spans->
x;
6261 int length = spans->
len;
6263 int l =
qMin(length, buffer_size);
6264 const uint *
end = buffer +
l;
6267 const qreal iw = w == 0 ? 1 : 1 / w;
6268 const qreal tx = x * iw;
6269 const qreal ty = y * iw;
6270 int px = int(tx) - (tx < 0);
6271 int py = int(ty) - (ty < 0);
6275 if (px < 0) px += image_width;
6276 if (py < 0) py += image_height;
6277 int y_offset = py * scanline_offset;
6279 Q_ASSERT(px >= 0 && px < image_width);
6280 Q_ASSERT(py >= 0 && py < image_height);
6282 *b = image_bits[y_offset + px];
6293 func(target, buffer, l, coverage);
6296 spans->
x + spans->
len - length,
6297 spans->
y, l, coverage);
6306 template <
class DST,
class SRC>
6313 blend_src_generic<RegularSpans>(count, spans, userData);
6328 if (coverage == 0) {
6337 int x = int((data->
m21 * cy
6339 int y = int((data->
m22 * cy
6341 int length = spans->
len;
6344 const int l =
qMin(length, buffer_size);
6346 const SRC *
end = buffer +
l;
6349 int px = (x >> 16) % image_width;
6350 int py = (y >> 16) % image_height;
6364 if (!SRC::hasAlpha() && coverage == 255) {
6366 }
else if (
sizeof(DST) == 3 &&
sizeof(SRC) == 3 && l >= 4 &&
6370 }
else if (
sizeof(DST) == 2 &&
sizeof(SRC) == 2 && l >= 2 &&
6389 if (coverage == 0) {
6404 int length = spans->
len;
6406 const int l =
qMin(length, buffer_size);
6407 const SRC *
end = buffer +
l;
6410 const qreal iw = w == 0 ? 1 : 1 / w;
6411 const qreal tx = x * iw;
6412 const qreal ty = y * iw;
6414 int px = int(tx) - (tx < 0);
6415 int py = int(ty) - (ty < 0);
6434 if (!SRC::hasAlpha() && coverage == 255) {
6436 }
else if (
sizeof(DST) == 3 &&
sizeof(SRC) == 3 && l >= 4 &&
6440 }
else if (
sizeof(DST) == 2 &&
sizeof(SRC) == 2 && l >= 2 &&
6458 #if defined(QT_QWS_DEPTH_24) 6462 blendTransformedTiled<qrgb888, qrgb888>(count, spans, userData);
6465 blend_src_generic<RegularSpans>(count, spans, userData);
6471 #if defined(QT_QWS_DEPTH_18) 6475 blendTransformedTiled<qargb6666, qargb6666>(count, spans, userData);
6477 blendTransformedTiled<qargb6666, qrgb666>(count, spans, userData);
6480 blend_src_generic<RegularSpans>(count, spans, userData);
6486 #if defined(QT_QWS_DEPTH_18) 6490 blendTransformedTiled<qrgb666, qargb6666>(count, spans, userData);
6492 blendTransformedTiled<qrgb666, qrgb666>(count, spans, userData);
6495 blend_src_generic<RegularSpans>(count, spans, userData);
6501 #if defined(QT_QWS_DEPTH_16) 6505 blendTransformedTiled<qargb8565, qargb8565>(count, spans, userData);
6507 blendTransformedTiled<qargb8565, qrgb565>(count, spans, userData);
6510 blend_src_generic<RegularSpans>(count, spans, userData);
6516 #if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16) 6520 blendTransformedTiled<qrgb565, qargb8565>(count, spans, userData);
6522 blendTransformedTiled<qrgb565, qrgb565>(count, spans, userData);
6525 blend_src_generic<RegularSpans>(count, spans, userData);
6531 #if defined(QT_QWS_DEPTH_15) 6535 blendTransformedTiled<qargb8555, qargb8555>(count, spans, userData);
6537 blendTransformedTiled<qargb8555, qrgb555>(count, spans, userData);
6540 blend_src_generic<RegularSpans>(count, spans, userData);
6546 #if defined(QT_QWS_DEPTH_15) 6550 blendTransformedTiled<qrgb555, qargb8555>(count, spans, userData);
6552 blendTransformedTiled<qrgb555, qrgb555>(count, spans, userData);
6555 blend_src_generic<RegularSpans>(count, spans, userData);
6561 #if defined(QT_QWS_DEPTH_12) 6565 blendTransformedTiled<qargb4444, qargb4444>(count, spans, userData);
6567 blendTransformedTiled<qargb4444, qrgb444>(count, spans, userData);
6570 blend_src_generic<RegularSpans>(count, spans, userData);
6576 #if defined(QT_QWS_DEPTH_12) 6580 blendTransformedTiled<qrgb444, qargb4444>(count, spans, userData);
6582 blendTransformedTiled<qrgb444, qrgb444>(count, spans, userData);
6585 blend_src_generic<RegularSpans>(count, spans, userData);
6588 # define SPANFUNC_POINTER(Name, Arg) Name<Arg> 6709 #if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS) 6714 blend_untransformed_generic<CallbackSpans>,
6715 blend_untransformed_generic<CallbackSpans>,
6716 blend_untransformed_generic<CallbackSpans>,
6717 blend_untransformed_generic<CallbackSpans>,
6718 blend_untransformed_generic<CallbackSpans>,
6719 blend_untransformed_argb<CallbackSpans>,
6720 blend_untransformed_generic<CallbackSpans>,
6721 blend_untransformed_generic<CallbackSpans>,
6722 blend_untransformed_generic<CallbackSpans>,
6723 blend_untransformed_generic<CallbackSpans>,
6724 blend_untransformed_generic<CallbackSpans>,
6725 blend_untransformed_generic<CallbackSpans>,
6726 blend_untransformed_generic<CallbackSpans>,
6727 blend_untransformed_generic<CallbackSpans>,
6728 blend_untransformed_generic<CallbackSpans>
6733 blend_tiled_generic<CallbackSpans>,
6734 blend_tiled_generic<CallbackSpans>,
6735 blend_tiled_generic<CallbackSpans>,
6736 blend_tiled_generic<CallbackSpans>,
6737 blend_tiled_generic<CallbackSpans>,
6738 blend_tiled_argb<CallbackSpans>,
6739 blend_tiled_generic<CallbackSpans>,
6740 blend_tiled_generic<CallbackSpans>,
6741 blend_tiled_generic<CallbackSpans>,
6742 blend_tiled_generic<CallbackSpans>,
6743 blend_tiled_generic<CallbackSpans>,
6744 blend_tiled_generic<CallbackSpans>,
6745 blend_tiled_generic<CallbackSpans>,
6746 blend_tiled_generic<CallbackSpans>,
6747 blend_tiled_generic<CallbackSpans>
6752 blend_src_generic<CallbackSpans>,
6753 blend_src_generic<CallbackSpans>,
6754 blend_src_generic<CallbackSpans>,
6755 blend_src_generic<CallbackSpans>,
6756 blend_src_generic<CallbackSpans>,
6757 blend_transformed_argb<CallbackSpans>,
6758 blend_src_generic<CallbackSpans>,
6759 blend_src_generic<CallbackSpans>,
6760 blend_src_generic<CallbackSpans>,
6761 blend_src_generic<CallbackSpans>,
6762 blend_src_generic<CallbackSpans>,
6763 blend_src_generic<CallbackSpans>,
6764 blend_src_generic<CallbackSpans>,
6765 blend_src_generic<CallbackSpans>,
6766 blend_src_generic<CallbackSpans>,
6771 blend_src_generic<CallbackSpans>,
6772 blend_src_generic<CallbackSpans>,
6773 blend_src_generic<CallbackSpans>,
6774 blend_src_generic<CallbackSpans>,
6775 blend_src_generic<CallbackSpans>,
6776 blend_transformed_tiled_argb<CallbackSpans>,
6777 blend_src_generic<CallbackSpans>,
6778 blend_src_generic<CallbackSpans>,
6779 blend_src_generic<CallbackSpans>,
6780 blend_src_generic<CallbackSpans>,
6781 blend_src_generic<CallbackSpans>,
6782 blend_src_generic<CallbackSpans>,
6783 blend_src_generic<CallbackSpans>,
6784 blend_src_generic<CallbackSpans>,
6785 blend_src_generic<CallbackSpans>
6790 blend_src_generic<CallbackSpans>,
6791 blend_src_generic<CallbackSpans>,
6792 blend_src_generic<CallbackSpans>,
6793 blend_src_generic<CallbackSpans>,
6794 blend_src_generic<CallbackSpans>,
6795 blend_src_generic<CallbackSpans>,
6796 blend_src_generic<CallbackSpans>,
6797 blend_src_generic<CallbackSpans>,
6798 blend_src_generic<CallbackSpans>,
6799 blend_src_generic<CallbackSpans>,
6800 blend_src_generic<CallbackSpans>,
6801 blend_src_generic<CallbackSpans>,
6802 blend_src_generic<CallbackSpans>,
6803 blend_src_generic<CallbackSpans>,
6804 blend_src_generic<CallbackSpans>
6809 blend_src_generic<CallbackSpans>,
6810 blend_src_generic<CallbackSpans>,
6811 blend_src_generic<CallbackSpans>,
6812 blend_src_generic<CallbackSpans>,
6813 blend_src_generic<CallbackSpans>,
6814 blend_src_generic<CallbackSpans>,
6815 blend_src_generic<CallbackSpans>,
6816 blend_src_generic<CallbackSpans>,
6817 blend_src_generic<CallbackSpans>,
6818 blend_src_generic<CallbackSpans>,
6819 blend_src_generic<CallbackSpans>,
6820 blend_src_generic<CallbackSpans>,
6821 blend_src_generic<CallbackSpans>,
6822 blend_src_generic<CallbackSpans>,
6823 blend_src_generic<CallbackSpans>
6826 #endif // QT_NO_RASTERCALLBACKS 6832 proc(count, spans, userData);
6835 #if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS) 6840 proc(count, spans, userData);
6842 #endif // QT_NO_RASTERCALLBACKS 6844 template <
class DST>
6848 int mapWidth,
int mapHeight,
int mapStride,
6852 const DST
c = qt_colorConvert<DST, quint32>(color, 0);
6853 DST *dest =
reinterpret_cast<DST*
>(rasterBuffer->
scanLine(y)) + x;
6854 const int destStride = rasterBuffer->
bytesPerLine() /
sizeof(DST);
6857 while (mapHeight--) {
6860 for (
int x = 0; x < mapWidth; x += 8) {
6861 uchar s = map[x >> 3];
6862 for (
int i = 0; i < 8; ++i) {
6887 while (mapHeight--) {
6890 for (uchar s = *map; s; s <<= 1) {
6913 bool isVerticalGradient =
6918 if (isVerticalGradient) {
6940 int off = int((((linear.
dy * (data->
m22 *
qreal(0.5) + data->
dy) + linear.
off) * gss) * FIXPT_SIZE));
6950 funcSolid(dst, spans->
len, color, spans->
coverage);
6955 blend_src_generic<RegularSpans>(count, spans, userData);
6963 bool isVerticalGradient =
6968 if (isVerticalGradient) {
6988 int off = int((((linear.
dy * (data->
m22 *
qreal(0.5) + data->
dy) + linear.
off) * gss) * FIXPT_SIZE));
7003 blend_src_generic<RegularSpans>(count, spans, userData);
7010 int mapWidth,
int mapHeight,
int mapStride)
7012 qt_bitmapblit_template<quint32>(rasterBuffer, x, y, color,
7013 map, mapWidth, mapHeight, mapStride);
7019 int mapWidth,
int mapHeight,
int mapStride)
7021 qt_bitmapblit_template<quint16>(rasterBuffer, x, y, color,
7022 map, mapWidth, mapHeight, mapStride);
7035 int mapWidth,
int mapHeight,
int mapStride,
7038 const quint16 c = qt_colorConvert<quint16, quint32>(color, 0);
7042 while (mapHeight--) {
7043 for (
int i = 0; i < mapWidth; ++i) {
7044 const int coverage = map[i];
7046 if (coverage == 0) {
7048 }
else if (coverage == 255) {
7051 int ialpha = 255 - coverage;
7067 smoothing =
qreal(2.0);
7077 for (
int i=0; i<256; ++i) {
7078 qt_pow_rgb_gamma[i] =
uchar(i);
7079 qt_pow_rgb_invgamma[i] =
uchar(i);
7082 for (
int i=0; i<256; ++i) {
7088 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) 7089 const qreal gray_gamma = 2.31;
7090 for (
int i=0; i<256; ++i)
7092 for (
int i=0; i<2048; ++i)
7101 int dr =
qRed(*dst);
7103 int db =
qBlue(*dst);
7113 sr =
qt_div_255(qt_pow_rgb_invgamma[sr] * a);
7114 sg =
qt_div_255(qt_pow_rgb_invgamma[sg] * a);
7115 sb =
qt_div_255(qt_pow_rgb_invgamma[sb] * a);
7122 *dst = ((a +
qt_div_255((255 - a) * da)) << 24)
7129 int mr =
qRed(coverage);
7130 int mg =
qGreen(coverage);
7131 int mb =
qBlue(coverage);
7133 dr = qt_pow_rgb_gamma[dr];
7134 dg = qt_pow_rgb_gamma[dg];
7135 db = qt_pow_rgb_gamma[db];
7141 nr = qt_pow_rgb_invgamma[nr];
7142 ng = qt_pow_rgb_invgamma[ng];
7143 nb = qt_pow_rgb_invgamma[nb];
7145 *dst =
qRgb(nr, ng, nb);
7148 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) 7149 static inline void grayBlendPixel(
quint32 *dst,
int coverage,
int sr,
int sg,
int sb)
7152 int dr =
qRed(*dst);
7154 int db =
qBlue(*dst);
7156 dr = qt_pow_gamma[dr];
7157 dg = qt_pow_gamma[dg];
7158 db = qt_pow_gamma[db];
7160 int alpha = coverage;
7161 int ialpha = 255 - alpha;
7162 int nr = (sr * alpha + ialpha * dr) / 255;
7163 int ng = (sg * alpha + ialpha * dg) / 255;
7164 int nb = (sb * alpha + ialpha * db) / 255;
7166 nr = qt_pow_invgamma[nr];
7167 ng = qt_pow_invgamma[ng];
7168 nb = qt_pow_invgamma[nb];
7170 *dst =
qRgb(nr, ng, nb);
7177 int mapWidth,
int mapHeight,
int mapStride,
7183 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) 7184 int sr =
qRed(color);
7186 int sb =
qBlue(color);
7188 sr = qt_pow_gamma[sr];
7189 sg = qt_pow_gamma[sg];
7190 sb = qt_pow_gamma[sb];
7191 bool opaque_src = (
qAlpha(color) == 255);
7196 while (mapHeight--) {
7197 for (
int i = 0; i < mapWidth; ++i) {
7198 const int coverage = map[i];
7200 if (coverage == 0) {
7202 }
else if (coverage == 255) {
7205 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) 7207 &&
qAlpha(dest[i]) == 255) {
7208 grayBlendPixel(dest+i, coverage, sr, sg, sb);
7212 int ialpha = 255 - coverage;
7221 int bottom =
qMin(y + mapHeight, rasterBuffer->
height());
7223 int top =
qMax(y, 0);
7224 map += (top - y) * mapStride;
7226 const_cast<QClipData *
>(clip)->initialize();
7227 for (
int yp = top; yp<bottom; ++yp) {
7232 for (
int i=0; i<line.
count; ++i) {
7235 int start = qMax<int>(x, clip.
x);
7236 int end = qMin<int>(x + mapWidth, clip.
x + clip.
len);
7238 for (
int xp=start; xp<
end; ++xp) {
7239 const int coverage = map[xp - x];
7241 if (coverage == 0) {
7243 }
else if (coverage == 255) {
7246 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) 7248 &&
qAlpha(dest[xp]) == 255) {
7249 grayBlendPixel(dest+xp, coverage, sr, sg, sb);
7253 int ialpha = 255 - coverage;
7267 const uint *src,
int mapWidth,
int mapHeight,
int srcStride,
7272 int sr =
qRed(color);
7274 int sb =
qBlue(color);
7277 sr = qt_pow_rgb_gamma[sr];
7278 sg = qt_pow_rgb_gamma[sg];
7279 sb = qt_pow_rgb_gamma[sb];
7287 while (mapHeight--) {
7288 for (
int i = 0; i < mapWidth; ++i) {
7289 const uint coverage = src[i];
7290 if (coverage == 0xffffffff) {
7292 }
else if (coverage != 0xff000000) {
7301 int bottom =
qMin(y + mapHeight, rasterBuffer->
height());
7303 int top =
qMax(y, 0);
7304 src += (top - y) * srcStride;
7306 const_cast<QClipData *
>(clip)->initialize();
7307 for (
int yp = top; yp<bottom; ++yp) {
7312 for (
int i=0; i<line.
count; ++i) {
7315 int start = qMax<int>(x, clip.
x);
7316 int end = qMin<int>(x + mapWidth, clip.
x + clip.
len);
7318 for (
int xp=start; xp<
end; ++xp) {
7319 const uint coverage = src[xp - x];
7320 if (coverage == 0xffffffff) {
7322 }
else if (coverage != 0xff000000) {
7335 int x,
int y,
int width,
int height,
7340 qt_rectfill<T>(
reinterpret_cast<T*
>(rasterBuffer->
buffer()),
7345 #define QT_RECTFILL(T) \ 7346 inline static void qt_rectfill_##T(QRasterBuffer *rasterBuffer, \ 7347 int x, int y, int width, int height, \ 7350 qt_rectfill_template<T>(rasterBuffer, x, y, width, height, color); \ 7366 int x,
int y,
int width,
int height,
7369 qt_rectfill<quint32>(
reinterpret_cast<quint32 *
>(rasterBuffer->
buffer()),
7380 { 0, 0, 0, 0, 0, 0 },
7440 qt_rectfill_qargb8565
7454 qt_rectfill_qargb6666
7468 qt_rectfill_qargb8555
7489 qt_rectfill_qargb4444
7493 #if defined (Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS) 7497 { 0, 0, 0, 0, 0, 0 },
7501 blend_src_generic<CallbackSpans>,
7507 blend_src_generic<CallbackSpans>,
7513 blend_src_generic<CallbackSpans>,
7519 blend_src_generic<CallbackSpans>,
7525 blend_src_generic<CallbackSpans>,
7531 blend_src_generic<CallbackSpans>,
7537 blend_src_generic<CallbackSpans>,
7543 blend_src_generic<CallbackSpans>,
7549 blend_src_generic<CallbackSpans>,
7555 blend_src_generic<CallbackSpans>,
7561 blend_src_generic<CallbackSpans>,
7567 blend_src_generic<CallbackSpans>,
7573 blend_src_generic<CallbackSpans>,
7579 blend_src_generic<CallbackSpans>,
7585 blend_src_generic<CallbackSpans>,
7593 #if defined(Q_CC_MSVC) && !defined(_MIPS_) 7594 template <
class DST,
class SRC>
7597 const DST
c = qt_colorConvert<DST, SRC>(color, 0);
7604 template <
class DST,
class SRC>
7607 const DST
c = qt_colorConvert<DST, SRC>(color, 0);
7608 int n = (count + 7) / 8;
7609 switch (count & 0x07)
7611 case 0:
do { *dest++ =
c;
7612 case 7: *dest++ =
c;
7613 case 6: *dest++ =
c;
7614 case 5: *dest++ =
c;
7615 case 4: *dest++ =
c;
7616 case 3: *dest++ =
c;
7617 case 2: *dest++ =
c;
7618 case 1: *dest++ =
c;
7628 case 2: *dest++ = value;
7629 case 1: *dest = value;
7634 const int align = (
quintptr)(dest) & 0x3;
7636 case 2: *dest++ = value; --count;
7639 const quint32 value32 = (value << 16) | value;
7640 qt_memfill(reinterpret_cast<quint32*>(dest), value32, count / 2);
7642 dest[count - 1] = value;
7648 qt_memfill_template<quint16, quint16>(dest, color, count);
7662 qt_memfill32 = qt_memfill_template<quint32, quint32>;
7671 }
else if (features &
SSE2) {
7672 qt_memfill32 = qt_memfill32_sse2;
7673 qt_memfill16 = qt_memfill16_sse2;
7680 }
else if (features &
SSE) {
7683 #ifdef QT_HAVE_3DNOW 7685 qt_memfill32 = qt_memfill32_sse3dnow;
7692 if (features &
MMX) {
7693 functionForModeAsm = qt_functionForMode_MMX;
7695 functionForModeSolidAsm = qt_functionForModeSolid_MMX;
7697 #ifdef QT_HAVE_3DNOW 7699 functionForModeAsm = qt_functionForMode_MMX3DNOW;
7700 functionForModeSolidAsm = qt_functionForModeSolid_MMX3DNOW;
7705 extern void qt_blend_rgb32_on_rgb32_mmx(uchar *destPixels,
int dbpl,
7706 const uchar *srcPixels,
int sbpl,
7709 extern void qt_blend_argb32_on_argb32_mmx(uchar *destPixels,
int dbpl,
7710 const uchar *srcPixels,
int sbpl,
7723 if (features & SSE) {
7724 extern void qt_blend_rgb32_on_rgb32_sse(uchar *destPixels,
int dbpl,
7725 const uchar *srcPixels,
int sbpl,
7728 extern void qt_blend_argb32_on_argb32_sse(uchar *destPixels,
int dbpl,
7729 const uchar *srcPixels,
int sbpl,
7741 if (features & SSE2) {
7742 extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels,
int dbpl,
7743 const uchar *srcPixels,
int sbpl,
7746 extern void qt_blend_argb32_on_argb32_sse2(uchar *destPixels,
int dbpl,
7747 const uchar *srcPixels,
int sbpl,
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);
7759 qt_fetch_radial_gradient = qt_fetch_radial_gradient_sse2;
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,
7777 if (features & SSE) {
7778 functionForModeAsm = qt_functionForMode_SSE;
7779 functionForModeSolidAsm = qt_functionForModeSolid_SSE;
7781 #ifdef QT_HAVE_3DNOW 7783 functionForModeAsm = qt_functionForMode_SSE3DNOW;
7784 functionForModeSolidAsm = qt_functionForModeSolid_SSE3DNOW;
7791 if (features & SSE2) {
7792 extern void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels,
7793 const uint *srcPixels,
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);
7800 functionForModeAsm[0] = comp_func_SourceOver_sse2;
7803 functionForModeSolidAsm[0] = comp_func_solid_SourceOver_sse2;
7807 #elif defined(QT_HAVE_SSE2) 7809 if (features & SSE2) {
7810 functionForModeAsm = qt_functionForMode_onlySSE2;
7811 functionForModeSolidAsm = qt_functionForModeSolid_onlySSE2;
7815 #ifdef QT_HAVE_IWMMXT 7817 functionForModeAsm = qt_functionForMode_IWMMXT;
7818 functionForModeSolidAsm = qt_functionForModeSolid_IWMMXT;
7823 #if defined(QT_HAVE_ARM_SIMD) 7828 #elif defined(QT_HAVE_NEON) 7829 if (features &
NEON) {
7854 qt_memfill32 = qt_memfill32_neon;
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);
7859 qt_fetch_radial_gradient = qt_fetch_radial_gradient_neon;
7863 if (functionForModeSolidAsm) {
7865 functionForModeSolidAsm[destinationMode] = functionForModeSolid_C[destinationMode];
7869 for (
int mode = 12; mode < 24; ++mode)
7870 functionForModeSolidAsm[mode] = functionForModeSolid_C[mode];
7872 functionForModeSolid = functionForModeSolidAsm;
7874 if (functionForModeAsm)
7875 functionForMode = functionForModeAsm;
7892 #ifdef QT_QWS_DEPTH_GENERIC 7895 int qrgb::len_red = 0;
7896 int qrgb::len_green = 0;
7897 int qrgb::len_blue = 0;
7898 int qrgb::len_alpha = 0;
7899 int qrgb::off_red = 0;
7900 int qrgb::off_green = 0;
7901 int qrgb::off_blue = 0;
7902 int qrgb::off_alpha = 0;
7904 template <
typename SRC>
7906 int x,
int y,
int width,
int height,
7907 int dstStride,
int srcStride)
7910 + y * dstStride + x * qrgb::bpp;
7912 srcStride = srcStride /
sizeof(SRC) - width;
7913 dstStride -= (width * qrgb::bpp);
7915 for (
int j = 0; j < height; ++j) {
7916 for (
int i = 0; i < width; ++i) {
7917 const quint32 v = qt_convertToRgb<SRC>(*src++);
7918 #if Q_BYTE_ORDER == Q_BIG_ENDIAN 7919 for (
int j = qrgb::bpp - 1; j >= 0; --j)
7920 *dest8++ = (v >> (8 * j)) & 0xff;
7922 for (
int j = 0; j < qrgb::bpp; ++j)
7923 *dest8++ = (v >> (8 * j)) & 0xff;
7934 int x,
int y,
int width,
int height,
7935 int dstStride,
int srcStride)
7937 qt_rectconvert_rgb<quint32>(dest, src, x, y, width, height,
7938 dstStride, srcStride);
7943 int x,
int y,
int width,
int height,
7944 int dstStride,
int srcStride)
7946 qt_rectconvert_rgb<quint16>(dest, src, x, y, width, height,
7947 dstStride, srcStride);
7950 #endif // QT_QWS_DEPTH_GENERIC
qt_memfill16_func qt_memfill16
void handleSpans(int count, const QSpan *spans, const QSpanData *data, T &handler)
Q_STATIC_TEMPLATE_FUNCTION void fetchTransformedBilinear_pixelBounds(int max, int l1, int l2, int &v1, int &v2)
const uint *QT_FASTCALL qt_fetch_radial_gradient_plain(uint *buffer, const Operator *op, const QSpanData *data, int y, int x, int length)
Q_STATIC_TEMPLATE_FUNCTION void blend_tiled_argb(int count, const QSpan *spans, void *userData)
void qBlendTextureCallback(int count, const QSpan *spans, void *userData)
void(* qt_memfill32_func)(quint32 *dest, quint32 value, int count)
static uint *QT_FASTCALL destFetchARGB32P(uint *, QRasterBuffer *rasterBuffer, int x, int y, int)
static void blend_transformed_tiled_rgb666(int count, const QSpan *spans, void *userData)
const uint *(QT_FASTCALL * SourceFetchProc)(uint *buffer, const Operator *o, const QSpanData *data, int y, int x, int length)
static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Overlay_impl(uint *dest, const uint *src, int length, const T &coverage)
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16(uint x, uint a)
Q_STATIC_TEMPLATE_FUNCTION void blendTransformed(int count, const QSpan *spans, void *userData)
static void blend_color_argb(int count, const QSpan *spans, void *userData)
qt_memfill32_func qt_memfill32
void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, int length, uint color, uint const_alpha)
Q_STATIC_TEMPLATE_FUNCTION uint QT_FASTCALL qt_fetchPixel(const uchar *scanLine, int x, const QVector< QRgb > *rgb)
QIntegerForSizeof< void * >::Unsigned quintptr
AlphamapBlitFunc alphamapBlit
void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha)
static uint interpolate_4_pixels_16(uint tl, uint tr, uint bl, uint br, int distx, int disty)
void interpolate_pixel_4(DST *dest, const SRC *src, quint32 alpha)
void qt_rectconvert(DST *dest, const SRC *src, int x, int y, int width, int height, int dstStride, int srcStride)
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
static void blend_tiled_rgb666(int count, const QSpan *spans, void *userData)
void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha)
#define GRADIENT_STOPTABLE_SIZE
Q_STATIC_TEMPLATE_SPECIALIZATION void madd_4(DST *dest, const quint32 alpha, const SRC *src)
static void blend_untransformed_argb8565(int count, const QSpan *spans, void *userData)
uchar qt_pow_rgb_gamma[256]
static const ProcessSpans processTextureSpansCallback[NBlendTypes][QImage::NImageFormats]
static void blend_tiled_rgb888(int count, const QSpan *spans, void *userData)
CompositionMode
Defines the modes supported for digital image compositing.
void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_transformed_tiled_rgb888(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Multiply_impl(uint *dest, const uint *src, int length, const T &coverage)
static Operator getOperator(const QSpanData *data, const QSpan *spans, int spanCount)
static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void QT_FASTCALL comp_func_solid_Exclusion_impl(uint *dest, int length, uint color, const T &coverage)
static const uint *QT_FASTCALL qt_fetch_linear_gradient(uint *buffer, const Operator *op, const QSpanData *data, int y, int x, int length)
Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb)
BitmapBlitFunc bitmapBlit
void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha)
static int lighten_op(int dst, int src, int da, int sa)
Q_STATIC_TEMPLATE_FUNCTION void blendTransformedTiled(int count, const QSpan *spans, void *userData)
static int multiply_op(int dst, int src, int da, int sa)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_HardLight_impl(uint *dest, const uint *src, int length, const T &coverage)
#define SPANFUNC_POINTER(Name, Arg)
static void blend_transformed_tiled_argb6666(int count, const QSpan *spans, void *userData)
static void qt_rectfill_nonpremul_quint32(QRasterBuffer *rasterBuffer, int x, int y, int width, int height, quint32 color)
Q_STATIC_TEMPLATE_FUNCTION void blend_tiled_generic(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Difference_impl(uint *dest, const uint *src, int length, const T &coverage)
void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha)
void(QT_FASTCALL * DestStoreProc)(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
static SourceFetchProc qt_fetch_radial_gradient
static quint16 interpolate_pixel_rgb16_255(quint16 x, quint8 a, quint16 y, quint8 b)
static const FetchPixelProc fetchPixelProc[QImage::NImageFormats]
void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha)
static void qt_memfill_quint16(quint16 *dest, quint16 color, int count)
#define Q_WS_WIN
Defined on Windows.
const uint * fetch(int x, int y, int len)
static void blend_transformed_bilinear_argb8565(int count, const QSpan *spans, void *userData)
void store(uint *dest, const uint src) const
void qt_bitmapblit_template(QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *map, int mapWidth, int mapHeight, int mapStride, DST dummy=0)
#define QT_MEMFILL_USHORT(dest, length, color)
Q_STATIC_TEMPLATE_SPECIALIZATION quint32 eff_alpha_4(quint32 alpha, const T *)
static int overlay_op(int dst, int src, int da, int sa)
void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha)
QT_FT_SpanFunc ProcessSpans
static void blend_transformed_bilinear_argb6666(int count, const QSpan *spans, void *userData)
void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, int length, uint color, uint const_alpha)
#define BILINEAR_DOWNSCALE_BOUNDS_PROLOG
static CompositionFunction functionForMode_C[]
static uint qt_gradient_pixel_fixed(const QGradientData *data, int fixed_pos)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_ColorBurn_impl(uint *dest, int length, uint color, const T &coverage)
void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_ColorBurn_impl(uint *dest, const uint *src, int length, const T &coverage)
void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha)
static uint hardlight_op(int dst, int src, int da, int sa)
static void QT_FASTCALL getLinearGradientValues(LinearGradientValues *v, const QSpanData *data)
long ASN1_INTEGER_get ASN1_INTEGER * a
SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats]
void QT_FASTCALL blendUntransformed_unaligned(DST *dest, const SRC *src, quint8 coverage, int length)
void process(int x, int y, int len, int coverage, const uint *src, int offset)
MemRotateFunc qMemRotateFunctions[QImage::NImageFormats][3]
static void blend_transformed_argb6666(int count, const QSpan *spans, void *userData)
void qt_build_pow_tables()
static const WinVersion WindowsVersion
the version of the Windows operating system on which the application is run (Windows only) ...
#define Q_STATIC_TEMPLATE_FUNCTION
void interpolate_pixel_unaligned_2(DST *dest, const SRC *src, quint16 alpha)
QBlendBase(QSpanData *d, Operator o)
static uint qt_gradient_pixel(const QGradientData *data, qreal pos)
void QT_FASTCALL comp_func_solid_HardLight(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_Exclusion(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint)
void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest, const uint *src, int length, uint const_alpha)
static uint qt_gradient_clamp(const QGradientData *data, int ipos)
void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_transformed_rgb444(int count, const QSpan *spans, void *userData)
static uint *QT_FASTCALL destFetchARGB32(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
int qRed(QRgb rgb)
Returns the red component of the ARGB quadruplet rgb.
void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, int length, uint color, uint const_alpha)
static void qt_bitmapblit_quint32(QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *map, int mapWidth, int mapHeight, int mapStride)
static void rgbBlendPixel(quint32 *dst, int coverage, int sr, int sg, int sb)
static quint32 interpolate_pixel_rgb16x2_255(quint32 x, quint8 a, quint32 y, quint8 b)
QPainter::CompositionMode compositionMode
static void blend_color_rgb16(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_HardLight_impl(uint *dest, int length, uint color, const T &coverage)
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
#define SPANFUNC_POINTER_FETCHPIXEL(Arg)
void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_transformed_tiled_argb4444(int count, const QSpan *spans, void *userData)
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_tiled_argb8565(int count, const QSpan *spans, void *userData)
Q_GUI_EXPORT_INLINE int qRed(QRgb rgb)
void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha)
struct QConicalGradientData::@233 center
static int difference_op(int dst, int src, int da, int sa)
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha)
#define QT_MEMFILL_UINT(dest, length, color)
static const CompositionFunctionSolid * functionForModeSolid
static uint *QT_FASTCALL destFetchMonoLsb(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
Q_STATIC_TEMPLATE_SPECIALIZATION void madd_2(DST *dest, const quint16 alpha, const SRC *src)
void qBlendTexture(int count, const QSpan *spans, void *userData)
void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha)
#define Q_STATIC_TEMPLATE_SPECIALIZATION
QPartialCoverage(uint const_alpha)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Lighten_impl(uint *dest, int length, uint color, const T &coverage)
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)
QFuture< void > map(Sequence &sequence, MapFunction function)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static uint *QT_FASTCALL destFetchRGB16(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
Q_GUI_EXPORT_INLINE QRgb qRgba(int r, int g, int b, int a)
SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats]
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Lighten_impl(uint *dest, const uint *src, int length, const T &coverage)
static void blend_tiled_argb6666(int count, const QSpan *spans, void *userData)
static void qt_gradient_quint16(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_ColorDodge_impl(uint *dest, int length, uint color, const T &coverage)
static DestStoreProc destStoreProc[QImage::NImageFormats]
Q_STATIC_TEMPLATE_FUNCTION void blend_src_generic(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Exclusion_impl(uint *dest, const uint *src, int length, const T &coverage)
static void blend_transformed_bilinear_rgb555(int count, const QSpan *spans, void *userData)
void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
void QT_FASTCALL blendUntransformed_dest24(DST *dest, const SRC *src, quint8 coverage, int length)
void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha)
Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x)
void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha)
static int mix_alpha(int da, int sa)
static void blend_transformed_tiled_argb8555(int count, const QSpan *spans, void *userData)
void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha)
struct QClipData::ClipLine * m_clipLines
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b)
void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha)
static void blend_transformed_bilinear_argb8555(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_SPECIALIZATION quint16 alpha_2(const T *src)
Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_argb(int count, const QSpan *spans, void *userData)
#define SPANFUNC_POINTER_FETCHHUNTRANSFORMED(Arg)
RadialGradientValues radial
void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha)
#define QT_PREPEND_NAMESPACE(name)
This macro qualifies identifier with the full namespace.
static void QT_FASTCALL destStoreARGB32(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
static void blend_untransformed_rgb444(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_SPECIALIZATION void QT_FASTCALL blendUntransformed(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void blendTransformedBilinear(int count, const QSpan *spans, void *userData)
static void blend_untransformed_rgb565(int count, const QSpan *spans, void *userData)
void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha)
static const char * data(const QByteArray &arr)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Multiply_impl(uint *dest, int length, uint color, const T &coverage)
static void QT_FASTCALL destStoreMono(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
Q_GUI_EXPORT qreal qt_fontsmoothing_gamma
qreal qAtan2(qreal x, qreal y)
void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha)
static TextureBlendType getBlendType(const QSpanData *data)
void store(uint *dest, const uint src) const
static void blend_tiled_rgb555(int count, const QSpan *spans, void *userData)
int qGray(int r, int g, int b)
static void drawBufferSpan(QSpanData *data, const uint *buffer, int bufsize, int x, int y, int length, uint const_alpha)
void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_transformed_argb8565(int count, const QSpan *spans, void *userData)
void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha)
static void QT_FASTCALL destStoreRGB16(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
DrawHelper qDrawHelper[QImage::NImageFormats]
static void qt_alphamapblit_quint32(QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *map, int mapWidth, int mapHeight, int mapStride, const QClipData *clip)
Q_STATIC_TEMPLATE_SPECIALIZATION quint16 eff_ialpha_2(quint16 alpha, const T *)
static void blend_transformed_rgb555(int count, const QSpan *spans, void *userData)
Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb)
qreal qPow(qreal x, qreal y)
QConicalGradientData conical
static void blend_sourceOver_rgb16_rgb16(quint16 *dest, const quint16 *src, int length, const quint8 alpha, const quint8 ialpha)
Q_STATIC_TEMPLATE_FUNCTION void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
static void blend_transformed_argb8555(int count, const QSpan *spans, void *userData)
static DestFetchProc destFetchProc[QImage::NImageFormats]
static const SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats]
void interpolate_pixel(DST &dest, quint8 a, const SRC &src, quint8 b)
const T & at(int i) const
Returns the item at index position i in the vector.
void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha)
DrawHelper qDrawHelperCallback[QImage::NImageFormats]
BlendSrcGeneric(QSpanData *d, Operator o)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Screen_impl(uint *dest, const uint *src, int length, const T &coverage)
static void blend_color_generic_callback(int count, const QSpan *spans, void *userData)
static void qt_bitmapblit_quint16(QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *map, int mapWidth, int mapHeight, int mapStride)
QRgb qConvertRgb16To32(uint c)
static void qt_memfill32_setup(quint32 *dest, quint32 value, int count)
const uint qt_bayer_matrix[16][16]
static void blend_transformed_tiled_argb8565(int count, const QSpan *spans, void *userData)
Q_GUI_EXPORT_INLINE int qGray(int r, int g, int b)
void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_transformed_bilinear_argb4444(int count, const QSpan *spans, void *userData)
void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_untransformed_argb8555(int count, const QSpan *spans, void *userData)
qreal angle(const QPointF &p1, const QPointF &p2)
const uchar * scanLine(int y) const
static const uint *QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Operator *, const QSpanData *data, int y, int x, int length)
uint(QT_FASTCALL * FetchPixelProc)(const uchar *scanLine, int x, const QVector< QRgb > *)
#define SPANFUNC_POINTER_DESTFETCH(Arg)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Difference_impl(uint *dest, int length, uint color, const T &coverage)
void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, int length, uint color, uint const_alpha)
static void blend_untransformed_rgb666(int count, const QSpan *spans, void *userData)
virtual void drawBufferSpan(const uint *buffer, int bufsize, int x, int y, int length, uint const_alpha)
Draws the given buffer.
#define PRELOAD_COND2(x, y)
QRasterPaintEngine * rasterEngine
void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha)
Q_STATIC_TEMPLATE_FUNCTION void blendColor(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_SoftLight_impl(uint *dest, int length, uint color, const T &coverage)
Q_STATIC_INLINE_FUNCTION quint32p fromRawData(quint32 v)
QRasterBuffer * rasterBuffer
void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha)
void qt_memconvert(DST *dest, const SRC *src, int count)
uint qDetectCPUFeatures()
void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha)
Q_STATIC_TEMPLATE_FUNCTION void blend_untransformed_generic(int count, const QSpan *spans, void *userData)
void(QT_FASTCALL * CompositionFunction)(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_solid_SoftLight(uint *dest, int length, uint color, uint const_alpha)
struct QLinearGradientData::@229 origin
static void blend_transformed_bilinear_rgb666(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION uint *QT_FASTCALL destFetch(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)
void QT_FASTCALL blendUntransformed_dest16(DST *dest, const SRC *src, quint8 coverage, int length)
static void qt_alphargbblit_quint32(QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uint *src, int mapWidth, int mapHeight, int srcStride, const QClipData *clip)
void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, int length, uint color, uint const_alpha)
struct QRadialGradientData::@232 focal
void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, int length, uint color, uint const_alpha)
static void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *map, int mapWidth, int mapHeight, int mapStride, const QClipData *)
void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha)
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)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Darken_impl(uint *dest, int length, uint color, const T &coverage)
static CompositionFunctionSolid functionForModeSolid_C[]
void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, int length, uint const_alpha)
#define PRELOAD_INIT2(x, y)
void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha)
if(void) toggleToolbarShown
void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha)
static void blend_color_generic(int count, const QSpan *spans, void *userData)
static void blend_transformed_tiled_rgb555(int count, const QSpan *spans, void *userData)
static int color_burn_op(int dst, int src, int da, int sa)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Screen_impl(uint *dest, int length, uint color, const T &coverage)
ushort qConvertRgb32To16(uint c)
void(QT_FASTCALL * CompositionFunctionSolid)(uint *dest, int length, uint color, uint const_alpha)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_ColorDodge_impl(uint *dest, const uint *src, int length, const T &coverage)
static const int buffer_size
int comp_func_Plus_one_pixel(uint d, const uint s)
uchar qt_pow_invgamma[2048]
Q_STATIC_TEMPLATE_FUNCTION void comp_func_SoftLight_impl(uint *dest, const uint *src, int length, const T &coverage)
void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Plus_impl(uint *dest, const uint *src, int length, const T &coverage)
Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb)
void qt_rectfill_template(QRasterBuffer *rasterBuffer, int x, int y, int width, int height, quint32 color, T dummy=0)
LinearGradientValues linear
void(* qt_memfill16_func)(quint16 *dest, quint16 value, int count)
void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha)
#define SPANFUNC_POINTER_BLENDCOLOR(DST)
Q_STATIC_INLINE_FUNCTION int qt_div_255(int x)
#define comp_func_Clear_impl(dest, length, const_alpha)
void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha)
SourceFetchProc src_fetch
const QVector< QRgb > * colorTable
QRadialGradientData radial
struct QLinearGradientData::@230 end
static void blend_transformed_rgb888(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_SPECIALIZATION quint16 eff_alpha_2(quint16 alpha, const T *)
static Q_DECL_CONSTEXPR bool qFuzzyIsNull(double d)
void qInitDrawhelperAsm()
CompositionFunctionSolid funcSolid
Q_STATIC_TEMPLATE_FUNCTION void blend_untransformed_argb(int count, const QSpan *spans, void *userData)
void QT_FASTCALL comp_func_solid_ColorDodge(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_NotSourceAndNotDestination(uint *dest, int length, uint color, uint const_alpha)
static void blend_transformed_rgb666(int count, const QSpan *spans, void *userData)
static const CompositionFunction * functionForMode
void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, uint color, uint const_alpha)
static void blend_transformed_argb4444(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_Darken_impl(uint *dest, const uint *src, int length, const T &coverage)
static void blend_untransformed_rgb555(int count, const QSpan *spans, void *userData)
static void QT_FASTCALL destStoreMonoLsb(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length)
Q_STATIC_TEMPLATE_FUNCTION const uint *QT_FASTCALL qt_fetchUntransformed(uint *buffer, const Operator *, const QSpanData *data, int y, int x, int length)
Q_STATIC_TEMPLATE_FUNCTION const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *, const QSpanData *data, int y, int x, int length)
void blend_sourceOver_4(DST *dest, const SRC *src)
void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha)
static int soft_light_op(int dst, int src, int da, int sa)
static void blend_transformed_bilinear_rgb888(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void blend_transformed_tiled_argb(int count, const QSpan *spans, void *userData)
void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_tiled_argb4444(int count, const QSpan *spans, void *userData)
static void blend_transformed_bilinear_rgb444(int count, const QSpan *spans, void *userData)
int qGreen(QRgb rgb)
Returns the green component of the ARGB quadruplet rgb.
static void QT_FASTCALL getRadialGradientValues(RadialGradientValues *v, const QSpanData *data)
static void blend_transformed_tiled_rgb444(int count, const QSpan *spans, void *userData)
static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats]
uchar qt_pow_rgb_invgamma[256]
void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha)
QImageIOHandler * handler
static QRgb findNearestColor(QRgb color, QRasterBuffer *rbuf)
QLinearGradientData linear
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Plus_impl(uint *dest, int length, uint color, const T &coverage)
int qBlue(QRgb rgb)
Returns the blue component of the ARGB quadruplet rgb.
static void qt_memfill16_setup(quint16 *dest, quint16 value, int count)
static const KeyPair *const end
void interpolate_pixel_2(DST *dest, const SRC *src, quint16 alpha)
void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha)
Q_STATIC_TEMPLATE_FUNCTION const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const QSpanData *data, int y, int x, int length)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
void store(int x, int y, int len)
enum QSpanData::Type type
struct QRadialGradientData::@231 center
static void blend_tiled_rgb444(int count, const QSpan *spans, void *userData)
static void blend_untransformed_rgb888(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_SPECIALIZATION quint32 eff_ialpha_4(quint32 alpha, const T *)
static void blend_untransformed_argb6666(int count, const QSpan *spans, void *userData)
static int color_dodge_op(int dst, int src, int da, int sa)
void qt_memfill_template(DST *dest, SRC color, int count)
SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats]
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16_32(uint x, uint a)
static int darken_op(int dst, int src, int da, int sa)
static uint *QT_FASTCALL destFetchMono(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
bool monoDestinationWithClut
Q_DECL_CONSTEXPR int qRound(qreal d)
static void blend_tiled_argb8555(int count, const QSpan *spans, void *userData)
void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha)
#define SPANFUNC_POINTER_DESTSTORE(DEST)
static void blend_transformed_tiled_rgb565(int count, const QSpan *spans, void *userData)
QPainter::CompositionMode mode
void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha)
void qt_memfill(T *dest, T value, int count)
static void qt_gradient_quint32(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_SPECIALIZATION quint32 alpha_4(const T *src)
uint *QT_FASTCALL * DestFetchProc(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length)
Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void *userData)
Q_STATIC_TEMPLATE_FUNCTION void comp_func_solid_Overlay_impl(uint *dest, int length, uint color, const T &coverage)
void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha)
static void blend_untransformed_argb4444(int count, const QSpan *spans, void *userData)
static void blend_transformed_rgb565(int count, const QSpan *spans, void *userData)