Qt 4.8
qdrawhelper_sse2.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include <private/qdrawhelper_x86_p.h>
43 
44 #ifdef QT_HAVE_SSE2
45 
46 #include <private/qdrawingprimitive_sse2_p.h>
47 #include <private/qpaintengine_raster_p.h>
48 
50 
51 void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl,
52  const uchar *srcPixels, int sbpl,
53  int w, int h,
54  int const_alpha)
55 {
56  const quint32 *src = (const quint32 *) srcPixels;
57  quint32 *dst = (quint32 *) destPixels;
58  if (const_alpha == 256) {
59  const __m128i alphaMask = _mm_set1_epi32(0xff000000);
60  const __m128i nullVector = _mm_set1_epi32(0);
61  const __m128i half = _mm_set1_epi16(0x80);
62  const __m128i one = _mm_set1_epi16(0xff);
63  const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
64  for (int y = 0; y < h; ++y) {
65  BLEND_SOURCE_OVER_ARGB32_SSE2(dst, src, w, nullVector, half, one, colorMask, alphaMask);
66  dst = (quint32 *)(((uchar *) dst) + dbpl);
67  src = (const quint32 *)(((const uchar *) src) + sbpl);
68  }
69  } else if (const_alpha != 0) {
70  // dest = (s + d * sia) * ca + d * cia
71  // = s * ca + d * (sia * ca + cia)
72  // = s * ca + d * (1 - sa*ca)
73  const_alpha = (const_alpha * 255) >> 8;
74  const __m128i nullVector = _mm_set1_epi32(0);
75  const __m128i half = _mm_set1_epi16(0x80);
76  const __m128i one = _mm_set1_epi16(0xff);
77  const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
78  const __m128i constAlphaVector = _mm_set1_epi16(const_alpha);
79  for (int y = 0; y < h; ++y) {
80  BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_SSE2(dst, src, w, nullVector, half, one, colorMask, constAlphaVector)
81  dst = (quint32 *)(((uchar *) dst) + dbpl);
82  src = (const quint32 *)(((const uchar *) src) + sbpl);
83  }
84  }
85 }
86 
87 // qblendfunctions.cpp
88 void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl,
89  const uchar *srcPixels, int sbpl,
90  int w, int h,
91  int const_alpha);
92 
93 void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
94  const uchar *srcPixels, int sbpl,
95  int w, int h,
96  int const_alpha)
97 {
98  const quint32 *src = (const quint32 *) srcPixels;
99  quint32 *dst = (quint32 *) destPixels;
100  if (const_alpha != 256) {
101  if (const_alpha != 0) {
102  const __m128i nullVector = _mm_set1_epi32(0);
103  const __m128i half = _mm_set1_epi16(0x80);
104  const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
105 
106  const_alpha = (const_alpha * 255) >> 8;
107  int one_minus_const_alpha = 255 - const_alpha;
108  const __m128i constAlphaVector = _mm_set1_epi16(const_alpha);
109  const __m128i oneMinusConstAlpha = _mm_set1_epi16(one_minus_const_alpha);
110  for (int y = 0; y < h; ++y) {
111  int x = 0;
112 
113  // First, align dest to 16 bytes:
114  ALIGNMENT_PROLOGUE_16BYTES(dst, x, w) {
115  dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha);
116  }
117 
118  for (; x < w-3; x += 4) {
119  __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
120  if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVector, nullVector)) != 0xffff) {
121  const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
122  __m128i result;
123  INTERPOLATE_PIXEL_255_SSE2(result, srcVector, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half);
124  _mm_store_si128((__m128i *)&dst[x], result);
125  }
126  }
127  for (; x<w; ++x) {
128  dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha);
129  }
130  dst = (quint32 *)(((uchar *) dst) + dbpl);
131  src = (const quint32 *)(((const uchar *) src) + sbpl);
132  }
133  }
134  } else {
135  qt_blend_rgb32_on_rgb32(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
136  }
137 }
138 
139 void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels, const uint *srcPixels, int length, uint const_alpha)
140 {
141  Q_ASSERT(const_alpha < 256);
142 
143  const quint32 *src = (const quint32 *) srcPixels;
144  quint32 *dst = (quint32 *) destPixels;
145 
146  const __m128i nullVector = _mm_set1_epi32(0);
147  const __m128i half = _mm_set1_epi16(0x80);
148  const __m128i one = _mm_set1_epi16(0xff);
149  const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
150  if (const_alpha == 255) {
151  const __m128i alphaMask = _mm_set1_epi32(0xff000000);
152  BLEND_SOURCE_OVER_ARGB32_SSE2(dst, src, length, nullVector, half, one, colorMask, alphaMask);
153  } else {
154  const __m128i constAlphaVector = _mm_set1_epi16(const_alpha);
155  BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_SSE2(dst, src, length, nullVector, half, one, colorMask, constAlphaVector);
156  }
157 }
158 
159 void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uint const_alpha)
160 {
161  int x = 0;
162 
163  if (const_alpha == 255) {
164  // 1) Prologue: align destination on 16 bytes
165  ALIGNMENT_PROLOGUE_16BYTES(dst, x, length)
166  dst[x] = comp_func_Plus_one_pixel(dst[x], src[x]);
167 
168  // 2) composition with SSE2
169  for (; x < length - 3; x += 4) {
170  const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
171  const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
172 
173  const __m128i result = _mm_adds_epu8(srcVector, dstVector);
174  _mm_store_si128((__m128i *)&dst[x], result);
175  }
176 
177  // 3) Epilogue:
178  for (; x < length; ++x)
179  dst[x] = comp_func_Plus_one_pixel(dst[x], src[x]);
180  } else {
181  const int one_minus_const_alpha = 255 - const_alpha;
182  const __m128i constAlphaVector = _mm_set1_epi16(const_alpha);
183  const __m128i oneMinusConstAlpha = _mm_set1_epi16(one_minus_const_alpha);
184 
185  // 1) Prologue: align destination on 16 bytes
186  ALIGNMENT_PROLOGUE_16BYTES(dst, x, length)
187  dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
188 
189  const __m128i half = _mm_set1_epi16(0x80);
190  const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
191  // 2) composition with SSE2
192  for (; x < length - 3; x += 4) {
193  const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
194  const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
195 
196  __m128i result = _mm_adds_epu8(srcVector, dstVector);
197  INTERPOLATE_PIXEL_255_SSE2(result, result, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half)
198  _mm_store_si128((__m128i *)&dst[x], result);
199  }
200 
201  // 3) Epilogue:
202  for (; x < length; ++x)
203  dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
204  }
205 }
206 
207 void QT_FASTCALL comp_func_Source_sse2(uint *dst, const uint *src, int length, uint const_alpha)
208 {
209  if (const_alpha == 255) {
210  ::memcpy(dst, src, length * sizeof(uint));
211  } else {
212  const int ialpha = 255 - const_alpha;
213 
214  int x = 0;
215 
216  // 1) prologue, align on 16 bytes
217  ALIGNMENT_PROLOGUE_16BYTES(dst, x, length)
218  dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], ialpha);
219 
220  // 2) interpolate pixels with SSE2
221  const __m128i half = _mm_set1_epi16(0x80);
222  const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
223  const __m128i constAlphaVector = _mm_set1_epi16(const_alpha);
224  const __m128i oneMinusConstAlpha = _mm_set1_epi16(ialpha);
225  for (; x < length - 3; x += 4) {
226  const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
227  __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
228  INTERPOLATE_PIXEL_255_SSE2(dstVector, srcVector, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half)
229  _mm_store_si128((__m128i *)&dst[x], dstVector);
230  }
231 
232  // 3) Epilogue
233  for (; x < length; ++x)
234  dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], ialpha);
235  }
236 }
237 
238 void qt_memfill32_sse2(quint32 *dest, quint32 value, int count)
239 {
240  if (count < 7) {
241  switch (count) {
242  case 6: *dest++ = value;
243  case 5: *dest++ = value;
244  case 4: *dest++ = value;
245  case 3: *dest++ = value;
246  case 2: *dest++ = value;
247  case 1: *dest = value;
248  }
249  return;
250  };
251 
252  const int align = (quintptr)(dest) & 0xf;
253  switch (align) {
254  case 4: *dest++ = value; --count;
255  case 8: *dest++ = value; --count;
256  case 12: *dest++ = value; --count;
257  }
258 
259  int count128 = count / 4;
260  __m128i *dst128 = reinterpret_cast<__m128i*>(dest);
261  const __m128i value128 = _mm_set_epi32(value, value, value, value);
262 
263  int n = (count128 + 3) / 4;
264  switch (count128 & 0x3) {
265  case 0: do { _mm_stream_si128(dst128++, value128);
266  case 3: _mm_stream_si128(dst128++, value128);
267  case 2: _mm_stream_si128(dst128++, value128);
268  case 1: _mm_stream_si128(dst128++, value128);
269  } while (--n > 0);
270  }
271 
272  const int rest = count & 0x3;
273  if (rest) {
274  switch (rest) {
275  case 3: dest[count - 3] = value;
276  case 2: dest[count - 2] = value;
277  case 1: dest[count - 1] = value;
278  }
279  }
280 }
281 
282 void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, uint color, uint const_alpha)
283 {
284  if ((const_alpha & qAlpha(color)) == 255) {
285  qt_memfill32_sse2(destPixels, color, length);
286  } else {
287  if (const_alpha != 255)
288  color = BYTE_MUL(color, const_alpha);
289 
290  const quint32 minusAlphaOfColor = qAlpha(~color);
291  int x = 0;
292 
293  quint32 *dst = (quint32 *) destPixels;
294  const __m128i colorVector = _mm_set1_epi32(color);
295  const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
296  const __m128i half = _mm_set1_epi16(0x80);
297  const __m128i minusAlphaOfColorVector = _mm_set1_epi16(minusAlphaOfColor);
298 
299  ALIGNMENT_PROLOGUE_16BYTES(dst, x, length)
300  destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor);
301 
302  for (; x < length-3; x += 4) {
303  __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
304  BYTE_MUL_SSE2(dstVector, dstVector, minusAlphaOfColorVector, colorMask, half);
305  dstVector = _mm_add_epi8(colorVector, dstVector);
306  _mm_store_si128((__m128i *)&dst[x], dstVector);
307  }
308  for (;x < length; ++x)
309  destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor);
310  }
311 }
312 
313 CompositionFunctionSolid qt_functionForModeSolid_onlySSE2[numCompositionFunctions] = {
314  comp_func_solid_SourceOver_sse2,
347 };
348 
349 CompositionFunction qt_functionForMode_onlySSE2[numCompositionFunctions] = {
350  comp_func_SourceOver_sse2,
353  comp_func_Source_sse2,
362  comp_func_Plus_sse2,
383 };
384 
385 void qt_memfill16_sse2(quint16 *dest, quint16 value, int count)
386 {
387  if (count < 3) {
388  switch (count) {
389  case 2: *dest++ = value;
390  case 1: *dest = value;
391  }
392  return;
393  }
394 
395  const int align = (quintptr)(dest) & 0x3;
396  switch (align) {
397  case 2: *dest++ = value; --count;
398  }
399 
400  const quint32 value32 = (value << 16) | value;
401  qt_memfill32_sse2(reinterpret_cast<quint32*>(dest), value32, count / 2);
402 
403  if (count & 0x1)
404  dest[count - 1] = value;
405 }
406 
407 void qt_bitmapblit32_sse2(QRasterBuffer *rasterBuffer, int x, int y,
408  quint32 color,
409  const uchar *src, int width, int height, int stride)
410 {
411  quint32 *dest = reinterpret_cast<quint32*>(rasterBuffer->scanLine(y)) + x;
412  const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32);
413 
414  const __m128i c128 = _mm_set1_epi32(color);
415  const __m128i maskmask1 = _mm_set_epi32(0x10101010, 0x20202020,
416  0x40404040, 0x80808080);
417  const __m128i maskadd1 = _mm_set_epi32(0x70707070, 0x60606060,
418  0x40404040, 0x00000000);
419 
420  if (width > 4) {
421  const __m128i maskmask2 = _mm_set_epi32(0x01010101, 0x02020202,
422  0x04040404, 0x08080808);
423  const __m128i maskadd2 = _mm_set_epi32(0x7f7f7f7f, 0x7e7e7e7e,
424  0x7c7c7c7c, 0x78787878);
425  while (height--) {
426  for (int x = 0; x < width; x += 8) {
427  const quint8 s = src[x >> 3];
428  if (!s)
429  continue;
430  __m128i mask1 = _mm_set1_epi8(s);
431  __m128i mask2 = mask1;
432 
433  mask1 = _mm_and_si128(mask1, maskmask1);
434  mask1 = _mm_add_epi8(mask1, maskadd1);
435  _mm_maskmoveu_si128(c128, mask1, (char*)(dest + x));
436  mask2 = _mm_and_si128(mask2, maskmask2);
437  mask2 = _mm_add_epi8(mask2, maskadd2);
438  _mm_maskmoveu_si128(c128, mask2, (char*)(dest + x + 4));
439  }
440  dest += destStride;
441  src += stride;
442  }
443  } else {
444  while (height--) {
445  const quint8 s = *src;
446  if (s) {
447  __m128i mask1 = _mm_set1_epi8(s);
448  mask1 = _mm_and_si128(mask1, maskmask1);
449  mask1 = _mm_add_epi8(mask1, maskadd1);
450  _mm_maskmoveu_si128(c128, mask1, (char*)(dest));
451  }
452  dest += destStride;
453  src += stride;
454  }
455  }
456 }
457 
458 void qt_bitmapblit16_sse2(QRasterBuffer *rasterBuffer, int x, int y,
459  quint32 color,
460  const uchar *src, int width, int height, int stride)
461 {
462  const quint16 c = qt_colorConvert<quint16, quint32>(color, 0);
463  quint16 *dest = reinterpret_cast<quint16*>(rasterBuffer->scanLine(y)) + x;
464  const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16);
465 
466  const __m128i c128 = _mm_set1_epi16(c);
467 #if defined(Q_CC_MSVC)
468 # pragma warning(disable: 4309) // truncation of constant value
469 #endif
470  const __m128i maskmask = _mm_set_epi16(0x0101, 0x0202, 0x0404, 0x0808,
471  0x1010, 0x2020, 0x4040, 0x8080);
472  const __m128i maskadd = _mm_set_epi16(0x7f7f, 0x7e7e, 0x7c7c, 0x7878,
473  0x7070, 0x6060, 0x4040, 0x0000);
474 
475  while (height--) {
476  for (int x = 0; x < width; x += 8) {
477  const quint8 s = src[x >> 3];
478  if (!s)
479  continue;
480  __m128i mask = _mm_set1_epi8(s);
481  mask = _mm_and_si128(mask, maskmask);
482  mask = _mm_add_epi8(mask, maskadd);
483  _mm_maskmoveu_si128(c128, mask, (char*)(dest + x));
484  }
485  dest += destStride;
486  src += stride;
487  }
488 }
489 
490 class QSimdSse2
491 {
492 public:
493  typedef __m128i Int32x4;
494  typedef __m128 Float32x4;
495 
496  union Vect_buffer_i { Int32x4 v; int i[4]; };
497  union Vect_buffer_f { Float32x4 v; float f[4]; };
498 
499  static inline Float32x4 v_dup(float x) { return _mm_set1_ps(x); }
500  static inline Float32x4 v_dup(double x) { return _mm_set1_ps(x); }
501  static inline Int32x4 v_dup(int x) { return _mm_set1_epi32(x); }
502  static inline Int32x4 v_dup(uint x) { return _mm_set1_epi32(x); }
503 
504  static inline Float32x4 v_add(Float32x4 a, Float32x4 b) { return _mm_add_ps(a, b); }
505  static inline Int32x4 v_add(Int32x4 a, Int32x4 b) { return _mm_add_epi32(a, b); }
506 
507  static inline Float32x4 v_max(Float32x4 a, Float32x4 b) { return _mm_max_ps(a, b); }
508  static inline Float32x4 v_min(Float32x4 a, Float32x4 b) { return _mm_min_ps(a, b); }
509  static inline Int32x4 v_min_16(Int32x4 a, Int32x4 b) { return _mm_min_epi16(a, b); }
510 
511  static inline Int32x4 v_and(Int32x4 a, Int32x4 b) { return _mm_and_si128(a, b); }
512 
513  static inline Float32x4 v_sub(Float32x4 a, Float32x4 b) { return _mm_sub_ps(a, b); }
514  static inline Int32x4 v_sub(Int32x4 a, Int32x4 b) { return _mm_sub_epi32(a, b); }
515 
516  static inline Float32x4 v_mul(Float32x4 a, Float32x4 b) { return _mm_mul_ps(a, b); }
517 
518  static inline Float32x4 v_sqrt(Float32x4 x) { return _mm_sqrt_ps(x); }
519 
520  static inline Int32x4 v_toInt(Float32x4 x) { return _mm_cvttps_epi32(x); }
521 
522  // pre-VS 2008 doesn't have cast intrinsics, whereas 2008 and later requires it
523  // (same deal with gcc prior to 4.0)
524 #if (defined(Q_CC_MSVC) && _MSC_VER < 1500) || (defined(Q_CC_GNU) && __GNUC__ < 4)
525  static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b)
526  {
527  union Convert { Int32x4 vi; Float32x4 vf; } convert;
528  convert.vf = _mm_cmpgt_ps(a, b);
529  return convert.vi;
530  }
531 #else
532  static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return _mm_castps_si128(_mm_cmpgt_ps(a, b)); }
533 #endif
534 };
535 
536 const uint * QT_FASTCALL qt_fetch_radial_gradient_sse2(uint *buffer, const Operator *op, const QSpanData *data,
537  int y, int x, int length)
538 {
539  return qt_fetch_radial_gradient_template<QRadialFetchSimd<QSimdSse2> >(buffer, op, data, y, x, length);
540 }
541 
542 
544 
545 #endif // QT_HAVE_SSE2
static const int numCompositionFunctions
void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, int length, uint color, uint const_alpha)
void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha)
QIntegerForSizeof< void * >::Unsigned quintptr
Definition: qglobal.h:986
void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha)
unsigned char c[8]
Definition: qnumeric_p.h:62
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha)
int comp_func_Plus_one_pixel_const_alpha(uint d, const uint s, const uint const_alpha, const uint one_minus_const_alpha)
void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL 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)
void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha)
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned char quint8
Definition: qglobal.h:934
int bytesPerLine() const
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
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)
#define QT_FASTCALL
Definition: qglobal.h:1161
void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha)
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Definition: qrgb.h:66
void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha)
unsigned char uchar
Definition: qglobal.h:994
void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha)
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)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha)
unsigned short quint16
Definition: qglobal.h:936
void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha)
static const char * data(const QByteArray &arr)
unsigned int uint
Definition: qglobal.h:996
void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha)
uchar * scanLine(int y)
void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha)
static bool convert(const QVariant::Private *d, QVariant::Type t, void *result, bool *ok)
Definition: qvariant.cpp:627
void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha)
void(QT_FASTCALL * 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)
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)
void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, int length, uint color, uint const_alpha)
unsigned int quint32
Definition: qglobal.h:938
void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha)
void(QT_FASTCALL * CompositionFunctionSolid)(uint *dest, int length, uint color, uint const_alpha)
int comp_func_Plus_one_pixel(uint d, const uint s)
void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint)
void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_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)
void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha)
#define ALIGNMENT_PROLOGUE_16BYTES(ptr, i, length)
Definition: qsimd_p.h:231
void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha)
void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha)
void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha)