Coverage Report

Created: 2026-04-01 07:24

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qtbase/src/gui/painting/qcompositionfunctions.cpp
Line
Count
Source
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#include <qglobal.h>
6
7
#include "qdrawhelper_p.h"
8
#include "qrgba64_p.h"
9
#include "qrgbafloat.h"
10
11
QT_BEGIN_NAMESPACE
12
13
/* The constant alpha factor describes an alpha factor that gets applied
14
   to the result of the composition operation combining it with the destination.
15
16
   The intent is that if const_alpha == 0. we get back dest, and if const_alpha == 1.
17
   we get the unmodified operation
18
19
   result = src op dest
20
   dest = result * const_alpha + dest * (1. - const_alpha)
21
22
   This means that in the comments below, the first line is the const_alpha==255 case, the
23
   second line the general one.
24
25
   In the lines below:
26
   s == src, sa == alpha(src), sia = 1 - alpha(src)
27
   d == dest, da == alpha(dest), dia = 1 - alpha(dest)
28
   ca = const_alpha, cia = 1 - const_alpha
29
30
   The methods exist in two variants. One where we have a constant source, the other
31
   where the source is an array of pixels.
32
*/
33
34
struct Argb32OperationsC
35
{
36
    typedef QRgb Type;
37
    typedef quint8 Scalar;
38
    typedef QRgb OptimalType;
39
    typedef quint8 OptimalScalar;
40
41
    static const Type clear;
42
    static bool isOpaque(Type val)
43
0
    { return qAlpha(val) == 255; }
44
    static bool isTransparent(Type val)
45
0
    { return qAlpha(val) == 0; }
46
    static Scalar scalarFrom8bit(uint8_t a)
47
0
    { return a; }
48
    static void memfill(Type *ptr, Type value, qsizetype len)
49
0
    { qt_memfill32(ptr, value, len); }
50
    static void memcpy(Type *Q_DECL_RESTRICT dest, const Type *Q_DECL_RESTRICT src, qsizetype len)
51
0
    { ::memcpy(dest, src, len * sizeof(Type)); }
52
53
    static OptimalType load(const Type *ptr)
54
3.45M
    { return *ptr; }
55
    static OptimalType convert(const Type &val)
56
3.45M
    { return val; }
57
    static void store(Type *ptr, OptimalType value)
58
3.45M
    { *ptr = value; }
59
    static OptimalType add(OptimalType a, OptimalType b)
60
0
    { return a + b; }
61
    static OptimalScalar add(OptimalScalar a, OptimalScalar b)
62
0
    { return a + b; }
63
    static OptimalType plus(OptimalType a, OptimalType b)
64
0
    { return comp_func_Plus_one_pixel(a, b); }
65
    static OptimalScalar alpha(OptimalType val)
66
0
    { return qAlpha(val); }
67
    static OptimalScalar invAlpha(OptimalScalar c)
68
0
    { return 255 - c; }
69
    static OptimalScalar invAlpha(OptimalType val)
70
0
    { return alpha(~val); }
71
    static OptimalScalar scalar(Scalar v)
72
0
    { return v; }
73
    static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
74
0
    { return BYTE_MUL(val, a); }
75
    static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
76
3.45M
    { return INTERPOLATE_PIXEL_255(x, a1, y, a2); }
77
    static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
78
0
    { return BYTE_MUL(val, a); }
79
    static OptimalScalar multiplyAlpha8bit(OptimalScalar val, uint8_t a)
80
0
    { return qt_div_255(val * a); }
81
    static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
82
0
    { return INTERPOLATE_PIXEL_255(x, a1, y, a2); }
83
};
84
85
const Argb32OperationsC::Type Argb32OperationsC::clear = 0;
86
87
typedef Argb32OperationsC Argb32Operations;
88
89
struct Rgba64OperationsBase
90
{
91
    typedef QRgba64 Type;
92
    typedef quint16 Scalar;
93
94
    static const Type clear;
95
96
    static bool isOpaque(Type val)
97
0
    { return val.isOpaque(); }
98
    static bool isTransparent(Type val)
99
0
    { return val.isTransparent(); }
100
    static Scalar scalarFrom8bit(uint8_t a)
101
0
    { return a * 257; }
102
103
    static void memfill(Type *ptr, Type value, qsizetype len)
104
0
    { qt_memfill64((quint64*)ptr, value, len); }
105
    static void memcpy(Type *Q_DECL_RESTRICT dest, const Type *Q_DECL_RESTRICT src, qsizetype len)
106
0
    { ::memcpy(dest, src, len * sizeof(Type)); }
107
};
108
109
#if QT_CONFIG(raster_64bit)
110
const Rgba64OperationsBase::Type Rgba64OperationsBase::clear = QRgba64::fromRgba64(0);
111
112
struct Rgba64OperationsC : public Rgba64OperationsBase
113
{
114
    typedef QRgba64 OptimalType;
115
    typedef quint16 OptimalScalar;
116
117
    static OptimalType load(const Type *ptr)
118
0
    { return *ptr; }
119
    static OptimalType convert(const Type &val)
120
0
    { return val; }
121
    static void store(Type *ptr, OptimalType value)
122
0
    { *ptr = value; }
123
    static OptimalType add(OptimalType a, OptimalType b)
124
0
    { return QRgba64::fromRgba64((quint64)a + (quint64)b); }
125
    static OptimalScalar add(OptimalScalar a, OptimalScalar b)
126
0
    { return a + b; }
127
    static OptimalType plus(OptimalType a, OptimalType b)
128
0
    { return addWithSaturation(a, b); }
129
    static OptimalScalar alpha(OptimalType val)
130
0
    { return val.alpha(); }
131
    static OptimalScalar invAlpha(Scalar c)
132
0
    { return 65535 - c; }
133
    static OptimalScalar invAlpha(OptimalType val)
134
0
    { return 65535 - alpha(val); }
135
    static OptimalScalar scalar(Scalar v)
136
0
    { return v; }
137
    static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
138
0
    { return multiplyAlpha255(val, a); }
139
    static OptimalScalar multiplyAlpha8bit(OptimalScalar val, uint8_t a)
140
0
    { return qt_div_255(val * a); }
141
    static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
142
0
    { return interpolate255(x, a1, y, a2); }
143
    static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
144
0
    { return multiplyAlpha65535(val, a); }
145
    static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
146
0
    { return interpolate65535(x, a1, y, a2); }
147
};
148
149
#if defined(__SSE2__)
150
struct Rgba64OperationsSSE2 : public Rgba64OperationsBase
151
{
152
    typedef __m128i OptimalType;
153
    typedef __m128i OptimalScalar;
154
155
    static OptimalType load(const Type *ptr)
156
10.6M
    {
157
10.6M
        return _mm_loadl_epi64(reinterpret_cast<const __m128i *>(ptr));
158
10.6M
    }
159
    static OptimalType convert(const Type &value)
160
9.91M
    {
161
9.91M
#ifdef Q_PROCESSOR_X86_64
162
9.91M
        return _mm_cvtsi64_si128(value);
163
#else
164
        return load(&value);
165
#endif
166
9.91M
    }
167
    static void store(Type *ptr, OptimalType value)
168
10.2M
    {
169
10.2M
        _mm_storel_epi64(reinterpret_cast<__m128i *>(ptr), value);
170
10.2M
    }
171
    static OptimalType add(OptimalType a, OptimalType b)
172
0
    {
173
0
        return _mm_add_epi16(a, b);
174
0
    }
175
//    same as above:
176
//    static OptimalScalar add(OptimalScalar a, OptimalScalar b)
177
    static OptimalType plus(OptimalType a, OptimalType b)
178
362k
    {
179
362k
        return _mm_adds_epu16(a, b);
180
362k
    }
181
    static OptimalScalar alpha(OptimalType c)
182
0
    {
183
0
        return _mm_shufflelo_epi16(c, _MM_SHUFFLE(3, 3, 3, 3));
184
0
    }
185
    static OptimalScalar invAlpha(Scalar c)
186
0
    {
187
0
        return scalar(65535 - c);
188
0
    }
189
    static OptimalScalar invAlpha(OptimalType c)
190
0
    {
191
0
        return _mm_xor_si128(_mm_set1_epi16(-1), alpha(c));
192
0
    }
193
    static OptimalScalar scalar(Scalar n)
194
0
    {
195
0
        return _mm_shufflelo_epi16(_mm_cvtsi32_si128(n), _MM_SHUFFLE(0, 0, 0, 0));
196
0
    }
197
    static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
198
0
    {
199
0
        return multiplyAlpha255(val, a);
200
0
    }
201
//    same as above:
202
//    static OptimalScalar multiplyAlpha8bit(OptimalScalar a, uint8_t a)
203
    static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
204
9.97M
    {
205
9.97M
        return interpolate255(x, a1, y, a2);
206
9.97M
    }
207
    static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
208
0
    {
209
0
        return multiplyAlpha65535(val, a);
210
0
    }
211
    // a2 is const-ref because otherwise MSVC2015@x86 complains that it can't 16-byte align the argument.
212
    static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, const OptimalScalar &a2)
213
0
    {
214
0
        return interpolate65535(x, a1, y, a2);
215
0
    }
216
};
217
#endif
218
219
#if defined(__ARM_NEON__)
220
struct Rgba64OperationsNEON : public Rgba64OperationsBase
221
{
222
    typedef uint16x4_t OptimalType;
223
    typedef uint16x4_t OptimalScalar;
224
225
    static OptimalType load(const Type *ptr)
226
    {
227
        return vreinterpret_u16_u64(vld1_u64(reinterpret_cast<const uint64_t *>(ptr)));
228
    }
229
    static OptimalType convert(const Type &val)
230
    {
231
        return vreinterpret_u16_u64(vmov_n_u64(val));
232
    }
233
    static void store(Type *ptr, OptimalType value)
234
    {
235
        vst1_u64(reinterpret_cast<uint64_t *>(ptr), vreinterpret_u64_u16(value));
236
    }
237
    static OptimalType add(OptimalType a, OptimalType b)
238
    {
239
        return vadd_u16(a, b);
240
    }
241
//    same as above:
242
//    static OptimalScalar add(OptimalScalar a, OptimalScalar b)
243
    static OptimalType plus(OptimalType a, OptimalType b)
244
    {
245
        return vqadd_u16(a, b);
246
    }
247
    static OptimalScalar alpha(OptimalType c)
248
    {
249
        return vdup_lane_u16(c, 3);
250
    }
251
    static OptimalScalar invAlpha(Scalar c)
252
    {
253
        return scalar(65535 - c);
254
    }
255
    static OptimalScalar invAlpha(OptimalType c)
256
    {
257
        return vmvn_u16(alpha(c));
258
    }
259
    static OptimalScalar scalar(Scalar n)
260
    {
261
        return vdup_n_u16(n);
262
    }
263
    static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
264
    {
265
        return multiplyAlpha255(val, a);
266
    }
267
//    same as above:
268
//    static OptimalScalar multiplyAlpha8bit(OptimalScalar a, uint8_t a)
269
    static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
270
    {
271
        return interpolate255(x, a1, y, a2);
272
    }
273
    static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
274
    {
275
        return multiplyAlpha65535(val, a);
276
    }
277
    static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
278
    {
279
        return interpolate65535(x, a1, y, a2);
280
    }
281
};
282
#endif
283
284
#if defined(__loongarch_sx)
285
struct Rgba64OperationsLSX : public Rgba64OperationsBase
286
{
287
    typedef __m128i OptimalType;
288
    typedef __m128i OptimalScalar;
289
    static OptimalType load(const Type *ptr)
290
    {
291
        return __lsx_vilvl_d(__lsx_vldi(0), __lsx_vldrepl_d(reinterpret_cast<const __m128i *>(ptr), 0));
292
    }
293
    static OptimalType convert(const Type &value)
294
    {
295
        return __lsx_vinsgr2vr_d(__lsx_vldi(0), value, 0);
296
    }
297
    static void store(Type *ptr, OptimalType value)
298
    {
299
        __lsx_vstelm_d(value, reinterpret_cast<const __m128i *>(ptr), 0, 0);
300
    }
301
    static OptimalType add(OptimalType a, OptimalType b)
302
    {
303
        return __lsx_vadd_h(a, b);
304
    }
305
//    same as above:
306
//    static OptimalScalar add(OptimalScalar a, OptimalScalar b)
307
    static OptimalType plus(OptimalType a, OptimalType b)
308
    {
309
        return __lsx_vsadd_hu(a, b);
310
    }
311
    static OptimalScalar alpha(OptimalType c)
312
    {
313
        const __m128i shuffleMask = (__m128i)(v8i16){3, 3, 3, 3, 4, 5, 6, 7};
314
        return __lsx_vshuf_h(shuffleMask, __lsx_vldi(0), c);
315
    }
316
    static OptimalScalar invAlpha(Scalar c)
317
    {
318
        return scalar(65535 - c);
319
    }
320
    static OptimalScalar invAlpha(OptimalType c)
321
    {
322
        return __lsx_vxor_v(__lsx_vreplgr2vr_h(-1), alpha(c));
323
    }
324
    static OptimalScalar scalar(Scalar n)
325
    {
326
        const __m128i shuffleMask = (__m128i)(v8i16){0, 0, 0, 0, 4, 5, 6, 7};
327
        return __lsx_vshuf_h(shuffleMask, __lsx_vldi(0), __lsx_vinsgr2vr_w(__lsx_vldi(0), n, 0));
328
    }
329
    static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
330
    {
331
        return multiplyAlpha255(val, a);
332
    }
333
//    same as above:
334
//    static OptimalScalar multiplyAlpha8bit(OptimalScalar a, uint8_t a)
335
    static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
336
    {
337
        return interpolate255(x, a1, y, a2);
338
    }
339
    static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
340
    {
341
        return multiplyAlpha65535(val, a);
342
    }
343
    static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, const OptimalScalar &a2)
344
    {
345
        return interpolate65535(x, a1, y, a2);
346
    }
347
};
348
#endif
349
350
#if defined(__SSE2__)
351
typedef Rgba64OperationsSSE2 Rgba64Operations;
352
#elif defined(__ARM_NEON__)
353
typedef Rgba64OperationsNEON Rgba64Operations;
354
#elif defined(__loongarch_sx)
355
typedef Rgba64OperationsLSX Rgba64Operations;
356
#else
357
typedef Rgba64OperationsC Rgba64Operations;
358
#endif
359
360
#endif // QT_CONFIG(raster_64bit)
361
362
#if QT_CONFIG(raster_fp)
363
364
static inline QRgbaFloat32 qRgbaFloat32(float r, float g, float b, float a)
365
0
{
366
0
    return QRgbaFloat32{r, g, b, a};
367
0
}
368
369
struct RgbaFPOperationsBase
370
{
371
    typedef QRgbaFloat32 Type;
372
    typedef float Scalar;
373
374
    static inline constexpr Type clear = { 0, 0, 0, 0 };
375
376
    static bool isOpaque(Type val)
377
0
    { return val.a >= 1.0f; }
378
    static bool isTransparent(Type val)
379
0
    { return val.a <= 0.0f; }
380
    static Scalar scalarFrom8bit(uint8_t a)
381
0
    { return a * (1.0f / 255.0f); }
382
383
    static void memfill(Type *ptr, Type value, qsizetype len)
384
0
    {
385
0
        for (qsizetype i = 0; i < len; ++i)
386
0
            ptr[i] = value;
387
0
    }
388
    static void memcpy(Type *Q_DECL_RESTRICT dest, const Type *Q_DECL_RESTRICT src, qsizetype len)
389
0
    { ::memcpy(dest, src, len * sizeof(Type)); }
390
};
391
392
struct RgbaFPOperationsC : RgbaFPOperationsBase
393
{
394
    typedef QRgbaFloat32 OptimalType;
395
    typedef float OptimalScalar;
396
397
    static OptimalType load(const Type *ptr)
398
0
    {
399
0
        return QRgbaFloat32 { ptr->r, ptr->g, ptr->b, ptr->a };
400
0
    }
401
    static OptimalType convert(const Type &val)
402
0
    {
403
0
        return QRgbaFloat32 { val.r, val.g, val.b, val.a };
404
0
    }
405
    static void store(Type *ptr, OptimalType value)
406
0
    {
407
0
        ptr->r = value.r;
408
0
        ptr->g = value.g;
409
0
        ptr->b = value.b;
410
0
        ptr->a = value.a;
411
0
    }
412
    static OptimalType add(OptimalType a, OptimalType b)
413
0
    {
414
0
        a.r += b.r;
415
0
        a.g += b.g;
416
0
        a.b += b.b;
417
0
        a.a += b.a;
418
0
        return a;
419
0
    }
420
    static OptimalScalar add(OptimalScalar a, OptimalScalar b)
421
0
    { return a + b; }
422
    static OptimalType plus(OptimalType a, OptimalType b)
423
0
    {
424
0
        a = add(a, b); // no saturation on color values
425
0
        if (a.a < 0.0f) a.a = 0.0f;
426
0
        else if (a.a > 1.0f) a.a = 1.0f;
427
0
        return a;
428
0
    }
429
    static OptimalScalar alpha(OptimalType val)
430
0
    { return val.a; }
431
    static OptimalScalar invAlpha(OptimalScalar c)
432
0
    { return 1.0f - c; }
433
    static OptimalScalar invAlpha(OptimalType val)
434
0
    { return 1.0f - val.a; }
435
    static OptimalScalar scalar(Scalar v)
436
0
    { return v; }
437
    static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
438
0
    {
439
0
        val.r *= a;
440
0
        val.g *= a;
441
0
        val.b *= a;
442
0
        val.a *= a;
443
0
        return val;
444
0
    }
445
    static OptimalScalar multiplyAlpha8bit(OptimalScalar val, uint8_t a)
446
0
    {
447
0
        return val * a * (1.0f / 255.0f);
448
0
    }
449
    static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
450
0
    {
451
0
        return add(multiplyAlpha(x, a1), multiplyAlpha(y, a2));
452
0
    }
453
    static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
454
0
    {
455
0
        return multiplyAlpha(val, a  * (1.0f / 255.0f));
456
0
    }
457
    static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
458
0
    {
459
0
        return add(multiplyAlpha8bit(x, a1), multiplyAlpha8bit(y, a2));
460
0
    }
461
};
462
463
#if defined(__SSE2__)
464
struct RgbaFPOperationsSSE2 : public RgbaFPOperationsBase
465
{
466
    typedef __m128 OptimalType;
467
    typedef __m128 OptimalScalar;
468
469
    static OptimalType Q_DECL_VECTORCALL load(const Type *ptr)
470
0
    {
471
0
        return _mm_loadu_ps(reinterpret_cast<const float *>(ptr));
472
0
    }
473
    static OptimalType Q_DECL_VECTORCALL convert(const Type &value)
474
0
    {
475
0
        return load(&value);
476
0
    }
477
    static void Q_DECL_VECTORCALL store(Type *ptr, OptimalType value)
478
0
    {
479
0
        _mm_storeu_ps(reinterpret_cast<float *>(ptr), value);
480
0
    }
481
    static OptimalType Q_DECL_VECTORCALL add(OptimalType a, OptimalType b)
482
0
    {
483
0
        return _mm_add_ps(a, b);
484
0
    }
485
//    same as above:
486
//    static OptimalScalar add(OptimalScalar a, OptimalScalar b)
487
    static OptimalType Q_DECL_VECTORCALL plus(OptimalType a, OptimalType b)
488
0
    {
489
0
        a = _mm_add_ps(a, b);
490
0
        __m128 aa = _mm_min_ps(a, _mm_set1_ps(1.0f));
491
0
        aa = _mm_max_ps(aa, _mm_set1_ps(0.0f));
492
        // An indirect insert using only SSE2:
493
0
        aa = _mm_shuffle_ps(aa, a, _MM_SHUFFLE(2, 2, 3, 3));
494
0
        a = _mm_shuffle_ps(a, aa, _MM_SHUFFLE(0, 2, 1, 0));
495
0
        return a;
496
0
    }
497
    static OptimalScalar Q_DECL_VECTORCALL alpha(OptimalType c)
498
0
    {
499
0
        return _mm_shuffle_ps(c, c, _MM_SHUFFLE(3, 3, 3, 3));
500
0
    }
501
    static OptimalScalar Q_DECL_VECTORCALL invAlpha(Scalar c)
502
0
    {
503
0
        return _mm_set1_ps(1.0f - float(c));
504
0
    }
505
    static OptimalScalar Q_DECL_VECTORCALL invAlpha(OptimalType c)
506
0
    {
507
0
        return _mm_sub_ps(_mm_set1_ps(1.0f), alpha(c));
508
0
    }
509
    static OptimalScalar Q_DECL_VECTORCALL scalar(Scalar n)
510
0
    {
511
0
        return _mm_set1_ps(float(n));
512
0
    }
513
    static OptimalType Q_DECL_VECTORCALL multiplyAlpha(OptimalType val, OptimalScalar a)
514
0
    {
515
0
        return _mm_mul_ps(val, a);
516
0
    }
517
    static OptimalType Q_DECL_VECTORCALL interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
518
0
    {
519
0
        return add(multiplyAlpha(x, a1), multiplyAlpha(y, a2));
520
0
    }
521
    static OptimalType Q_DECL_VECTORCALL multiplyAlpha8bit(OptimalType val, uint8_t a)
522
0
    {
523
0
        return multiplyAlpha(val, _mm_set1_ps(a  * (1.0f / 255.0f)));
524
0
    }
525
//    same as above:
526
//    static OptimalScalar multiplyAlpha8bit(OptimalScalar a, uint8_t a)
527
    static OptimalType Q_DECL_VECTORCALL interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
528
0
    {
529
0
        return add(multiplyAlpha8bit(x, a1), multiplyAlpha8bit(y, a2));
530
0
    }
531
};
532
#endif
533
534
#if defined(__SSE2__)
535
typedef RgbaFPOperationsSSE2 RgbaFPOperations;
536
#else
537
typedef RgbaFPOperationsC RgbaFPOperations;
538
#endif
539
540
#endif // QT_CONFIG(raster_fp)
541
542
/*
543
  result = 0
544
  d = d * cia
545
*/
546
template<class Ops>
547
inline static void comp_func_Clear_template(typename Ops::Type *dest, int length, uint const_alpha)
548
0
{
549
0
    if (const_alpha == 255)
550
0
        Ops::memfill(dest, Ops::clear, length);
551
0
    else {
552
0
        uint ialpha = 255 - const_alpha;
553
0
        for (int i = 0; i < length; ++i) {
554
0
            Ops::store(&dest[i], Ops::multiplyAlpha8bit(Ops::load(&dest[i]), ialpha));
555
0
        }
556
0
    }
557
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Clear_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Clear_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Clear_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, unsigned int)
558
559
void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
560
0
{
561
0
    comp_func_Clear_template<Argb32Operations>(dest, length, const_alpha);
562
0
}
563
564
void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
565
0
{
566
0
    comp_func_Clear_template<Argb32Operations>(dest, length, const_alpha);
567
0
}
568
569
#if QT_CONFIG(raster_64bit)
570
void QT_FASTCALL comp_func_solid_Clear_rgb64(QRgba64 *dest, int length, QRgba64, uint const_alpha)
571
0
{
572
0
    comp_func_Clear_template<Rgba64Operations>(dest, length, const_alpha);
573
0
}
574
575
void QT_FASTCALL comp_func_Clear_rgb64(QRgba64 *dest, const QRgba64 *, int length, uint const_alpha)
576
0
{
577
0
    comp_func_Clear_template<Rgba64Operations>(dest, length, const_alpha);
578
0
}
579
#endif
580
581
#if QT_CONFIG(raster_fp)
582
void QT_FASTCALL comp_func_solid_Clear_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32, uint const_alpha)
583
0
{
584
0
    comp_func_Clear_template<RgbaFPOperations>(dest, length, const_alpha);
585
0
}
586
587
void QT_FASTCALL comp_func_Clear_rgbafp(QRgbaFloat32 *dest, const QRgbaFloat32 *, int length, uint const_alpha)
588
0
{
589
0
    comp_func_Clear_template<RgbaFPOperations>(dest, length, const_alpha);
590
0
}
591
#endif
592
593
/*
594
  result = s
595
  dest = s * ca + d * cia
596
*/
597
template<class Ops>
598
inline static void comp_func_solid_Source_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
599
0
{
600
0
    if (const_alpha == 255)
601
0
        Ops::memfill(dest, color, length);
602
0
    else {
603
0
        const uint ialpha = 255 - const_alpha;
604
0
        auto s = Ops::multiplyAlpha8bit(Ops::convert(color), const_alpha);
605
0
        for (int i = 0; i < length; ++i) {
606
0
            auto d = Ops::multiplyAlpha8bit(Ops::load(&dest[i]), ialpha);
607
0
            Ops::store(&dest[i], Ops::add(s, d));
608
0
        }
609
0
    }
610
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Source_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Source_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Source_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
611
612
template<class Ops>
613
inline static void comp_func_Source_template(typename Ops::Type *Q_DECL_RESTRICT dest,
614
                                             const typename Ops::Type *Q_DECL_RESTRICT src,
615
                                             int length, uint const_alpha)
616
0
{
617
0
    if (const_alpha == 255)
618
0
        Ops::memcpy(dest, src, length);
619
0
    else {
620
0
        const uint ialpha = 255 - const_alpha;
621
0
        for (int i = 0; i < length; ++i) {
622
0
            auto s = Ops::load(src + i);
623
0
            auto d = Ops::load(dest + i);
624
0
            Ops::store(&dest[i], Ops::interpolate8bit(s, const_alpha, d, ialpha));
625
0
        }
626
0
    }
627
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Source_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Source_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Source_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
628
629
void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha)
630
0
{
631
0
    comp_func_solid_Source_template<Argb32Operations>(dest, length, color, const_alpha);
632
0
}
633
634
void QT_FASTCALL comp_func_Source(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
635
0
{
636
0
    comp_func_Source_template<Argb32Operations>(dest, src, length, const_alpha);
637
0
}
638
639
#if QT_CONFIG(raster_64bit)
640
void QT_FASTCALL comp_func_solid_Source_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
641
0
{
642
0
    comp_func_solid_Source_template<Rgba64Operations>(dest, length, color, const_alpha);
643
0
}
644
645
void QT_FASTCALL comp_func_Source_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
646
0
{
647
0
    comp_func_Source_template<Rgba64Operations>(dest, src, length, const_alpha);
648
0
}
649
#endif
650
651
#if QT_CONFIG(raster_fp)
652
void QT_FASTCALL comp_func_solid_Source_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
653
0
{
654
0
    comp_func_solid_Source_template<RgbaFPOperations>(dest, length, color, const_alpha);
655
0
}
656
657
void QT_FASTCALL comp_func_Source_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
658
0
{
659
0
    comp_func_Source_template<RgbaFPOperations>(dest, src, length, const_alpha);
660
0
}
661
#endif
662
663
void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint)
664
0
{
665
0
}
666
667
void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint)
668
0
{
669
0
}
670
671
#if QT_CONFIG(raster_64bit)
672
void QT_FASTCALL comp_func_solid_Destination_rgb64(QRgba64 *, int, QRgba64, uint)
673
0
{
674
0
}
675
676
void QT_FASTCALL comp_func_Destination_rgb64(QRgba64 *, const QRgba64 *, int, uint)
677
0
{
678
0
}
679
#endif
680
681
#if QT_CONFIG(raster_fp)
682
void QT_FASTCALL comp_func_solid_Destination_rgbafp(QRgbaFloat32 *, int, QRgbaFloat32, uint)
683
0
{
684
0
}
685
686
void QT_FASTCALL comp_func_Destination_rgbafp(QRgbaFloat32 *, const QRgbaFloat32 *, int, uint)
687
0
{
688
0
}
689
#endif
690
691
/*
692
  result = s + d * sia
693
  dest = (s + d * sia) * ca + d * cia
694
       = s * ca + d * (sia * ca + cia)
695
       = s * ca + d * (1 - sa*ca)
696
*/
697
template<class Ops>
698
inline static void comp_func_solid_SourceOver_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
699
0
{
700
0
    if (const_alpha == 255 && Ops::isOpaque(color))
701
0
        Ops::memfill(dest, color, length);
702
0
    else {
703
0
        auto c = Ops::convert(color);
704
0
        if (const_alpha != 255)
705
0
            c = Ops::multiplyAlpha8bit(c, const_alpha);
706
0
        auto cAlpha = Ops::invAlpha(c);
707
0
        for (int i = 0; i < length; ++i) {
708
0
            auto d = Ops::multiplyAlpha(Ops::load(&dest[i]), cAlpha);
709
0
            Ops::store(&dest[i], Ops::add(c, d));
710
0
        }
711
0
    }
712
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceOver_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceOver_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceOver_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
713
714
template<class Ops>
715
inline static void comp_func_SourceOver_template(typename Ops::Type *Q_DECL_RESTRICT dest,
716
                                                 const typename Ops::Type *Q_DECL_RESTRICT src,
717
                                                 int length, uint const_alpha)
718
0
{
719
0
    if (const_alpha == 255) {
720
0
        for (int i = 0; i < length; ++i) {
721
0
            auto c = src[i];
722
0
            if (Ops::isOpaque(c))
723
0
                Ops::store(&dest[i], Ops::convert(c));
724
0
            else if (!Ops::isTransparent(c)) {
725
0
                auto s = Ops::convert(c);
726
0
                auto d = Ops::multiplyAlpha(Ops::load(&dest[i]), Ops::invAlpha(s));
727
0
                Ops::store(&dest[i], Ops::add(s, d));
728
0
            }
729
0
        }
730
0
    } else {
731
0
        for (int i = 0; i < length; ++i) {
732
0
            auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
733
0
            auto d = Ops::multiplyAlpha(Ops::load(&dest[i]), Ops::invAlpha(s));
734
0
            Ops::store(&dest[i], Ops::add(s, d));
735
0
        }
736
0
    }
737
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceOver_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceOver_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceOver_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
738
739
void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha)
740
0
{
741
0
    comp_func_solid_SourceOver_template<Argb32Operations>(dest, length, color, const_alpha);
742
0
}
743
744
void QT_FASTCALL comp_func_SourceOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
745
0
{
746
0
    comp_func_SourceOver_template<Argb32Operations>(dest, src, length, const_alpha);
747
0
}
748
749
#if QT_CONFIG(raster_64bit)
750
void QT_FASTCALL comp_func_solid_SourceOver_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
751
0
{
752
0
    comp_func_solid_SourceOver_template<Rgba64Operations>(dest, length, color, const_alpha);
753
0
}
754
755
void QT_FASTCALL comp_func_SourceOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
756
0
{
757
0
    comp_func_SourceOver_template<Rgba64Operations>(dest, src, length, const_alpha);
758
0
}
759
#endif
760
761
#if QT_CONFIG(raster_fp)
762
void QT_FASTCALL comp_func_solid_SourceOver_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
763
0
{
764
0
    comp_func_solid_SourceOver_template<RgbaFPOperations>(dest, length, color, const_alpha);
765
0
}
766
767
768
void QT_FASTCALL comp_func_SourceOver_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
769
0
{
770
0
    comp_func_SourceOver_template<RgbaFPOperations>(dest, src, length, const_alpha);
771
0
}
772
#endif
773
774
/*
775
  result = d + s * dia
776
  dest = (d + s * dia) * ca + d * cia
777
       = d + s * dia * ca
778
*/
779
template<class Ops>
780
inline static void comp_func_solid_DestinationOver_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
781
0
{
782
0
    auto c = Ops::convert(color);
783
0
    if (const_alpha != 255)
784
0
        c = Ops::multiplyAlpha8bit(c, const_alpha);
785
0
    for (int i = 0; i < length; ++i) {
786
0
        auto d = Ops::load(&dest[i]);
787
0
        auto s = Ops::multiplyAlpha(c, Ops::invAlpha(d));
788
0
        Ops::store(&dest[i], Ops::add(s, d));
789
0
    }
790
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationOver_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationOver_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationOver_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
791
792
template<class Ops>
793
inline static void comp_func_DestinationOver_template(typename Ops::Type *Q_DECL_RESTRICT dest,
794
                                                      const typename Ops::Type *Q_DECL_RESTRICT src,
795
                                                      int length, uint const_alpha)
796
0
{
797
0
    if (const_alpha == 255) {
798
0
        for (int i = 0; i < length; ++i) {
799
0
            auto d = Ops::load(&dest[i]);
800
0
            auto s = Ops::multiplyAlpha(Ops::load(&src[i]), Ops::invAlpha(d));
801
0
            Ops::store(&dest[i], Ops::add(s, d));
802
0
        }
803
0
    } else {
804
0
        for (int i = 0; i < length; ++i) {
805
0
            auto d = Ops::load(&dest[i]);
806
0
            auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
807
0
            s = Ops::multiplyAlpha(s, Ops::invAlpha(d));
808
0
            Ops::store(&dest[i], Ops::add(s, d));
809
0
        }
810
0
    }
811
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationOver_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationOver_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationOver_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
812
813
void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha)
814
0
{
815
0
    comp_func_solid_DestinationOver_template<Argb32Operations>(dest, length, color, const_alpha);
816
0
}
817
818
void QT_FASTCALL comp_func_DestinationOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
819
0
{
820
0
    comp_func_DestinationOver_template<Argb32Operations>(dest, src, length, const_alpha);
821
0
}
822
823
#if QT_CONFIG(raster_64bit)
824
void QT_FASTCALL comp_func_solid_DestinationOver_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
825
0
{
826
0
    comp_func_solid_DestinationOver_template<Rgba64Operations>(dest, length, color, const_alpha);
827
0
}
828
829
void QT_FASTCALL comp_func_DestinationOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
830
0
{
831
0
    comp_func_DestinationOver_template<Rgba64Operations>(dest, src, length, const_alpha);
832
0
}
833
#endif
834
835
#if QT_CONFIG(raster_fp)
836
void QT_FASTCALL comp_func_solid_DestinationOver_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
837
0
{
838
0
    comp_func_solid_DestinationOver_template<RgbaFPOperations>(dest, length, color, const_alpha);
839
0
}
840
841
void QT_FASTCALL comp_func_DestinationOver_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
842
0
{
843
0
    comp_func_DestinationOver_template<RgbaFPOperations>(dest, src, length, const_alpha);
844
0
}
845
#endif
846
847
/*
848
  result = s * da
849
  dest = s * da * ca + d * cia
850
*/
851
template<class Ops>
852
inline static void comp_func_solid_SourceIn_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
853
0
{
854
0
    if (const_alpha == 255) {
855
0
        auto c = Ops::convert(color);
856
0
        for (int i = 0; i < length; ++i) {
857
0
            Ops::store(&dest[i], Ops::multiplyAlpha(c, Ops::alpha(Ops::load(&dest[i]))));
858
0
        }
859
0
    } else {
860
0
        auto c = Ops::multiplyAlpha8bit(Ops::convert(color), const_alpha);
861
0
        auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
862
0
        for (int i = 0; i < length; ++i) {
863
0
            auto d = Ops::load(&dest[i]);
864
0
            Ops::store(&dest[i], Ops::interpolate(c, Ops::alpha(d), d, cia));
865
0
        }
866
0
    }
867
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceIn_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceIn_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceIn_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
868
869
template<class Ops>
870
inline static void comp_func_SourceIn_template(typename Ops::Type *Q_DECL_RESTRICT dest,
871
                                               const typename Ops::Type *Q_DECL_RESTRICT src,
872
                                               int length, uint const_alpha)
873
0
{
874
0
    if (const_alpha == 255) {
875
0
        for (int i = 0; i < length; ++i) {
876
0
            auto s = Ops::load(&src[i]);
877
0
            Ops::store(&dest[i], Ops::multiplyAlpha(s, Ops::alpha(Ops::load(&dest[i]))));
878
0
        }
879
0
    } else {
880
0
        auto ca = Ops::scalarFrom8bit(const_alpha);
881
0
        auto cia = Ops::invAlpha(ca);
882
0
        auto cav = Ops::scalar(ca);
883
0
        for (int i = 0; i < length; ++i) {
884
0
            auto d = Ops::load(&dest[i]);
885
0
            auto s = Ops::multiplyAlpha(Ops::load(&src[i]), cav);
886
0
            Ops::store(&dest[i], Ops::interpolate(s, Ops::alpha(d), d, cia));
887
0
        }
888
0
    }
889
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceIn_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceIn_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceIn_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
890
891
void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha)
892
0
{
893
0
    comp_func_solid_SourceIn_template<Argb32Operations>(dest, length, color, const_alpha);
894
0
}
895
896
void QT_FASTCALL comp_func_SourceIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
897
0
{
898
0
    comp_func_SourceIn_template<Argb32Operations>(dest, src, length, const_alpha);
899
0
}
900
901
#if QT_CONFIG(raster_64bit)
902
void QT_FASTCALL comp_func_solid_SourceIn_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
903
0
{
904
0
    comp_func_solid_SourceIn_template<Rgba64Operations>(dest, length, color, const_alpha);
905
0
}
906
907
void QT_FASTCALL comp_func_SourceIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
908
0
{
909
0
    comp_func_SourceIn_template<Rgba64Operations>(dest, src, length, const_alpha);
910
0
}
911
#endif
912
913
#if QT_CONFIG(raster_fp)
914
void QT_FASTCALL comp_func_solid_SourceIn_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
915
0
{
916
0
    comp_func_solid_SourceIn_template<RgbaFPOperations>(dest, length, color, const_alpha);
917
0
}
918
919
void QT_FASTCALL comp_func_SourceIn_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
920
0
{
921
0
    comp_func_SourceIn_template<RgbaFPOperations>(dest, src, length, const_alpha);
922
0
}
923
#endif
924
925
/*
926
  result = d * sa
927
  dest = d * sa * ca + d * cia
928
       = d * (sa * ca + cia)
929
*/
930
template<class Ops>
931
inline static void comp_func_solid_DestinationIn_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
932
0
{
933
0
    auto sa = Ops::alpha(Ops::convert(color));
934
0
    if (const_alpha != 255) {
935
0
        sa = Ops::multiplyAlpha8bit(sa, const_alpha);
936
0
        sa = Ops::add(sa, Ops::invAlpha(Ops::scalarFrom8bit(const_alpha)));
937
0
    }
938
939
0
    for (int i = 0; i < length; ++i) {
940
0
        Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sa));
941
0
    }
942
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationIn_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationIn_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationIn_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
943
944
template<class Ops>
945
inline static void comp_func_DestinationIn_template(typename Ops::Type *Q_DECL_RESTRICT dest,
946
                                                    const typename Ops::Type *Q_DECL_RESTRICT src,
947
                                                    int length, uint const_alpha)
948
0
{
949
0
    if (const_alpha == 255) {
950
0
        for (int i = 0; i < length; ++i) {
951
0
            auto a = Ops::alpha(Ops::load(&src[i]));
952
0
            Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), a));
953
0
        }
954
0
    } else {
955
0
        auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
956
0
        for (int i = 0; i < length; ++i) {
957
0
            auto sa = Ops::multiplyAlpha8bit(Ops::alpha(Ops::load(&src[i])), const_alpha);
958
0
            sa = Ops::add(sa, cia);
959
0
            Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sa));
960
0
        }
961
0
    }
962
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationIn_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationIn_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationIn_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
963
964
void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha)
965
0
{
966
0
    comp_func_solid_DestinationIn_template<Argb32Operations>(dest, length, color, const_alpha);
967
0
}
968
969
void QT_FASTCALL comp_func_DestinationIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
970
0
{
971
0
    comp_func_DestinationIn_template<Argb32Operations>(dest, src, length, const_alpha);
972
0
}
973
974
#if QT_CONFIG(raster_64bit)
975
void QT_FASTCALL comp_func_solid_DestinationIn_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
976
0
{
977
0
    comp_func_solid_DestinationIn_template<Rgba64Operations>(dest, length, color, const_alpha);
978
0
}
979
980
void QT_FASTCALL comp_func_DestinationIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
981
0
{
982
0
    comp_func_DestinationIn_template<Rgba64Operations>(dest, src, length, const_alpha);
983
0
}
984
#endif
985
986
#if QT_CONFIG(raster_fp)
987
void QT_FASTCALL comp_func_solid_DestinationIn_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
988
0
{
989
0
    comp_func_solid_DestinationIn_template<RgbaFPOperations>(dest, length, color, const_alpha);
990
0
}
991
992
void QT_FASTCALL comp_func_DestinationIn_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
993
0
{
994
0
    comp_func_DestinationIn_template<RgbaFPOperations>(dest, src, length, const_alpha);
995
0
}
996
#endif
997
998
/*
999
  result = s * dia
1000
  dest = s * dia * ca + d * cia
1001
*/
1002
template<class Ops>
1003
inline static void comp_func_solid_SourceOut_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
1004
0
{
1005
0
    auto c = Ops::convert(color);
1006
0
    if (const_alpha == 255) {
1007
0
        for (int i = 0; i < length; ++i)
1008
0
            Ops::store(&dest[i], Ops::multiplyAlpha(c, Ops::invAlpha(Ops::load(&dest[i]))));
1009
0
    } else {
1010
0
        auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
1011
0
        c = Ops::multiplyAlpha8bit(c, const_alpha);
1012
0
        for (int i = 0; i < length; ++i) {
1013
0
            auto d = Ops::load(&dest[i]);
1014
0
            Ops::store(&dest[i], Ops::interpolate(c, Ops::invAlpha(d), d, cia));
1015
0
        }
1016
0
    }
1017
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceOut_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceOut_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceOut_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
1018
1019
template<class Ops>
1020
inline static void comp_func_SourceOut_template(typename Ops::Type *Q_DECL_RESTRICT dest,
1021
                                                const typename Ops::Type *Q_DECL_RESTRICT src,
1022
                                                int length, uint const_alpha)
1023
0
{
1024
0
    if (const_alpha == 255) {
1025
0
        for (int i = 0; i < length; ++i) {
1026
0
            auto s = Ops::load(&src[i]);
1027
0
            auto d = Ops::load(&dest[i]);
1028
0
            Ops::store(&dest[i], Ops::multiplyAlpha(s, Ops::invAlpha(d)));
1029
0
        }
1030
0
    } else {
1031
0
        auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
1032
0
        for (int i = 0; i < length; ++i) {
1033
0
            auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
1034
0
            auto d = Ops::load(&dest[i]);
1035
0
            Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, cia));
1036
0
        }
1037
0
    }
1038
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceOut_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceOut_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceOut_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
1039
1040
void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha)
1041
0
{
1042
0
    comp_func_solid_SourceOut_template<Argb32Operations>(dest, length, color, const_alpha);
1043
0
}
1044
1045
void QT_FASTCALL comp_func_SourceOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
1046
0
{
1047
0
    comp_func_SourceOut_template<Argb32Operations>(dest, src, length, const_alpha);
1048
0
}
1049
1050
#if QT_CONFIG(raster_64bit)
1051
void QT_FASTCALL comp_func_solid_SourceOut_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
1052
0
{
1053
0
    comp_func_solid_SourceOut_template<Rgba64Operations>(dest, length, color, const_alpha);
1054
0
}
1055
1056
void QT_FASTCALL comp_func_SourceOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1057
0
{
1058
0
    comp_func_SourceOut_template<Rgba64Operations>(dest, src, length, const_alpha);
1059
0
}
1060
#endif
1061
1062
#if QT_CONFIG(raster_fp)
1063
void QT_FASTCALL comp_func_solid_SourceOut_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
1064
0
{
1065
0
    comp_func_solid_SourceOut_template<RgbaFPOperations>(dest, length, color, const_alpha);
1066
0
}
1067
1068
void QT_FASTCALL comp_func_SourceOut_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1069
0
{
1070
0
    comp_func_SourceOut_template<RgbaFPOperations>(dest, src, length, const_alpha);
1071
0
}
1072
#endif
1073
1074
/*
1075
  result = d * sia
1076
  dest = d * sia * ca + d * cia
1077
       = d * (sia * ca + cia)
1078
*/
1079
template<class Ops>
1080
inline static void comp_func_solid_DestinationOut_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
1081
0
{
1082
0
    auto sai = Ops::invAlpha(Ops::convert(color));
1083
0
    if (const_alpha != 255) {
1084
0
        sai = Ops::multiplyAlpha8bit(sai, const_alpha);
1085
0
        sai = Ops::add(sai, Ops::invAlpha(Ops::scalarFrom8bit(const_alpha)));
1086
0
    }
1087
1088
0
    for (int i = 0; i < length; ++i) {
1089
0
        Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sai));
1090
0
    }
1091
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationOut_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationOut_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationOut_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
1092
1093
template<class Ops>
1094
inline static void comp_func_DestinationOut_template(typename Ops::Type *Q_DECL_RESTRICT dest,
1095
                                                     const typename Ops::Type *Q_DECL_RESTRICT src,
1096
                                                     int length, uint const_alpha)
1097
0
{
1098
0
    if (const_alpha == 255) {
1099
0
        for (int i = 0; i < length; ++i) {
1100
0
            auto sia = Ops::invAlpha(Ops::load(&src[i]));
1101
0
            Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sia));
1102
0
        }
1103
0
    } else {
1104
0
        auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
1105
0
        for (int i = 0; i < length; ++i) {
1106
0
            auto sia = Ops::multiplyAlpha8bit(Ops::invAlpha(Ops::load(&src[i])), const_alpha);
1107
0
            sia = Ops::add(sia, cia);
1108
0
            Ops::store(&dest[i], Ops::multiplyAlpha(Ops::load(&dest[i]), sia));
1109
0
        }
1110
0
    }
1111
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationOut_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationOut_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationOut_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
1112
1113
void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha)
1114
0
{
1115
0
    comp_func_solid_DestinationOut_template<Argb32Operations>(dest, length, color, const_alpha);
1116
0
}
1117
1118
void QT_FASTCALL comp_func_DestinationOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
1119
0
{
1120
0
    comp_func_DestinationOut_template<Argb32Operations>(dest, src, length, const_alpha);
1121
0
}
1122
1123
#if QT_CONFIG(raster_64bit)
1124
void QT_FASTCALL comp_func_solid_DestinationOut_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
1125
0
{
1126
0
    comp_func_solid_DestinationOut_template<Rgba64Operations>(dest, length, color, const_alpha);
1127
0
}
1128
1129
void QT_FASTCALL comp_func_DestinationOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1130
0
{
1131
0
    comp_func_DestinationOut_template<Rgba64Operations>(dest, src, length, const_alpha);
1132
0
}
1133
#endif
1134
1135
#if QT_CONFIG(raster_fp)
1136
void QT_FASTCALL comp_func_solid_DestinationOut_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
1137
0
{
1138
0
    comp_func_solid_DestinationOut_template<RgbaFPOperations>(dest, length, color, const_alpha);
1139
0
}
1140
1141
void QT_FASTCALL comp_func_DestinationOut_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1142
0
{
1143
0
    comp_func_DestinationOut_template<RgbaFPOperations>(dest, src, length, const_alpha);
1144
0
}
1145
#endif
1146
1147
/*
1148
  result = s*da + d*sia
1149
  dest = s*da*ca + d*sia*ca + d *cia
1150
       = s*ca * da + d * (sia*ca + cia)
1151
       = s*ca * da + d * (1 - sa*ca)
1152
*/
1153
template<class Ops>
1154
inline static void comp_func_solid_SourceAtop_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
1155
0
{
1156
0
    auto c = Ops::convert(color);
1157
0
    if (const_alpha != 255)
1158
0
        c = Ops::multiplyAlpha8bit(c, const_alpha);
1159
0
    auto sia = Ops::invAlpha(c);
1160
0
    for (int i = 0; i < length; ++i) {
1161
0
        auto d = Ops::load(&dest[i]);
1162
0
        Ops::store(&dest[i], Ops::interpolate(c, Ops::alpha(d), d, sia));
1163
0
    }
1164
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceAtop_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceAtop_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SourceAtop_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
1165
1166
template<class Ops>
1167
inline static void comp_func_SourceAtop_template(typename Ops::Type *Q_DECL_RESTRICT dest,
1168
                                                 const typename Ops::Type *Q_DECL_RESTRICT src,
1169
                                                 int length, uint const_alpha)
1170
0
{
1171
0
    if (const_alpha == 255) {
1172
0
        for (int i = 0; i < length; ++i) {
1173
0
            auto s = Ops::load(&src[i]);
1174
0
            auto d = Ops::load(&dest[i]);
1175
0
            Ops::store(&dest[i], Ops::interpolate(s, Ops::alpha(d), d, Ops::invAlpha(s)));
1176
0
        }
1177
0
    } else {
1178
0
        for (int i = 0; i < length; ++i) {
1179
0
            auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
1180
0
            auto d = Ops::load(&dest[i]);
1181
0
            Ops::store(&dest[i], Ops::interpolate(s, Ops::alpha(d), d, Ops::invAlpha(s)));
1182
0
        }
1183
0
    }
1184
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceAtop_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceAtop_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SourceAtop_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
1185
1186
void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha)
1187
0
{
1188
0
    comp_func_solid_SourceAtop_template<Argb32Operations>(dest, length, color, const_alpha);
1189
0
}
1190
1191
void QT_FASTCALL comp_func_SourceAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
1192
0
{
1193
0
    comp_func_SourceAtop_template<Argb32Operations>(dest, src, length, const_alpha);
1194
0
}
1195
1196
#if QT_CONFIG(raster_64bit)
1197
void QT_FASTCALL comp_func_solid_SourceAtop_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
1198
0
{
1199
0
    comp_func_solid_SourceAtop_template<Rgba64Operations>(dest, length, color, const_alpha);
1200
0
}
1201
1202
void QT_FASTCALL comp_func_SourceAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1203
0
{
1204
0
    comp_func_SourceAtop_template<Rgba64Operations>(dest, src, length, const_alpha);
1205
0
}
1206
#endif
1207
1208
#if QT_CONFIG(raster_fp)
1209
void QT_FASTCALL comp_func_solid_SourceAtop_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
1210
0
{
1211
0
    comp_func_solid_SourceAtop_template<RgbaFPOperations>(dest, length, color, const_alpha);
1212
0
}
1213
1214
void QT_FASTCALL comp_func_SourceAtop_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1215
0
{
1216
0
    comp_func_SourceAtop_template<RgbaFPOperations>(dest, src, length, const_alpha);
1217
0
}
1218
#endif
1219
1220
/*
1221
  result = d*sa + s*dia
1222
  dest = d*sa*ca + s*dia*ca + d *cia
1223
       = s*ca * dia + d * (sa*ca + cia)
1224
*/
1225
template<class Ops>
1226
inline static void comp_func_solid_DestinationAtop_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
1227
0
{
1228
0
    auto c = Ops::convert(color);
1229
0
    auto sa = Ops::alpha(c);
1230
0
    if (const_alpha != 255) {
1231
0
        c = Ops::multiplyAlpha8bit(c, const_alpha);
1232
0
        auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
1233
0
        sa = Ops::add(Ops::alpha(c), cia);
1234
0
    }
1235
1236
0
    for (int i = 0; i < length; ++i) {
1237
0
        auto d = Ops::load(&dest[i]);
1238
0
        Ops::store(&dest[i], Ops::interpolate(c, Ops::invAlpha(d), d, sa));
1239
0
    }
1240
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationAtop_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationAtop_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_DestinationAtop_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
1241
1242
template<class Ops>
1243
inline static void comp_func_DestinationAtop_template(typename Ops::Type *Q_DECL_RESTRICT dest,
1244
                                                      const typename Ops::Type *Q_DECL_RESTRICT src,
1245
                                                      int length, uint const_alpha)
1246
0
{
1247
0
    if (const_alpha == 255) {
1248
0
        for (int i = 0; i < length; ++i) {
1249
0
            auto s = Ops::load(&src[i]);
1250
0
            auto d = Ops::load(&dest[i]);
1251
0
            Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, Ops::alpha(s)));
1252
0
        }
1253
0
    } else {
1254
0
        auto cia = Ops::invAlpha(Ops::scalarFrom8bit(const_alpha));
1255
0
        for (int i = 0; i < length; ++i) {
1256
0
            auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
1257
0
            auto d = Ops::load(&dest[i]);
1258
0
            auto sa = Ops::add(Ops::alpha(s), cia);
1259
0
            Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, sa));
1260
0
        }
1261
0
    }
1262
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationAtop_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationAtop_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_DestinationAtop_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
1263
1264
void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha)
1265
0
{
1266
0
    comp_func_solid_DestinationAtop_template<Argb32Operations>(dest, length, color, const_alpha);
1267
0
}
1268
1269
void QT_FASTCALL comp_func_DestinationAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
1270
0
{
1271
0
    comp_func_DestinationAtop_template<Argb32Operations>(dest, src, length, const_alpha);
1272
0
}
1273
1274
#if QT_CONFIG(raster_64bit)
1275
void QT_FASTCALL comp_func_solid_DestinationAtop_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
1276
0
{
1277
0
    comp_func_solid_DestinationAtop_template<Rgba64Operations>(dest, length, color, const_alpha);
1278
0
}
1279
1280
void QT_FASTCALL comp_func_DestinationAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1281
0
{
1282
0
    comp_func_DestinationAtop_template<Rgba64Operations>(dest, src, length, const_alpha);
1283
0
}
1284
#endif
1285
1286
#if QT_CONFIG(raster_fp)
1287
void QT_FASTCALL comp_func_solid_DestinationAtop_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
1288
0
{
1289
0
    comp_func_solid_DestinationAtop_template<RgbaFPOperations>(dest, length, color, const_alpha);
1290
0
}
1291
1292
void QT_FASTCALL comp_func_DestinationAtop_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1293
0
{
1294
0
    comp_func_DestinationAtop_template<RgbaFPOperations>(dest, src, length, const_alpha);
1295
0
}
1296
#endif
1297
1298
/*
1299
  result = d*sia + s*dia
1300
  dest = d*sia*ca + s*dia*ca + d *cia
1301
       = s*ca * dia + d * (sia*ca + cia)
1302
       = s*ca * dia + d * (1 - sa*ca)
1303
*/
1304
template<class Ops>
1305
inline static void comp_func_solid_XOR_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
1306
0
{
1307
0
    auto c = Ops::convert(color);
1308
0
    if (const_alpha != 255)
1309
0
        c = Ops::multiplyAlpha8bit(c, const_alpha);
1310
1311
0
    auto sia = Ops::invAlpha(c);
1312
0
    for (int i = 0; i < length; ++i) {
1313
0
        auto d = Ops::load(&dest[i]);
1314
0
        Ops::store(&dest[i], Ops::interpolate(c, Ops::invAlpha(d), d, sia));
1315
0
    }
1316
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_XOR_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_XOR_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_XOR_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
1317
1318
template<class Ops>
1319
inline static void comp_func_XOR_template(typename Ops::Type *Q_DECL_RESTRICT dest,
1320
                                          const typename Ops::Type *Q_DECL_RESTRICT src,
1321
                                          int length, uint const_alpha)
1322
0
{
1323
0
    if (const_alpha == 255) {
1324
0
        for (int i = 0; i < length; ++i) {
1325
0
            auto d = Ops::load(&dest[i]);
1326
0
            auto s = Ops::load(&src[i]);
1327
0
            Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, Ops::invAlpha(s)));
1328
0
        }
1329
0
    } else {
1330
0
        for (int i = 0; i < length; ++i) {
1331
0
            auto d = Ops::load(&dest[i]);
1332
0
            auto s = Ops::multiplyAlpha8bit(Ops::load(&src[i]), const_alpha);
1333
0
            Ops::store(&dest[i], Ops::interpolate(s, Ops::invAlpha(d), d, Ops::invAlpha(s)));
1334
0
        }
1335
0
    }
1336
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_XOR_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_XOR_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_XOR_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
1337
1338
void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha)
1339
0
{
1340
0
    comp_func_solid_XOR_template<Argb32Operations>(dest, length, color, const_alpha);
1341
0
}
1342
1343
void QT_FASTCALL comp_func_XOR(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
1344
0
{
1345
0
    comp_func_XOR_template<Argb32Operations>(dest, src, length, const_alpha);
1346
0
}
1347
1348
#if QT_CONFIG(raster_64bit)
1349
void QT_FASTCALL comp_func_solid_XOR_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
1350
0
{
1351
0
    comp_func_solid_XOR_template<Rgba64Operations>(dest, length, color, const_alpha);
1352
0
}
1353
1354
void QT_FASTCALL comp_func_XOR_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1355
0
{
1356
0
    comp_func_XOR_template<Rgba64Operations>(dest, src, length, const_alpha);
1357
0
}
1358
#endif
1359
1360
#if QT_CONFIG(raster_fp)
1361
void QT_FASTCALL comp_func_solid_XOR_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
1362
0
{
1363
0
    comp_func_solid_XOR_template<RgbaFPOperations>(dest, length, color, const_alpha);
1364
0
}
1365
1366
void QT_FASTCALL comp_func_XOR_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1367
0
{
1368
0
    comp_func_XOR_template<RgbaFPOperations>(dest, src, length, const_alpha);
1369
0
}
1370
#endif
1371
1372
struct QFullCoverage {
1373
    inline void store(uint *dest, const uint src) const
1374
54.7M
    {
1375
54.7M
        *dest = src;
1376
54.7M
    }
1377
#if QT_CONFIG(raster_64bit)
1378
    inline void store(QRgba64 *dest, const QRgba64 src) const
1379
18.2M
    {
1380
18.2M
        *dest = src;
1381
18.2M
    }
1382
#endif
1383
#if QT_CONFIG(raster_fp)
1384
    inline void store(QRgbaFloat32 *dest, const QRgbaFloat32 src) const
1385
0
    {
1386
0
        *dest = src;
1387
0
    }
1388
#endif
1389
};
1390
1391
struct QPartialCoverage {
1392
    inline QPartialCoverage(uint const_alpha)
1393
239k
        : ca(const_alpha)
1394
239k
        , ica(255 - const_alpha)
1395
239k
    {
1396
239k
    }
1397
1398
    template<typename Op>
1399
    inline void store_template(typename Op::Type *dest, const typename Op::Type src) const
1400
13.3M
    {
1401
13.3M
        Op::store(dest, Op::interpolate8bit(Op::convert(src), ca, Op::load(dest), ica));
1402
13.3M
    }
void QPartialCoverage::store_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type) const
Line
Count
Source
1400
3.45M
    {
1401
3.45M
        Op::store(dest, Op::interpolate8bit(Op::convert(src), ca, Op::load(dest), ica));
1402
3.45M
    }
void QPartialCoverage::store_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type) const
Line
Count
Source
1400
9.91M
    {
1401
9.91M
        Op::store(dest, Op::interpolate8bit(Op::convert(src), ca, Op::load(dest), ica));
1402
9.91M
    }
Unexecuted instantiation: void QPartialCoverage::store_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type) const
1403
    inline void store(uint *dest, const uint src) const
1404
3.45M
    {
1405
3.45M
        store_template<Argb32Operations>(dest, src);
1406
3.45M
    }
1407
#if QT_CONFIG(raster_64bit)
1408
    inline void store(QRgba64 *dest, const QRgba64 src) const
1409
9.91M
    {
1410
9.91M
        store_template<Rgba64Operations>(dest, src);
1411
9.91M
    }
1412
#endif
1413
#if QT_CONFIG(raster_fp)
1414
    inline void store(QRgbaFloat32 *dest, const QRgbaFloat32 src) const
1415
0
    {
1416
0
        store_template<RgbaFPOperations>(dest, src);
1417
0
    }
1418
#endif
1419
1420
private:
1421
    const uint ca;
1422
    const uint ica;
1423
};
1424
1425
static inline int mix_alpha(int da, int sa)
1426
58.2M
{
1427
58.2M
    return 255 - qt_div_255((255 - sa) * (255 - da));
1428
58.2M
}
1429
1430
#if QT_CONFIG(raster_64bit)
1431
static inline uint mix_alpha_rgb64(uint da, uint sa)
1432
28.1M
{
1433
28.1M
    return 65535U - qt_div_65535((65535U - sa) * (65535U - da));
1434
28.1M
}
1435
#endif
1436
1437
#if QT_CONFIG(raster_fp)
1438
static inline float mix_alpha_rgbafp(float da, float sa)
1439
0
{
1440
0
    return 1.0f - (1.0f - sa) * (1.0f - da);
1441
0
}
1442
#endif
1443
1444
/*
1445
    Dca' = Sca.Da + Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa)
1446
         = Sca + Dca
1447
*/
1448
template<class Ops>
1449
inline static void comp_func_solid_Plus_template(typename Ops::Type *dest, int length, typename Ops::Type color, uint const_alpha)
1450
0
{
1451
0
    auto c = Ops::convert(color);
1452
0
    if (const_alpha == 255) {
1453
0
        for (int i = 0; i < length; ++i) {
1454
0
            auto d = Ops::load(&dest[i]);
1455
0
            d = Ops::plus(d, c);
1456
0
            Ops::store(&dest[i], d);
1457
0
        }
1458
0
    } else {
1459
0
        uint ia = 255 - const_alpha;
1460
0
        for (int i = 0; i < length; ++i) {
1461
0
            auto d = Ops::load(&dest[i]);
1462
0
            d = Ops::interpolate8bit(Ops::plus(d, c), const_alpha, d, ia);
1463
0
            Ops::store(&dest[i], d);
1464
0
        }
1465
0
    }
1466
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Plus_template<Argb32OperationsC>(Argb32OperationsC::Type*, int, Argb32OperationsC::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Plus_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, int, Rgba64OperationsSSE2::Type, unsigned int)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Plus_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, int, RgbaFPOperationsSSE2::Type, unsigned int)
1467
1468
template<class Ops>
1469
inline static void comp_func_Plus_template(typename Ops::Type *Q_DECL_RESTRICT dest,
1470
                                           const typename Ops::Type *Q_DECL_RESTRICT src,
1471
                                           int length, uint const_alpha)
1472
5.76k
{
1473
5.76k
    if (const_alpha == 255) {
1474
302k
        for (int i = 0; i < length; ++i) {
1475
297k
            auto d = Ops::load(&dest[i]);
1476
297k
            auto s = Ops::load(&src[i]);
1477
297k
            d = Ops::plus(d, s);
1478
297k
            Ops::store(&dest[i], d);
1479
297k
        }
1480
4.68k
    } else {
1481
1.07k
        uint ia = 255 - const_alpha;
1482
65.7k
        for (int i = 0; i < length; ++i) {
1483
64.7k
            auto d = Ops::load(&dest[i]);
1484
64.7k
            auto s = Ops::load(&src[i]);
1485
64.7k
            d = Ops::interpolate8bit(Ops::plus(d, s), const_alpha, d, ia);
1486
64.7k
            Ops::store(&dest[i], d);
1487
64.7k
        }
1488
1.07k
    }
1489
5.76k
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Plus_template<Argb32OperationsC>(Argb32OperationsC::Type*, Argb32OperationsC::Type const*, int, unsigned int)
qcompositionfunctions.cpp:void comp_func_Plus_template<Rgba64OperationsSSE2>(Rgba64OperationsSSE2::Type*, Rgba64OperationsSSE2::Type const*, int, unsigned int)
Line
Count
Source
1472
5.76k
{
1473
5.76k
    if (const_alpha == 255) {
1474
302k
        for (int i = 0; i < length; ++i) {
1475
297k
            auto d = Ops::load(&dest[i]);
1476
297k
            auto s = Ops::load(&src[i]);
1477
297k
            d = Ops::plus(d, s);
1478
297k
            Ops::store(&dest[i], d);
1479
297k
        }
1480
4.68k
    } else {
1481
1.07k
        uint ia = 255 - const_alpha;
1482
65.7k
        for (int i = 0; i < length; ++i) {
1483
64.7k
            auto d = Ops::load(&dest[i]);
1484
64.7k
            auto s = Ops::load(&src[i]);
1485
64.7k
            d = Ops::interpolate8bit(Ops::plus(d, s), const_alpha, d, ia);
1486
64.7k
            Ops::store(&dest[i], d);
1487
64.7k
        }
1488
1.07k
    }
1489
5.76k
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Plus_template<RgbaFPOperationsSSE2>(RgbaFPOperationsSSE2::Type*, RgbaFPOperationsSSE2::Type const*, int, unsigned int)
1490
1491
void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha)
1492
0
{
1493
0
    comp_func_solid_Plus_template<Argb32Operations>(dest, length, color, const_alpha);
1494
0
}
1495
1496
void QT_FASTCALL comp_func_Plus(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
1497
0
{
1498
0
    comp_func_Plus_template<Argb32Operations>(dest, src, length, const_alpha);
1499
0
}
1500
1501
#if QT_CONFIG(raster_64bit)
1502
void QT_FASTCALL comp_func_solid_Plus_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
1503
0
{
1504
0
    comp_func_solid_Plus_template<Rgba64Operations>(dest, length, color, const_alpha);
1505
0
}
1506
1507
void QT_FASTCALL comp_func_Plus_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1508
5.76k
{
1509
5.76k
    comp_func_Plus_template<Rgba64Operations>(dest, src, length, const_alpha);
1510
5.76k
}
1511
#endif
1512
1513
#if QT_CONFIG(raster_fp)
1514
void QT_FASTCALL comp_func_solid_Plus_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
1515
0
{
1516
0
    comp_func_solid_Plus_template<RgbaFPOperations>(dest, length, color, const_alpha);
1517
0
}
1518
1519
void QT_FASTCALL comp_func_Plus_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1520
0
{
1521
0
    comp_func_Plus_template<RgbaFPOperations>(dest, src, length, const_alpha);
1522
0
}
1523
#endif
1524
1525
/*
1526
    Dca' = Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa)
1527
*/
1528
static inline int multiply_op(int dst, int src, int da, int sa)
1529
9.88M
{
1530
9.88M
    return qt_div_255(src * dst + src * (255 - da) + dst * (255 - sa));
1531
9.88M
}
1532
1533
template <typename T>
1534
static inline void comp_func_solid_Multiply_impl(uint *dest, int length, uint color, const T &coverage)
1535
0
{
1536
0
    int sa = qAlpha(color);
1537
0
    int sr = qRed(color);
1538
0
    int sg = qGreen(color);
1539
0
    int sb = qBlue(color);
1540
1541
0
    for (int i = 0; i < length; ++i) {
1542
0
        uint d = dest[i];
1543
0
        int da = qAlpha(d);
1544
1545
0
#define OP(a, b) multiply_op(a, b, da, sa)
1546
0
        int r = OP(  qRed(d), sr);
1547
0
        int b = OP( qBlue(d), sb);
1548
0
        int g = OP(qGreen(d), sg);
1549
0
        int a = mix_alpha(da, sa);
1550
0
#undef OP
1551
1552
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
1553
0
    }
1554
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Multiply_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Multiply_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
1555
1556
void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha)
1557
0
{
1558
0
    if (const_alpha == 255)
1559
0
        comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage());
1560
0
    else
1561
0
        comp_func_solid_Multiply_impl(dest, length, color, QPartialCoverage(const_alpha));
1562
0
}
1563
1564
#if QT_CONFIG(raster_64bit)
1565
static inline uint multiply_op_rgb64(uint dst, uint src, uint da, uint sa)
1566
1.75M
{
1567
1.75M
    return qt_div_65535(src * dst + src * (65535U - da) + dst * (65535U - sa));
1568
1.75M
}
1569
1570
template <typename T>
1571
static inline void comp_func_solid_Multiply_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
1572
0
{
1573
0
    uint sa = color.alpha();
1574
0
    uint sr = color.red();
1575
0
    uint sg = color.green();
1576
0
    uint sb = color.blue();
1577
1578
0
    for (int i = 0; i < length; ++i) {
1579
0
        QRgba64 d = dest[i];
1580
0
        uint da = d.alpha();
1581
1582
0
#define OP(a, b) multiply_op_rgb64(a, b, da, sa)
1583
0
        uint r = OP(  d.red(), sr);
1584
0
        uint b = OP( d.blue(), sb);
1585
0
        uint g = OP(d.green(), sg);
1586
0
        uint a = mix_alpha_rgb64(da, sa);
1587
0
#undef OP
1588
1589
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
1590
0
    }
1591
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Multiply_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Multiply_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
1592
1593
void QT_FASTCALL comp_func_solid_Multiply_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
1594
0
{
1595
0
    if (const_alpha == 255)
1596
0
        comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage());
1597
0
    else
1598
0
        comp_func_solid_Multiply_impl(dest, length, color, QPartialCoverage(const_alpha));
1599
0
}
1600
#endif
1601
1602
#if QT_CONFIG(raster_fp)
1603
static inline float multiply_op_rgbafp(float dst, float src, float da, float sa)
1604
0
{
1605
0
    return src * dst + src * (1.0f - da) + dst * (1.0f - sa);
1606
0
}
1607
1608
template <typename T>
1609
static inline void comp_func_solid_Multiply_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
1610
0
{
1611
0
    float sa = color.alpha();
1612
0
    float sr = color.red();
1613
0
    float sg = color.green();
1614
0
    float sb = color.blue();
1615
1616
0
    for (int i = 0; i < length; ++i) {
1617
0
        QRgbaFloat32 d = dest[i];
1618
0
        float da = d.alpha();
1619
1620
0
#define OP(a, b) multiply_op_rgbafp(a, b, da, sa)
1621
0
        float r = OP(  d.red(), sr);
1622
0
        float b = OP( d.blue(), sb);
1623
0
        float g = OP(d.green(), sg);
1624
0
        float a = mix_alpha_rgbafp(da, sa);
1625
0
#undef OP
1626
1627
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
1628
0
    }
1629
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Multiply_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Multiply_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
1630
1631
void QT_FASTCALL comp_func_solid_Multiply_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
1632
0
{
1633
0
    if (const_alpha == 255)
1634
0
        comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage());
1635
0
    else
1636
0
        comp_func_solid_Multiply_impl(dest, length, color, QPartialCoverage(const_alpha));
1637
0
}
1638
#endif
1639
1640
1641
template <typename T>
1642
static inline void comp_func_Multiply_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
1643
52.3k
{
1644
3.34M
    for (int i = 0; i < length; ++i) {
1645
3.29M
        uint d = dest[i];
1646
3.29M
        uint s = src[i];
1647
1648
3.29M
        int da = qAlpha(d);
1649
3.29M
        int sa = qAlpha(s);
1650
1651
9.88M
#define OP(a, b) multiply_op(a, b, da, sa)
1652
3.29M
        int r = OP(  qRed(d),   qRed(s));
1653
3.29M
        int b = OP( qBlue(d),  qBlue(s));
1654
3.29M
        int g = OP(qGreen(d), qGreen(s));
1655
3.29M
        int a = mix_alpha(da, sa);
1656
3.29M
#undef OP
1657
1658
3.29M
        coverage.store(&dest[i], qRgba(r, g, b, a));
1659
3.29M
    }
1660
52.3k
}
qcompositionfunctions.cpp:void comp_func_Multiply_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
1643
50.3k
{
1644
3.21M
    for (int i = 0; i < length; ++i) {
1645
3.16M
        uint d = dest[i];
1646
3.16M
        uint s = src[i];
1647
1648
3.16M
        int da = qAlpha(d);
1649
3.16M
        int sa = qAlpha(s);
1650
1651
3.16M
#define OP(a, b) multiply_op(a, b, da, sa)
1652
3.16M
        int r = OP(  qRed(d),   qRed(s));
1653
3.16M
        int b = OP( qBlue(d),  qBlue(s));
1654
3.16M
        int g = OP(qGreen(d), qGreen(s));
1655
3.16M
        int a = mix_alpha(da, sa);
1656
3.16M
#undef OP
1657
1658
3.16M
        coverage.store(&dest[i], qRgba(r, g, b, a));
1659
3.16M
    }
1660
50.3k
}
qcompositionfunctions.cpp:void comp_func_Multiply_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
1643
2.06k
{
1644
132k
    for (int i = 0; i < length; ++i) {
1645
130k
        uint d = dest[i];
1646
130k
        uint s = src[i];
1647
1648
130k
        int da = qAlpha(d);
1649
130k
        int sa = qAlpha(s);
1650
1651
130k
#define OP(a, b) multiply_op(a, b, da, sa)
1652
130k
        int r = OP(  qRed(d),   qRed(s));
1653
130k
        int b = OP( qBlue(d),  qBlue(s));
1654
130k
        int g = OP(qGreen(d), qGreen(s));
1655
130k
        int a = mix_alpha(da, sa);
1656
130k
#undef OP
1657
1658
130k
        coverage.store(&dest[i], qRgba(r, g, b, a));
1659
130k
    }
1660
2.06k
}
1661
1662
void QT_FASTCALL comp_func_Multiply(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
1663
52.3k
{
1664
52.3k
    if (const_alpha == 255)
1665
50.3k
        comp_func_Multiply_impl(dest, src, length, QFullCoverage());
1666
2.06k
    else
1667
2.06k
        comp_func_Multiply_impl(dest, src, length, QPartialCoverage(const_alpha));
1668
52.3k
}
1669
1670
#if QT_CONFIG(raster_64bit)
1671
template <typename T>
1672
static inline void comp_func_Multiply_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
1673
9.17k
{
1674
592k
    for (int i = 0; i < length; ++i) {
1675
583k
        QRgba64 d = dest[i];
1676
583k
        QRgba64 s = src[i];
1677
1678
583k
        uint da = d.alpha();
1679
583k
        uint sa = s.alpha();
1680
1681
1.75M
#define OP(a, b) multiply_op_rgb64(a, b, da, sa)
1682
583k
        uint r = OP(  d.red(),   s.red());
1683
583k
        uint b = OP( d.blue(),  s.blue());
1684
583k
        uint g = OP(d.green(), s.green());
1685
583k
        uint a = mix_alpha_rgb64(da, sa);
1686
583k
#undef OP
1687
1688
583k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
1689
583k
    }
1690
9.17k
}
qcompositionfunctions.cpp:void comp_func_Multiply_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
1673
8.43k
{
1674
545k
    for (int i = 0; i < length; ++i) {
1675
537k
        QRgba64 d = dest[i];
1676
537k
        QRgba64 s = src[i];
1677
1678
537k
        uint da = d.alpha();
1679
537k
        uint sa = s.alpha();
1680
1681
537k
#define OP(a, b) multiply_op_rgb64(a, b, da, sa)
1682
537k
        uint r = OP(  d.red(),   s.red());
1683
537k
        uint b = OP( d.blue(),  s.blue());
1684
537k
        uint g = OP(d.green(), s.green());
1685
537k
        uint a = mix_alpha_rgb64(da, sa);
1686
537k
#undef OP
1687
1688
537k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
1689
537k
    }
1690
8.43k
}
qcompositionfunctions.cpp:void comp_func_Multiply_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
1673
748
{
1674
47.2k
    for (int i = 0; i < length; ++i) {
1675
46.5k
        QRgba64 d = dest[i];
1676
46.5k
        QRgba64 s = src[i];
1677
1678
46.5k
        uint da = d.alpha();
1679
46.5k
        uint sa = s.alpha();
1680
1681
46.5k
#define OP(a, b) multiply_op_rgb64(a, b, da, sa)
1682
46.5k
        uint r = OP(  d.red(),   s.red());
1683
46.5k
        uint b = OP( d.blue(),  s.blue());
1684
46.5k
        uint g = OP(d.green(), s.green());
1685
46.5k
        uint a = mix_alpha_rgb64(da, sa);
1686
46.5k
#undef OP
1687
1688
46.5k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
1689
46.5k
    }
1690
748
}
1691
1692
void QT_FASTCALL comp_func_Multiply_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1693
9.17k
{
1694
9.17k
    if (const_alpha == 255)
1695
8.43k
        comp_func_Multiply_impl(dest, src, length, QFullCoverage());
1696
748
    else
1697
748
        comp_func_Multiply_impl(dest, src, length, QPartialCoverage(const_alpha));
1698
9.17k
}
1699
#endif
1700
1701
#if QT_CONFIG(raster_fp)
1702
template <typename T>
1703
static inline void comp_func_Multiply_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
1704
0
{
1705
0
    for (int i = 0; i < length; ++i) {
1706
0
        QRgbaFloat32 d = dest[i];
1707
0
        QRgbaFloat32 s = src[i];
1708
1709
0
        float da = d.alpha();
1710
0
        float sa = s.alpha();
1711
1712
0
#define OP(a, b) multiply_op_rgbafp(a, b, da, sa)
1713
0
        float r = OP(  d.red(),   s.red());
1714
0
        float b = OP( d.blue(),  s.blue());
1715
0
        float g = OP(d.green(), s.green());
1716
0
        float a = mix_alpha_rgbafp(da, sa);
1717
0
#undef OP
1718
1719
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
1720
0
    }
1721
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Multiply_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Multiply_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
1722
1723
void QT_FASTCALL comp_func_Multiply_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
1724
0
{
1725
0
    if (const_alpha == 255)
1726
0
        comp_func_Multiply_impl(dest, src, length, QFullCoverage());
1727
0
    else
1728
0
        comp_func_Multiply_impl(dest, src, length, QPartialCoverage(const_alpha));
1729
0
}
1730
#endif
1731
1732
/*
1733
    Dca' = (Sca.Da + Dca.Sa - Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa)
1734
         = Sca + Dca - Sca.Dca
1735
*/
1736
template <typename T>
1737
static inline void comp_func_solid_Screen_impl(uint *dest, int length, uint color, const T &coverage)
1738
0
{
1739
0
    int sa = qAlpha(color);
1740
0
    int sr = qRed(color);
1741
0
    int sg = qGreen(color);
1742
0
    int sb = qBlue(color);
1743
1744
0
    for (int i = 0; i < length; ++i) {
1745
0
        uint d = dest[i];
1746
0
        int da = qAlpha(d);
1747
1748
0
#define OP(a, b) 255 - qt_div_255((255-a) * (255-b))
1749
0
        int r = OP(  qRed(d), sr);
1750
0
        int b = OP( qBlue(d), sb);
1751
0
        int g = OP(qGreen(d), sg);
1752
0
        int a = mix_alpha(da, sa);
1753
0
#undef OP
1754
1755
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
1756
0
    }
1757
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Screen_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Screen_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
1758
1759
void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha)
1760
0
{
1761
0
    if (const_alpha == 255)
1762
0
        comp_func_solid_Screen_impl(dest, length, color, QFullCoverage());
1763
0
    else
1764
0
        comp_func_solid_Screen_impl(dest, length, color, QPartialCoverage(const_alpha));
1765
0
}
1766
1767
#if QT_CONFIG(raster_64bit)
1768
template <typename T>
1769
static inline void comp_func_solid_Screen_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
1770
0
{
1771
0
    uint sa = color.alpha();
1772
0
    uint sr = color.red();
1773
0
    uint sg = color.green();
1774
0
    uint sb = color.blue();
1775
1776
0
    for (int i = 0; i < length; ++i) {
1777
0
        QRgba64 d = dest[i];
1778
0
        uint da = d.alpha();
1779
1780
0
#define OP(a, b) 65535 - qt_div_65535((65535U-a) * (65535U-b))
1781
0
        uint r = OP(  d.red(), sr);
1782
0
        uint b = OP( d.blue(), sb);
1783
0
        uint g = OP(d.green(), sg);
1784
0
        uint a = mix_alpha_rgb64(da, sa);
1785
0
#undef OP
1786
1787
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
1788
0
    }
1789
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Screen_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Screen_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
1790
1791
void QT_FASTCALL comp_func_solid_Screen_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
1792
0
{
1793
0
    if (const_alpha == 255)
1794
0
        comp_func_solid_Screen_impl(dest, length, color, QFullCoverage());
1795
0
    else
1796
0
        comp_func_solid_Screen_impl(dest, length, color, QPartialCoverage(const_alpha));
1797
0
}
1798
#endif
1799
1800
#if QT_CONFIG(raster_fp)
1801
template <typename T>
1802
static inline void comp_func_solid_Screen_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
1803
0
{
1804
0
    float sa = color.alpha();
1805
0
    float sr = color.red();
1806
0
    float sg = color.green();
1807
0
    float sb = color.blue();
1808
1809
0
    for (int i = 0; i < length; ++i) {
1810
0
        QRgbaFloat32 d = dest[i];
1811
0
        float da = d.alpha();
1812
1813
0
#define OP(a, b) (1.0f - ((1.0f - a) * (1.0f - b)))
1814
0
        float r = OP(  d.red(), sr);
1815
0
        float b = OP( d.blue(), sb);
1816
0
        float g = OP(d.green(), sg);
1817
0
        float a = mix_alpha_rgbafp(da, sa);
1818
0
#undef OP
1819
1820
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
1821
0
    }
1822
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Screen_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Screen_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
1823
1824
void QT_FASTCALL comp_func_solid_Screen_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
1825
0
{
1826
0
    if (const_alpha == 255)
1827
0
        comp_func_solid_Screen_impl(dest, length, color, QFullCoverage());
1828
0
    else
1829
0
        comp_func_solid_Screen_impl(dest, length, color, QPartialCoverage(const_alpha));
1830
0
}
1831
#endif
1832
1833
template <typename T>
1834
static inline void comp_func_Screen_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
1835
187k
{
1836
11.5M
    for (int i = 0; i < length; ++i) {
1837
11.3M
        uint d = dest[i];
1838
11.3M
        uint s = src[i];
1839
1840
11.3M
        int da = qAlpha(d);
1841
11.3M
        int sa = qAlpha(s);
1842
1843
34.1M
#define OP(a, b) 255 - qt_div_255((255-a) * (255-b))
1844
11.3M
        int r = OP(  qRed(d),   qRed(s));
1845
11.3M
        int b = OP( qBlue(d),  qBlue(s));
1846
11.3M
        int g = OP(qGreen(d), qGreen(s));
1847
11.3M
        int a = mix_alpha(da, sa);
1848
11.3M
#undef OP
1849
1850
11.3M
        coverage.store(&dest[i], qRgba(r, g, b, a));
1851
11.3M
    }
1852
187k
}
qcompositionfunctions.cpp:void comp_func_Screen_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
1835
185k
{
1836
11.4M
    for (int i = 0; i < length; ++i) {
1837
11.2M
        uint d = dest[i];
1838
11.2M
        uint s = src[i];
1839
1840
11.2M
        int da = qAlpha(d);
1841
11.2M
        int sa = qAlpha(s);
1842
1843
11.2M
#define OP(a, b) 255 - qt_div_255((255-a) * (255-b))
1844
11.2M
        int r = OP(  qRed(d),   qRed(s));
1845
11.2M
        int b = OP( qBlue(d),  qBlue(s));
1846
11.2M
        int g = OP(qGreen(d), qGreen(s));
1847
11.2M
        int a = mix_alpha(da, sa);
1848
11.2M
#undef OP
1849
1850
11.2M
        coverage.store(&dest[i], qRgba(r, g, b, a));
1851
11.2M
    }
1852
185k
}
qcompositionfunctions.cpp:void comp_func_Screen_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
1835
1.61k
{
1836
103k
    for (int i = 0; i < length; ++i) {
1837
101k
        uint d = dest[i];
1838
101k
        uint s = src[i];
1839
1840
101k
        int da = qAlpha(d);
1841
101k
        int sa = qAlpha(s);
1842
1843
101k
#define OP(a, b) 255 - qt_div_255((255-a) * (255-b))
1844
101k
        int r = OP(  qRed(d),   qRed(s));
1845
101k
        int b = OP( qBlue(d),  qBlue(s));
1846
101k
        int g = OP(qGreen(d), qGreen(s));
1847
101k
        int a = mix_alpha(da, sa);
1848
101k
#undef OP
1849
1850
101k
        coverage.store(&dest[i], qRgba(r, g, b, a));
1851
101k
    }
1852
1.61k
}
1853
1854
void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha)
1855
187k
{
1856
187k
    if (const_alpha == 255)
1857
185k
        comp_func_Screen_impl(dest, src, length, QFullCoverage());
1858
1.61k
    else
1859
1.61k
        comp_func_Screen_impl(dest, src, length, QPartialCoverage(const_alpha));
1860
187k
}
1861
1862
#if QT_CONFIG(raster_64bit)
1863
template <typename T>
1864
static inline void comp_func_Screen_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
1865
7.97k
{
1866
513k
    for (int i = 0; i < length; ++i) {
1867
505k
        QRgba64 d = dest[i];
1868
505k
        QRgba64 s = src[i];
1869
1870
505k
        uint da = d.alpha();
1871
505k
        uint sa = s.alpha();
1872
1873
1.51M
#define OP(a, b) 65535U - qt_div_65535((65535U-a) * (65535U-b))
1874
505k
        uint r = OP(  d.red(),   s.red());
1875
505k
        uint b = OP( d.blue(),  s.blue());
1876
505k
        uint g = OP(d.green(), s.green());
1877
505k
        uint a = mix_alpha_rgb64(da, sa);
1878
505k
#undef OP
1879
1880
505k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
1881
505k
    }
1882
7.97k
}
qcompositionfunctions.cpp:void comp_func_Screen_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
1865
7.42k
{
1866
480k
    for (int i = 0; i < length; ++i) {
1867
472k
        QRgba64 d = dest[i];
1868
472k
        QRgba64 s = src[i];
1869
1870
472k
        uint da = d.alpha();
1871
472k
        uint sa = s.alpha();
1872
1873
472k
#define OP(a, b) 65535U - qt_div_65535((65535U-a) * (65535U-b))
1874
472k
        uint r = OP(  d.red(),   s.red());
1875
472k
        uint b = OP( d.blue(),  s.blue());
1876
472k
        uint g = OP(d.green(), s.green());
1877
472k
        uint a = mix_alpha_rgb64(da, sa);
1878
472k
#undef OP
1879
1880
472k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
1881
472k
    }
1882
7.42k
}
qcompositionfunctions.cpp:void comp_func_Screen_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
1865
553
{
1866
33.0k
    for (int i = 0; i < length; ++i) {
1867
32.4k
        QRgba64 d = dest[i];
1868
32.4k
        QRgba64 s = src[i];
1869
1870
32.4k
        uint da = d.alpha();
1871
32.4k
        uint sa = s.alpha();
1872
1873
32.4k
#define OP(a, b) 65535U - qt_div_65535((65535U-a) * (65535U-b))
1874
32.4k
        uint r = OP(  d.red(),   s.red());
1875
32.4k
        uint b = OP( d.blue(),  s.blue());
1876
32.4k
        uint g = OP(d.green(), s.green());
1877
32.4k
        uint a = mix_alpha_rgb64(da, sa);
1878
32.4k
#undef OP
1879
1880
32.4k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
1881
32.4k
    }
1882
553
}
1883
1884
void QT_FASTCALL comp_func_Screen_rgb64(QRgba64 *dest, const QRgba64 *src, int length, uint const_alpha)
1885
7.97k
{
1886
7.97k
    if (const_alpha == 255)
1887
7.42k
        comp_func_Screen_impl(dest, src, length, QFullCoverage());
1888
553
    else
1889
553
        comp_func_Screen_impl(dest, src, length, QPartialCoverage(const_alpha));
1890
7.97k
}
1891
#endif
1892
1893
#if QT_CONFIG(raster_fp)
1894
template <typename T>
1895
static inline void comp_func_Screen_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
1896
0
{
1897
0
    for (int i = 0; i < length; ++i) {
1898
0
        QRgbaFloat32 d = dest[i];
1899
0
        QRgbaFloat32 s = src[i];
1900
1901
0
        float da = d.alpha();
1902
0
        float sa = s.alpha();
1903
1904
0
#define OP(a, b) (1.0f - ((1.0f - a) * (1.0f - b)))
1905
0
        float r = OP(  d.red(),   s.red());
1906
0
        float b = OP( d.blue(),  s.blue());
1907
0
        float g = OP(d.green(), s.green());
1908
0
        float a = mix_alpha_rgbafp(da, sa);
1909
0
#undef OP
1910
1911
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
1912
0
    }
1913
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Screen_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Screen_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
1914
1915
void QT_FASTCALL comp_func_Screen_rgbafp(QRgbaFloat32 *dest, const QRgbaFloat32 *src, int length, uint const_alpha)
1916
0
{
1917
0
    if (const_alpha == 255)
1918
0
        comp_func_Screen_impl(dest, src, length, QFullCoverage());
1919
0
    else
1920
0
        comp_func_Screen_impl(dest, src, length, QPartialCoverage(const_alpha));
1921
0
}
1922
#endif
1923
1924
/*
1925
    if 2.Dca < Da
1926
        Dca' = 2.Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa)
1927
    otherwise
1928
        Dca' = Sa.Da - 2.(Da - Dca).(Sa - Sca) + Sca.(1 - Da) + Dca.(1 - Sa)
1929
*/
1930
static inline int overlay_op(int dst, int src, int da, int sa)
1931
14.5M
{
1932
14.5M
    const int temp = src * (255 - da) + dst * (255 - sa);
1933
14.5M
    if (2 * dst < da)
1934
12.5M
        return qt_div_255(2 * src * dst + temp);
1935
2.02M
    else
1936
2.02M
        return qt_div_255(sa * da - 2 * (da - dst) * (sa - src) + temp);
1937
14.5M
}
1938
1939
template <typename T>
1940
static inline void comp_func_solid_Overlay_impl(uint *dest, int length, uint color, const T &coverage)
1941
0
{
1942
0
    int sa = qAlpha(color);
1943
0
    int sr = qRed(color);
1944
0
    int sg = qGreen(color);
1945
0
    int sb = qBlue(color);
1946
1947
0
    for (int i = 0; i < length; ++i) {
1948
0
        uint d = dest[i];
1949
0
        int da = qAlpha(d);
1950
1951
0
#define OP(a, b) overlay_op(a, b, da, sa)
1952
0
        int r = OP(  qRed(d), sr);
1953
0
        int b = OP( qBlue(d), sb);
1954
0
        int g = OP(qGreen(d), sg);
1955
0
        int a = mix_alpha(da, sa);
1956
0
#undef OP
1957
1958
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
1959
0
    }
1960
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Overlay_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Overlay_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
1961
1962
void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha)
1963
0
{
1964
0
    if (const_alpha == 255)
1965
0
        comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage());
1966
0
    else
1967
0
        comp_func_solid_Overlay_impl(dest, length, color, QPartialCoverage(const_alpha));
1968
0
}
1969
1970
#if QT_CONFIG(raster_64bit)
1971
static inline uint overlay_op_rgb64(uint dst, uint src, uint da, uint sa)
1972
1.78M
{
1973
1.78M
    const uint temp = src * (65535U - da) + dst * (65535U - sa);
1974
1.78M
    if (2 * dst < da)
1975
333k
        return qt_div_65535(2 * src * dst + temp);
1976
1.45M
    else
1977
1.45M
        return qt_div_65535(sa * da - 2 * (da - dst) * (sa - src) + temp);
1978
1.78M
}
1979
1980
template <typename T>
1981
static inline void comp_func_solid_Overlay_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
1982
0
{
1983
0
    uint sa = color.alpha();
1984
0
    uint sr = color.red();
1985
0
    uint sg = color.green();
1986
0
    uint sb = color.blue();
1987
1988
0
    for (int i = 0; i < length; ++i) {
1989
0
        QRgba64 d = dest[i];
1990
0
        uint da = d.alpha();
1991
1992
0
#define OP(a, b) overlay_op_rgb64(a, b, da, sa)
1993
0
        uint r = OP(  d.red(), sr);
1994
0
        uint b = OP( d.blue(), sb);
1995
0
        uint g = OP(d.green(), sg);
1996
0
        uint a = mix_alpha_rgb64(da, sa);
1997
0
#undef OP
1998
1999
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2000
0
    }
2001
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Overlay_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Overlay_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
2002
2003
void QT_FASTCALL comp_func_solid_Overlay_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
2004
0
{
2005
0
    if (const_alpha == 255)
2006
0
        comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage());
2007
0
    else
2008
0
        comp_func_solid_Overlay_impl(dest, length, color, QPartialCoverage(const_alpha));
2009
0
}
2010
#endif
2011
2012
#if QT_CONFIG(raster_fp)
2013
static inline float overlay_op_rgbafp(float dst, float src, float da, float sa)
2014
0
{
2015
0
    const float temp = src * (1.0f - da) + dst * (1.0f - sa);
2016
0
    if (2 * dst < da)
2017
0
        return 2 * src * dst + temp;
2018
0
    else
2019
0
        return sa * da - 2 * (da - dst) * (sa - src) + temp;
2020
0
}
2021
2022
template <typename T>
2023
static inline void comp_func_solid_Overlay_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
2024
0
{
2025
0
    float sa = color.alpha();
2026
0
    float sr = color.red();
2027
0
    float sg = color.green();
2028
0
    float sb = color.blue();
2029
2030
0
    for (int i = 0; i < length; ++i) {
2031
0
        QRgbaFloat32 d = dest[i];
2032
0
        float da = d.alpha();
2033
2034
0
#define OP(a, b) overlay_op_rgbafp(a, b, da, sa)
2035
0
        float r = OP(  d.red(), sr);
2036
0
        float b = OP( d.blue(), sb);
2037
0
        float g = OP(d.green(), sg);
2038
0
        float a = mix_alpha_rgbafp(da, sa);
2039
0
#undef OP
2040
2041
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2042
0
    }
2043
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Overlay_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Overlay_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
2044
2045
void QT_FASTCALL comp_func_solid_Overlay_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
2046
0
{
2047
0
    if (const_alpha == 255)
2048
0
        comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage());
2049
0
    else
2050
0
        comp_func_solid_Overlay_impl(dest, length, color, QPartialCoverage(const_alpha));
2051
0
}
2052
#endif
2053
2054
template <typename T>
2055
static inline void comp_func_Overlay_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
2056
79.1k
{
2057
4.93M
    for (int i = 0; i < length; ++i) {
2058
4.85M
        uint d = dest[i];
2059
4.85M
        uint s = src[i];
2060
2061
4.85M
        int da = qAlpha(d);
2062
4.85M
        int sa = qAlpha(s);
2063
2064
14.5M
#define OP(a, b) overlay_op(a, b, da, sa)
2065
4.85M
        int r = OP(  qRed(d),   qRed(s));
2066
4.85M
        int b = OP( qBlue(d),  qBlue(s));
2067
4.85M
        int g = OP(qGreen(d), qGreen(s));
2068
4.85M
        int a = mix_alpha(da, sa);
2069
4.85M
#undef OP
2070
2071
4.85M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2072
4.85M
    }
2073
79.1k
}
qcompositionfunctions.cpp:void comp_func_Overlay_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
2056
74.4k
{
2057
4.66M
    for (int i = 0; i < length; ++i) {
2058
4.58M
        uint d = dest[i];
2059
4.58M
        uint s = src[i];
2060
2061
4.58M
        int da = qAlpha(d);
2062
4.58M
        int sa = qAlpha(s);
2063
2064
4.58M
#define OP(a, b) overlay_op(a, b, da, sa)
2065
4.58M
        int r = OP(  qRed(d),   qRed(s));
2066
4.58M
        int b = OP( qBlue(d),  qBlue(s));
2067
4.58M
        int g = OP(qGreen(d), qGreen(s));
2068
4.58M
        int a = mix_alpha(da, sa);
2069
4.58M
#undef OP
2070
2071
4.58M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2072
4.58M
    }
2073
74.4k
}
qcompositionfunctions.cpp:void comp_func_Overlay_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
2056
4.69k
{
2057
276k
    for (int i = 0; i < length; ++i) {
2058
272k
        uint d = dest[i];
2059
272k
        uint s = src[i];
2060
2061
272k
        int da = qAlpha(d);
2062
272k
        int sa = qAlpha(s);
2063
2064
272k
#define OP(a, b) overlay_op(a, b, da, sa)
2065
272k
        int r = OP(  qRed(d),   qRed(s));
2066
272k
        int b = OP( qBlue(d),  qBlue(s));
2067
272k
        int g = OP(qGreen(d), qGreen(s));
2068
272k
        int a = mix_alpha(da, sa);
2069
272k
#undef OP
2070
2071
272k
        coverage.store(&dest[i], qRgba(r, g, b, a));
2072
272k
    }
2073
4.69k
}
2074
2075
void QT_FASTCALL comp_func_Overlay(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
2076
79.1k
{
2077
79.1k
    if (const_alpha == 255)
2078
74.4k
        comp_func_Overlay_impl(dest, src, length, QFullCoverage());
2079
4.69k
    else
2080
4.69k
        comp_func_Overlay_impl(dest, src, length, QPartialCoverage(const_alpha));
2081
79.1k
}
2082
2083
#if QT_CONFIG(raster_64bit)
2084
template <typename T>
2085
static inline void comp_func_Overlay_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
2086
10.3k
{
2087
606k
    for (int i = 0; i < length; ++i) {
2088
595k
        QRgba64 d = dest[i];
2089
595k
        QRgba64 s = src[i];
2090
2091
595k
        uint da = d.alpha();
2092
595k
        uint sa = s.alpha();
2093
2094
1.78M
#define OP(a, b) overlay_op_rgb64(a, b, da, sa)
2095
595k
        uint r = OP(  d.red(),   s.red());
2096
595k
        uint b = OP( d.blue(),  s.blue());
2097
595k
        uint g = OP(d.green(), s.green());
2098
595k
        uint a = mix_alpha_rgb64(da, sa);
2099
595k
#undef OP
2100
2101
595k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2102
595k
    }
2103
10.3k
}
qcompositionfunctions.cpp:void comp_func_Overlay_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
2086
7.14k
{
2087
405k
    for (int i = 0; i < length; ++i) {
2088
397k
        QRgba64 d = dest[i];
2089
397k
        QRgba64 s = src[i];
2090
2091
397k
        uint da = d.alpha();
2092
397k
        uint sa = s.alpha();
2093
2094
397k
#define OP(a, b) overlay_op_rgb64(a, b, da, sa)
2095
397k
        uint r = OP(  d.red(),   s.red());
2096
397k
        uint b = OP( d.blue(),  s.blue());
2097
397k
        uint g = OP(d.green(), s.green());
2098
397k
        uint a = mix_alpha_rgb64(da, sa);
2099
397k
#undef OP
2100
2101
397k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2102
397k
    }
2103
7.14k
}
qcompositionfunctions.cpp:void comp_func_Overlay_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
2086
3.18k
{
2087
201k
    for (int i = 0; i < length; ++i) {
2088
197k
        QRgba64 d = dest[i];
2089
197k
        QRgba64 s = src[i];
2090
2091
197k
        uint da = d.alpha();
2092
197k
        uint sa = s.alpha();
2093
2094
197k
#define OP(a, b) overlay_op_rgb64(a, b, da, sa)
2095
197k
        uint r = OP(  d.red(),   s.red());
2096
197k
        uint b = OP( d.blue(),  s.blue());
2097
197k
        uint g = OP(d.green(), s.green());
2098
197k
        uint a = mix_alpha_rgb64(da, sa);
2099
197k
#undef OP
2100
2101
197k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2102
197k
    }
2103
3.18k
}
2104
2105
void QT_FASTCALL comp_func_Overlay_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
2106
10.3k
{
2107
10.3k
    if (const_alpha == 255)
2108
7.14k
        comp_func_Overlay_impl(dest, src, length, QFullCoverage());
2109
3.18k
    else
2110
3.18k
        comp_func_Overlay_impl(dest, src, length, QPartialCoverage(const_alpha));
2111
10.3k
}
2112
#endif
2113
2114
#if QT_CONFIG(raster_fp)
2115
template <typename T>
2116
static inline void comp_func_Overlay_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
2117
0
{
2118
0
    for (int i = 0; i < length; ++i) {
2119
0
        QRgbaFloat32 d = dest[i];
2120
0
        QRgbaFloat32 s = src[i];
2121
2122
0
        float da = d.alpha();
2123
0
        float sa = s.alpha();
2124
2125
0
#define OP(a, b) overlay_op_rgbafp(a, b, da, sa)
2126
0
        float r = OP(  d.red(),   s.red());
2127
0
        float b = OP( d.blue(),  s.blue());
2128
0
        float g = OP(d.green(), s.green());
2129
0
        float a = mix_alpha_rgbafp(da, sa);
2130
0
#undef OP
2131
2132
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2133
0
    }
2134
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Overlay_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Overlay_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
2135
2136
void QT_FASTCALL comp_func_Overlay_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
2137
0
{
2138
0
    if (const_alpha == 255)
2139
0
        comp_func_Overlay_impl(dest, src, length, QFullCoverage());
2140
0
    else
2141
0
        comp_func_Overlay_impl(dest, src, length, QPartialCoverage(const_alpha));
2142
0
}
2143
#endif
2144
2145
/*
2146
    Dca' = min(Sca.Da, Dca.Sa) + Sca.(1 - Da) + Dca.(1 - Sa)
2147
    Da'  = Sa + Da - Sa.Da
2148
*/
2149
static inline int darken_op(int dst, int src, int da, int sa)
2150
8.69M
{
2151
8.69M
    return qt_div_255(qMin(src * da, dst * sa) + src * (255 - da) + dst * (255 - sa));
2152
8.69M
}
2153
2154
template <typename T>
2155
static inline void comp_func_solid_Darken_impl(uint *dest, int length, uint color, const T &coverage)
2156
0
{
2157
0
    int sa = qAlpha(color);
2158
0
    int sr = qRed(color);
2159
0
    int sg = qGreen(color);
2160
0
    int sb = qBlue(color);
2161
2162
0
    for (int i = 0; i < length; ++i) {
2163
0
        uint d = dest[i];
2164
0
        int da = qAlpha(d);
2165
2166
0
#define OP(a, b) darken_op(a, b, da, sa)
2167
0
        int r =  OP(  qRed(d), sr);
2168
0
        int b =  OP( qBlue(d), sb);
2169
0
        int g =  OP(qGreen(d), sg);
2170
0
        int a = mix_alpha(da, sa);
2171
0
#undef OP
2172
2173
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
2174
0
    }
2175
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Darken_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Darken_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
2176
2177
void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha)
2178
0
{
2179
0
    if (const_alpha == 255)
2180
0
        comp_func_solid_Darken_impl(dest, length, color, QFullCoverage());
2181
0
    else
2182
0
        comp_func_solid_Darken_impl(dest, length, color, QPartialCoverage(const_alpha));
2183
0
}
2184
2185
#if QT_CONFIG(raster_64bit)
2186
static inline uint darken_op_rgb64(uint dst, uint src, uint da, uint sa)
2187
7.90M
{
2188
7.90M
    return qt_div_65535(qMin(src * da, dst * sa) + src * (65535U - da) + dst * (65535U - sa));
2189
7.90M
}
2190
2191
template <typename T>
2192
static inline void comp_func_solid_Darken_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
2193
0
{
2194
0
    uint sa = color.alpha();
2195
0
    uint sr = color.red();
2196
0
    uint sg = color.green();
2197
0
    uint sb = color.blue();
2198
2199
0
    for (int i = 0; i < length; ++i) {
2200
0
        QRgba64 d = dest[i];
2201
0
        uint da = d.alpha();
2202
2203
0
#define OP(a, b) darken_op_rgb64(a, b, da, sa)
2204
0
        uint r = OP(  d.red(), sr);
2205
0
        uint b = OP( d.blue(), sb);
2206
0
        uint g = OP(d.green(), sg);
2207
0
        uint a = mix_alpha_rgb64(da, sa);
2208
0
#undef OP
2209
2210
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2211
0
    }
2212
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Darken_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Darken_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
2213
2214
void QT_FASTCALL comp_func_solid_Darken_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
2215
0
{
2216
0
    if (const_alpha == 255)
2217
0
        comp_func_solid_Darken_impl(dest, length, color, QFullCoverage());
2218
0
    else
2219
0
        comp_func_solid_Darken_impl(dest, length, color, QPartialCoverage(const_alpha));
2220
0
}
2221
#endif
2222
2223
#if QT_CONFIG(raster_fp)
2224
static inline float darken_op_rgbafp(float dst, float src, float da, float sa)
2225
0
{
2226
0
    return qMin(src * da, dst * sa) + src * (1.0f - da) + dst * (1.0f - sa);
2227
0
}
2228
2229
template <typename T>
2230
static inline void comp_func_solid_Darken_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
2231
0
{
2232
0
    float sa = color.alpha();
2233
0
    float sr = color.red();
2234
0
    float sg = color.green();
2235
0
    float sb = color.blue();
2236
2237
0
    for (int i = 0; i < length; ++i) {
2238
0
        QRgbaFloat32 d = dest[i];
2239
0
        float da = d.alpha();
2240
2241
0
#define OP(a, b) darken_op_rgbafp(a, b, da, sa)
2242
0
        float r = OP(  d.red(), sr);
2243
0
        float b = OP( d.blue(), sb);
2244
0
        float g = OP(d.green(), sg);
2245
0
        float a = mix_alpha_rgbafp(da, sa);
2246
0
#undef OP
2247
2248
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2249
0
    }
2250
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Darken_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Darken_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
2251
2252
void QT_FASTCALL comp_func_solid_Darken_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
2253
0
{
2254
0
    if (const_alpha == 255)
2255
0
        comp_func_solid_Darken_impl(dest, length, color, QFullCoverage());
2256
0
    else
2257
0
        comp_func_solid_Darken_impl(dest, length, color, QPartialCoverage(const_alpha));
2258
0
}
2259
#endif
2260
2261
template <typename T>
2262
static inline void comp_func_Darken_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
2263
47.5k
{
2264
2.94M
    for (int i = 0; i < length; ++i) {
2265
2.89M
        uint d = dest[i];
2266
2.89M
        uint s = src[i];
2267
2268
2.89M
        int da = qAlpha(d);
2269
2.89M
        int sa = qAlpha(s);
2270
2271
8.69M
#define OP(a, b) darken_op(a, b, da, sa)
2272
2.89M
        int r = OP(  qRed(d),   qRed(s));
2273
2.89M
        int b = OP( qBlue(d),  qBlue(s));
2274
2.89M
        int g = OP(qGreen(d), qGreen(s));
2275
2.89M
        int a = mix_alpha(da, sa);
2276
2.89M
#undef OP
2277
2278
2.89M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2279
2.89M
    }
2280
47.5k
}
qcompositionfunctions.cpp:void comp_func_Darken_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
2263
40.5k
{
2264
2.54M
    for (int i = 0; i < length; ++i) {
2265
2.50M
        uint d = dest[i];
2266
2.50M
        uint s = src[i];
2267
2268
2.50M
        int da = qAlpha(d);
2269
2.50M
        int sa = qAlpha(s);
2270
2271
2.50M
#define OP(a, b) darken_op(a, b, da, sa)
2272
2.50M
        int r = OP(  qRed(d),   qRed(s));
2273
2.50M
        int b = OP( qBlue(d),  qBlue(s));
2274
2.50M
        int g = OP(qGreen(d), qGreen(s));
2275
2.50M
        int a = mix_alpha(da, sa);
2276
2.50M
#undef OP
2277
2278
2.50M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2279
2.50M
    }
2280
40.5k
}
qcompositionfunctions.cpp:void comp_func_Darken_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
2263
7.02k
{
2264
398k
    for (int i = 0; i < length; ++i) {
2265
391k
        uint d = dest[i];
2266
391k
        uint s = src[i];
2267
2268
391k
        int da = qAlpha(d);
2269
391k
        int sa = qAlpha(s);
2270
2271
391k
#define OP(a, b) darken_op(a, b, da, sa)
2272
391k
        int r = OP(  qRed(d),   qRed(s));
2273
391k
        int b = OP( qBlue(d),  qBlue(s));
2274
391k
        int g = OP(qGreen(d), qGreen(s));
2275
391k
        int a = mix_alpha(da, sa);
2276
391k
#undef OP
2277
2278
391k
        coverage.store(&dest[i], qRgba(r, g, b, a));
2279
391k
    }
2280
7.02k
}
2281
2282
void QT_FASTCALL comp_func_Darken(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
2283
47.5k
{
2284
47.5k
    if (const_alpha == 255)
2285
40.5k
        comp_func_Darken_impl(dest, src, length, QFullCoverage());
2286
7.02k
    else
2287
7.02k
        comp_func_Darken_impl(dest, src, length, QPartialCoverage(const_alpha));
2288
47.5k
}
2289
2290
#if QT_CONFIG(raster_64bit)
2291
template <typename T>
2292
static inline void comp_func_Darken_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
2293
45.8k
{
2294
2.68M
    for (int i = 0; i < length; ++i) {
2295
2.63M
        QRgba64 d = dest[i];
2296
2.63M
        QRgba64 s = src[i];
2297
2298
2.63M
        uint da = d.alpha();
2299
2.63M
        uint sa = s.alpha();
2300
2301
7.90M
#define OP(a, b) darken_op_rgb64(a, b, da, sa)
2302
2.63M
        uint r = OP(  d.red(),   s.red());
2303
2.63M
        uint b = OP( d.blue(),  s.blue());
2304
2.63M
        uint g = OP(d.green(), s.green());
2305
2.63M
        uint a = mix_alpha_rgb64(da, sa);
2306
2.63M
#undef OP
2307
2308
2.63M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2309
2.63M
    }
2310
45.8k
}
qcompositionfunctions.cpp:void comp_func_Darken_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
2293
33.6k
{
2294
1.96M
    for (int i = 0; i < length; ++i) {
2295
1.92M
        QRgba64 d = dest[i];
2296
1.92M
        QRgba64 s = src[i];
2297
2298
1.92M
        uint da = d.alpha();
2299
1.92M
        uint sa = s.alpha();
2300
2301
1.92M
#define OP(a, b) darken_op_rgb64(a, b, da, sa)
2302
1.92M
        uint r = OP(  d.red(),   s.red());
2303
1.92M
        uint b = OP( d.blue(),  s.blue());
2304
1.92M
        uint g = OP(d.green(), s.green());
2305
1.92M
        uint a = mix_alpha_rgb64(da, sa);
2306
1.92M
#undef OP
2307
2308
1.92M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2309
1.92M
    }
2310
33.6k
}
qcompositionfunctions.cpp:void comp_func_Darken_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
2293
12.2k
{
2294
719k
    for (int i = 0; i < length; ++i) {
2295
707k
        QRgba64 d = dest[i];
2296
707k
        QRgba64 s = src[i];
2297
2298
707k
        uint da = d.alpha();
2299
707k
        uint sa = s.alpha();
2300
2301
707k
#define OP(a, b) darken_op_rgb64(a, b, da, sa)
2302
707k
        uint r = OP(  d.red(),   s.red());
2303
707k
        uint b = OP( d.blue(),  s.blue());
2304
707k
        uint g = OP(d.green(), s.green());
2305
707k
        uint a = mix_alpha_rgb64(da, sa);
2306
707k
#undef OP
2307
2308
707k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2309
707k
    }
2310
12.2k
}
2311
2312
void QT_FASTCALL comp_func_Darken_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
2313
45.8k
{
2314
45.8k
    if (const_alpha == 255)
2315
33.6k
        comp_func_Darken_impl(dest, src, length, QFullCoverage());
2316
12.2k
    else
2317
12.2k
        comp_func_Darken_impl(dest, src, length, QPartialCoverage(const_alpha));
2318
45.8k
}
2319
#endif
2320
2321
#if QT_CONFIG(raster_fp)
2322
template <typename T>
2323
static inline void comp_func_Darken_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
2324
0
{
2325
0
    for (int i = 0; i < length; ++i) {
2326
0
        QRgbaFloat32 d = dest[i];
2327
0
        QRgbaFloat32 s = src[i];
2328
2329
0
        float da = d.alpha();
2330
0
        float sa = s.alpha();
2331
2332
0
#define OP(a, b) darken_op_rgbafp(a, b, da, sa)
2333
0
        float r = OP(  d.red(),   s.red());
2334
0
        float b = OP( d.blue(),  s.blue());
2335
0
        float g = OP(d.green(), s.green());
2336
0
        float a = mix_alpha_rgbafp(da, sa);
2337
0
#undef OP
2338
2339
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2340
0
    }
2341
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Darken_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Darken_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
2342
2343
void QT_FASTCALL comp_func_Darken_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
2344
0
{
2345
0
    if (const_alpha == 255)
2346
0
        comp_func_Darken_impl(dest, src, length, QFullCoverage());
2347
0
    else
2348
0
        comp_func_Darken_impl(dest, src, length, QPartialCoverage(const_alpha));
2349
0
}
2350
#endif
2351
2352
/*
2353
   Dca' = max(Sca.Da, Dca.Sa) + Sca.(1 - Da) + Dca.(1 - Sa)
2354
   Da'  = Sa + Da - Sa.Da
2355
*/
2356
static inline int lighten_op(int dst, int src, int da, int sa)
2357
38.7M
{
2358
38.7M
    return qt_div_255(qMax(src * da, dst * sa) + src * (255 - da) + dst * (255 - sa));
2359
38.7M
}
2360
2361
template <typename T>
2362
static inline void comp_func_solid_Lighten_impl(uint *dest, int length, uint color, const T &coverage)
2363
0
{
2364
0
    int sa = qAlpha(color);
2365
0
    int sr = qRed(color);
2366
0
    int sg = qGreen(color);
2367
0
    int sb = qBlue(color);
2368
2369
0
    for (int i = 0; i < length; ++i) {
2370
0
        uint d = dest[i];
2371
0
        int da = qAlpha(d);
2372
2373
0
#define OP(a, b) lighten_op(a, b, da, sa)
2374
0
        int r =  OP(  qRed(d), sr);
2375
0
        int b =  OP( qBlue(d), sb);
2376
0
        int g =  OP(qGreen(d), sg);
2377
0
        int a = mix_alpha(da, sa);
2378
0
#undef OP
2379
2380
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
2381
0
    }
2382
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Lighten_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Lighten_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
2383
2384
void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha)
2385
0
{
2386
0
    if (const_alpha == 255)
2387
0
        comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage());
2388
0
    else
2389
0
        comp_func_solid_Lighten_impl(dest, length, color, QPartialCoverage(const_alpha));
2390
0
}
2391
2392
2393
#if QT_CONFIG(raster_64bit)
2394
static inline uint lighten_op_rgb64(uint dst, uint src, uint da, uint sa)
2395
12.8M
{
2396
12.8M
    return qt_div_65535(qMax(src * da, dst * sa) + src * (65535U - da) + dst * (65535U - sa));
2397
12.8M
}
2398
2399
template <typename T>
2400
static inline void comp_func_solid_Lighten_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
2401
0
{
2402
0
    uint sa = color.alpha();
2403
0
    uint sr = color.red();
2404
0
    uint sg = color.green();
2405
0
    uint sb = color.blue();
2406
2407
0
    for (int i = 0; i < length; ++i) {
2408
0
        QRgba64 d = dest[i];
2409
0
        uint da = d.alpha();
2410
2411
0
#define OP(a, b) lighten_op_rgb64(a, b, da, sa)
2412
0
        uint r = OP(  d.red(), sr);
2413
0
        uint b = OP( d.blue(), sb);
2414
0
        uint g = OP(d.green(), sg);
2415
0
        uint a = mix_alpha_rgb64(da, sa);
2416
0
#undef OP
2417
2418
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2419
0
    }
2420
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Lighten_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Lighten_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
2421
2422
void QT_FASTCALL comp_func_solid_Lighten_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
2423
0
{
2424
0
    if (const_alpha == 255)
2425
0
        comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage());
2426
0
    else
2427
0
        comp_func_solid_Lighten_impl(dest, length, color, QPartialCoverage(const_alpha));
2428
0
}
2429
#endif
2430
2431
#if QT_CONFIG(raster_fp)
2432
static inline float lighten_op_rgbafp(float dst, float src, float da, float sa)
2433
0
{
2434
0
    return qMax(src * da, dst * sa) + src * (1.0f - da) + dst * (1.0f - sa);
2435
0
}
2436
2437
template <typename T>
2438
static inline void comp_func_solid_Lighten_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
2439
0
{
2440
0
    float sa = color.alpha();
2441
0
    float sr = color.red();
2442
0
    float sg = color.green();
2443
0
    float sb = color.blue();
2444
2445
0
    for (int i = 0; i < length; ++i) {
2446
0
        QRgbaFloat32 d = dest[i];
2447
0
        float da = d.alpha();
2448
2449
0
#define OP(a, b) lighten_op_rgbafp(a, b, da, sa)
2450
0
        float r = OP(  d.red(), sr);
2451
0
        float b = OP( d.blue(), sb);
2452
0
        float g = OP(d.green(), sg);
2453
0
        float a = mix_alpha_rgbafp(da, sa);
2454
0
#undef OP
2455
2456
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2457
0
    }
2458
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Lighten_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Lighten_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
2459
2460
void QT_FASTCALL comp_func_solid_Lighten_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
2461
0
{
2462
0
    if (const_alpha == 255)
2463
0
        comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage());
2464
0
    else
2465
0
        comp_func_solid_Lighten_impl(dest, length, color, QPartialCoverage(const_alpha));
2466
0
}
2467
#endif
2468
2469
template <typename T>
2470
static inline void comp_func_Lighten_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
2471
211k
{
2472
13.1M
    for (int i = 0; i < length; ++i) {
2473
12.9M
        uint d = dest[i];
2474
12.9M
        uint s = src[i];
2475
2476
12.9M
        int da = qAlpha(d);
2477
12.9M
        int sa = qAlpha(s);
2478
2479
38.7M
#define OP(a, b) lighten_op(a, b, da, sa)
2480
12.9M
        int r = OP(  qRed(d),   qRed(s));
2481
12.9M
        int b = OP( qBlue(d),  qBlue(s));
2482
12.9M
        int g = OP(qGreen(d), qGreen(s));
2483
12.9M
        int a = mix_alpha(da, sa);
2484
12.9M
#undef OP
2485
2486
12.9M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2487
12.9M
    }
2488
211k
}
qcompositionfunctions.cpp:void comp_func_Lighten_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
2471
204k
{
2472
12.6M
    for (int i = 0; i < length; ++i) {
2473
12.4M
        uint d = dest[i];
2474
12.4M
        uint s = src[i];
2475
2476
12.4M
        int da = qAlpha(d);
2477
12.4M
        int sa = qAlpha(s);
2478
2479
12.4M
#define OP(a, b) lighten_op(a, b, da, sa)
2480
12.4M
        int r = OP(  qRed(d),   qRed(s));
2481
12.4M
        int b = OP( qBlue(d),  qBlue(s));
2482
12.4M
        int g = OP(qGreen(d), qGreen(s));
2483
12.4M
        int a = mix_alpha(da, sa);
2484
12.4M
#undef OP
2485
2486
12.4M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2487
12.4M
    }
2488
204k
}
qcompositionfunctions.cpp:void comp_func_Lighten_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
2471
7.78k
{
2472
450k
    for (int i = 0; i < length; ++i) {
2473
442k
        uint d = dest[i];
2474
442k
        uint s = src[i];
2475
2476
442k
        int da = qAlpha(d);
2477
442k
        int sa = qAlpha(s);
2478
2479
442k
#define OP(a, b) lighten_op(a, b, da, sa)
2480
442k
        int r = OP(  qRed(d),   qRed(s));
2481
442k
        int b = OP( qBlue(d),  qBlue(s));
2482
442k
        int g = OP(qGreen(d), qGreen(s));
2483
442k
        int a = mix_alpha(da, sa);
2484
442k
#undef OP
2485
2486
442k
        coverage.store(&dest[i], qRgba(r, g, b, a));
2487
442k
    }
2488
7.78k
}
2489
2490
void QT_FASTCALL comp_func_Lighten(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
2491
211k
{
2492
211k
    if (const_alpha == 255)
2493
204k
        comp_func_Lighten_impl(dest, src, length, QFullCoverage());
2494
7.78k
    else
2495
7.78k
        comp_func_Lighten_impl(dest, src, length, QPartialCoverage(const_alpha));
2496
211k
}
2497
2498
#if QT_CONFIG(raster_64bit)
2499
template <typename T>
2500
static inline void comp_func_Lighten_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
2501
73.5k
{
2502
4.35M
    for (int i = 0; i < length; ++i) {
2503
4.27M
        QRgba64 d = dest[i];
2504
4.27M
        QRgba64 s = src[i];
2505
2506
4.27M
        uint da = d.alpha();
2507
4.27M
        uint sa = s.alpha();
2508
2509
12.8M
#define OP(a, b) lighten_op_rgb64(a, b, da, sa)
2510
4.27M
        uint r = OP(  d.red(),   s.red());
2511
4.27M
        uint b = OP( d.blue(),  s.blue());
2512
4.27M
        uint g = OP(d.green(), s.green());
2513
4.27M
        uint a = mix_alpha_rgb64(da, sa);
2514
4.27M
#undef OP
2515
2516
4.27M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2517
4.27M
    }
2518
73.5k
}
qcompositionfunctions.cpp:void comp_func_Lighten_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
2501
36.1k
{
2502
2.14M
    for (int i = 0; i < length; ++i) {
2503
2.10M
        QRgba64 d = dest[i];
2504
2.10M
        QRgba64 s = src[i];
2505
2506
2.10M
        uint da = d.alpha();
2507
2.10M
        uint sa = s.alpha();
2508
2509
2.10M
#define OP(a, b) lighten_op_rgb64(a, b, da, sa)
2510
2.10M
        uint r = OP(  d.red(),   s.red());
2511
2.10M
        uint b = OP( d.blue(),  s.blue());
2512
2.10M
        uint g = OP(d.green(), s.green());
2513
2.10M
        uint a = mix_alpha_rgb64(da, sa);
2514
2.10M
#undef OP
2515
2516
2.10M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2517
2.10M
    }
2518
36.1k
}
qcompositionfunctions.cpp:void comp_func_Lighten_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
2501
37.4k
{
2502
2.20M
    for (int i = 0; i < length; ++i) {
2503
2.17M
        QRgba64 d = dest[i];
2504
2.17M
        QRgba64 s = src[i];
2505
2506
2.17M
        uint da = d.alpha();
2507
2.17M
        uint sa = s.alpha();
2508
2509
2.17M
#define OP(a, b) lighten_op_rgb64(a, b, da, sa)
2510
2.17M
        uint r = OP(  d.red(),   s.red());
2511
2.17M
        uint b = OP( d.blue(),  s.blue());
2512
2.17M
        uint g = OP(d.green(), s.green());
2513
2.17M
        uint a = mix_alpha_rgb64(da, sa);
2514
2.17M
#undef OP
2515
2516
2.17M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2517
2.17M
    }
2518
37.4k
}
2519
2520
void QT_FASTCALL comp_func_Lighten_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
2521
73.5k
{
2522
73.5k
    if (const_alpha == 255)
2523
36.1k
        comp_func_Lighten_impl(dest, src, length, QFullCoverage());
2524
37.4k
    else
2525
37.4k
        comp_func_Lighten_impl(dest, src, length, QPartialCoverage(const_alpha));
2526
73.5k
}
2527
#endif
2528
2529
#if QT_CONFIG(raster_fp)
2530
template <typename T>
2531
static inline void comp_func_Lighten_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
2532
0
{
2533
0
    for (int i = 0; i < length; ++i) {
2534
0
        QRgbaFloat32 d = dest[i];
2535
0
        QRgbaFloat32 s = src[i];
2536
2537
0
        float da = d.alpha();
2538
0
        float sa = s.alpha();
2539
2540
0
#define OP(a, b) lighten_op_rgbafp(a, b, da, sa)
2541
0
        float r = OP(  d.red(),   s.red());
2542
0
        float b = OP( d.blue(),  s.blue());
2543
0
        float g = OP(d.green(), s.green());
2544
0
        float a = mix_alpha_rgbafp(da, sa);
2545
0
#undef OP
2546
2547
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2548
0
    }
2549
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Lighten_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Lighten_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
2550
2551
void QT_FASTCALL comp_func_Lighten_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
2552
0
{
2553
0
    if (const_alpha == 255)
2554
0
        comp_func_Lighten_impl(dest, src, length, QFullCoverage());
2555
0
    else
2556
0
        comp_func_Lighten_impl(dest, src, length, QPartialCoverage(const_alpha));
2557
0
}
2558
#endif
2559
2560
/*
2561
   if Sca.Da + Dca.Sa > Sa.Da
2562
       Dca' = Sa.Da + Sca.(1 - Da) + Dca.(1 - Sa)
2563
   else if Sca == Sa
2564
       Dca' = Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa)
2565
   otherwise
2566
       Dca' = Dca.Sa/(1-Sca/Sa) + Sca.(1 - Da) + Dca.(1 - Sa)
2567
*/
2568
static inline int color_dodge_op(int dst, int src, int da, int sa)
2569
25.3M
{
2570
25.3M
    const int sa_da = sa * da;
2571
25.3M
    const int dst_sa = dst * sa;
2572
25.3M
    const int src_da = src * da;
2573
2574
25.3M
    const int temp = src * (255 - da) + dst * (255 - sa);
2575
25.3M
    if (src_da + dst_sa > sa_da)
2576
304k
        return qt_div_255(sa_da + temp);
2577
25.0M
    else if (src == sa || sa == 0)
2578
620k
        return qt_div_255(temp);
2579
24.4M
    else
2580
24.4M
        return qt_div_255(255 * dst_sa / (255 - 255 * src / sa) + temp);
2581
25.3M
}
2582
2583
template <typename T>
2584
static inline void comp_func_solid_ColorDodge_impl(uint *dest, int length, uint color, const T &coverage)
2585
0
{
2586
0
    int sa = qAlpha(color);
2587
0
    int sr = qRed(color);
2588
0
    int sg = qGreen(color);
2589
0
    int sb = qBlue(color);
2590
2591
0
    for (int i = 0; i < length; ++i) {
2592
0
        uint d = dest[i];
2593
0
        int da = qAlpha(d);
2594
2595
0
#define OP(a,b) color_dodge_op(a, b, da, sa)
2596
0
        int r = OP(  qRed(d), sr);
2597
0
        int b = OP( qBlue(d), sb);
2598
0
        int g = OP(qGreen(d), sg);
2599
0
        int a = mix_alpha(da, sa);
2600
0
#undef OP
2601
2602
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
2603
0
    }
2604
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorDodge_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorDodge_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
2605
2606
void QT_FASTCALL comp_func_solid_ColorDodge(uint *dest, int length, uint color, uint const_alpha)
2607
0
{
2608
0
    if (const_alpha == 255)
2609
0
        comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage());
2610
0
    else
2611
0
        comp_func_solid_ColorDodge_impl(dest, length, color, QPartialCoverage(const_alpha));
2612
0
}
2613
2614
#if QT_CONFIG(raster_64bit)
2615
static inline uint color_dodge_op_rgb64(qint64 dst, qint64 src, qint64 da, qint64 sa)
2616
9.20M
{
2617
9.20M
    const qint64 sa_da = sa * da;
2618
9.20M
    const qint64 dst_sa = dst * sa;
2619
9.20M
    const qint64 src_da = src * da;
2620
2621
9.20M
    const qint64 temp = src * (65535U - da) + dst * (65535U - sa);
2622
9.20M
    if (src_da + dst_sa > sa_da)
2623
1.72M
        return qt_div_65535(sa_da + temp);
2624
7.48M
    else if (src == sa || sa == 0)
2625
3.86M
        return qt_div_65535(temp);
2626
3.61M
    else
2627
3.61M
        return qt_div_65535(65535U * dst_sa / (65535U - 65535U * src / sa) + temp);
2628
9.20M
}
2629
2630
template <typename T>
2631
static inline void comp_func_solid_ColorDodge_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
2632
0
{
2633
0
    uint sa = color.alpha();
2634
0
    uint sr = color.red();
2635
0
    uint sg = color.green();
2636
0
    uint sb = color.blue();
2637
2638
0
    for (int i = 0; i < length; ++i) {
2639
0
        QRgba64 d = dest[i];
2640
0
        uint da = d.alpha();
2641
2642
0
#define OP(a,b) color_dodge_op_rgb64(a, b, da, sa)
2643
0
        uint r = OP(  d.red(), sr);
2644
0
        uint b = OP( d.blue(), sb);
2645
0
        uint g = OP(d.green(), sg);
2646
0
        uint a = mix_alpha_rgb64(da, sa);
2647
0
#undef OP
2648
2649
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2650
0
    }
2651
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorDodge_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorDodge_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
2652
2653
void QT_FASTCALL comp_func_solid_ColorDodge_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
2654
0
{
2655
0
    if (const_alpha == 255)
2656
0
        comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage());
2657
0
    else
2658
0
        comp_func_solid_ColorDodge_impl(dest, length, color, QPartialCoverage(const_alpha));
2659
0
}
2660
#endif
2661
2662
#if QT_CONFIG(raster_fp)
2663
static inline float color_dodge_op_rgbafp(float dst, float src, float da, float sa)
2664
0
{
2665
0
    const float sa_da = sa * da;
2666
0
    const float dst_sa = dst * sa;
2667
0
    const float src_da = src * da;
2668
2669
0
    const float temp = src * (1.0f - da) + dst * (1.0f - sa);
2670
0
    if (src_da + dst_sa > sa_da)
2671
0
        return sa_da + temp;
2672
0
    else if (src == sa || sa == 0.0f)
2673
0
        return temp;
2674
0
    else
2675
0
        return dst_sa / (1.0f - src / sa) + temp;
2676
0
}
2677
2678
template <typename T>
2679
static inline void comp_func_solid_ColorDodge_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
2680
0
{
2681
0
    float sa = color.alpha();
2682
0
    float sr = color.red();
2683
0
    float sg = color.green();
2684
0
    float sb = color.blue();
2685
2686
0
    for (int i = 0; i < length; ++i) {
2687
0
        QRgbaFloat32 d = dest[i];
2688
0
        float da = d.alpha();
2689
2690
0
#define OP(a,b) color_dodge_op_rgbafp(a, b, da, sa)
2691
0
        float r = OP(  d.red(), sr);
2692
0
        float b = OP( d.blue(), sb);
2693
0
        float g = OP(d.green(), sg);
2694
0
        float a = mix_alpha_rgbafp(da, sa);
2695
0
#undef OP
2696
2697
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2698
0
    }
2699
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorDodge_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorDodge_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
2700
2701
void QT_FASTCALL comp_func_solid_ColorDodge_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
2702
0
{
2703
0
    if (const_alpha == 255)
2704
0
        comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage());
2705
0
    else
2706
0
        comp_func_solid_ColorDodge_impl(dest, length, color, QPartialCoverage(const_alpha));
2707
0
}
2708
#endif
2709
2710
template <typename T>
2711
static inline void comp_func_ColorDodge_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
2712
513k
{
2713
8.96M
    for (int i = 0; i < length; ++i) {
2714
8.45M
        uint d = dest[i];
2715
8.45M
        uint s = src[i];
2716
2717
8.45M
        int da = qAlpha(d);
2718
8.45M
        int sa = qAlpha(s);
2719
2720
25.3M
#define OP(a, b) color_dodge_op(a, b, da, sa)
2721
8.45M
        int r = OP(  qRed(d),   qRed(s));
2722
8.45M
        int b = OP( qBlue(d),  qBlue(s));
2723
8.45M
        int g = OP(qGreen(d), qGreen(s));
2724
8.45M
        int a = mix_alpha(da, sa);
2725
8.45M
#undef OP
2726
2727
8.45M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2728
8.45M
    }
2729
513k
}
qcompositionfunctions.cpp:void comp_func_ColorDodge_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
2712
506k
{
2713
8.63M
    for (int i = 0; i < length; ++i) {
2714
8.13M
        uint d = dest[i];
2715
8.13M
        uint s = src[i];
2716
2717
8.13M
        int da = qAlpha(d);
2718
8.13M
        int sa = qAlpha(s);
2719
2720
8.13M
#define OP(a, b) color_dodge_op(a, b, da, sa)
2721
8.13M
        int r = OP(  qRed(d),   qRed(s));
2722
8.13M
        int b = OP( qBlue(d),  qBlue(s));
2723
8.13M
        int g = OP(qGreen(d), qGreen(s));
2724
8.13M
        int a = mix_alpha(da, sa);
2725
8.13M
#undef OP
2726
2727
8.13M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2728
8.13M
    }
2729
506k
}
qcompositionfunctions.cpp:void comp_func_ColorDodge_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
2712
6.53k
{
2713
328k
    for (int i = 0; i < length; ++i) {
2714
322k
        uint d = dest[i];
2715
322k
        uint s = src[i];
2716
2717
322k
        int da = qAlpha(d);
2718
322k
        int sa = qAlpha(s);
2719
2720
322k
#define OP(a, b) color_dodge_op(a, b, da, sa)
2721
322k
        int r = OP(  qRed(d),   qRed(s));
2722
322k
        int b = OP( qBlue(d),  qBlue(s));
2723
322k
        int g = OP(qGreen(d), qGreen(s));
2724
322k
        int a = mix_alpha(da, sa);
2725
322k
#undef OP
2726
2727
322k
        coverage.store(&dest[i], qRgba(r, g, b, a));
2728
322k
    }
2729
6.53k
}
2730
2731
void QT_FASTCALL comp_func_ColorDodge(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
2732
513k
{
2733
513k
    if (const_alpha == 255)
2734
506k
        comp_func_ColorDodge_impl(dest, src, length, QFullCoverage());
2735
6.53k
    else
2736
6.53k
        comp_func_ColorDodge_impl(dest, src, length, QPartialCoverage(const_alpha));
2737
513k
}
2738
2739
#if QT_CONFIG(raster_64bit)
2740
template <typename T>
2741
static inline void comp_func_ColorDodge_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
2742
54.6k
{
2743
3.12M
    for (int i = 0; i < length; ++i) {
2744
3.06M
        QRgba64 d = dest[i];
2745
3.06M
        QRgba64 s = src[i];
2746
2747
3.06M
        uint da = d.alpha();
2748
3.06M
        uint sa = s.alpha();
2749
2750
9.20M
#define OP(a, b) color_dodge_op_rgb64(a, b, da, sa)
2751
3.06M
        uint r = OP(  d.red(),   s.red());
2752
3.06M
        uint b = OP( d.blue(),  s.blue());
2753
3.06M
        uint g = OP(d.green(), s.green());
2754
3.06M
        uint a = mix_alpha_rgb64(da, sa);
2755
3.06M
#undef OP
2756
2757
3.06M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2758
3.06M
    }
2759
54.6k
}
qcompositionfunctions.cpp:void comp_func_ColorDodge_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
2742
27.8k
{
2743
1.64M
    for (int i = 0; i < length; ++i) {
2744
1.62M
        QRgba64 d = dest[i];
2745
1.62M
        QRgba64 s = src[i];
2746
2747
1.62M
        uint da = d.alpha();
2748
1.62M
        uint sa = s.alpha();
2749
2750
1.62M
#define OP(a, b) color_dodge_op_rgb64(a, b, da, sa)
2751
1.62M
        uint r = OP(  d.red(),   s.red());
2752
1.62M
        uint b = OP( d.blue(),  s.blue());
2753
1.62M
        uint g = OP(d.green(), s.green());
2754
1.62M
        uint a = mix_alpha_rgb64(da, sa);
2755
1.62M
#undef OP
2756
2757
1.62M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2758
1.62M
    }
2759
27.8k
}
qcompositionfunctions.cpp:void comp_func_ColorDodge_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
2742
26.7k
{
2743
1.47M
    for (int i = 0; i < length; ++i) {
2744
1.44M
        QRgba64 d = dest[i];
2745
1.44M
        QRgba64 s = src[i];
2746
2747
1.44M
        uint da = d.alpha();
2748
1.44M
        uint sa = s.alpha();
2749
2750
1.44M
#define OP(a, b) color_dodge_op_rgb64(a, b, da, sa)
2751
1.44M
        uint r = OP(  d.red(),   s.red());
2752
1.44M
        uint b = OP( d.blue(),  s.blue());
2753
1.44M
        uint g = OP(d.green(), s.green());
2754
1.44M
        uint a = mix_alpha_rgb64(da, sa);
2755
1.44M
#undef OP
2756
2757
1.44M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2758
1.44M
    }
2759
26.7k
}
2760
2761
void QT_FASTCALL comp_func_ColorDodge_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
2762
54.6k
{
2763
54.6k
    if (const_alpha == 255)
2764
27.8k
        comp_func_ColorDodge_impl(dest, src, length, QFullCoverage());
2765
26.7k
    else
2766
26.7k
        comp_func_ColorDodge_impl(dest, src, length, QPartialCoverage(const_alpha));
2767
54.6k
}
2768
#endif
2769
2770
#if QT_CONFIG(raster_fp)
2771
template <typename T>
2772
static inline void comp_func_ColorDodge_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
2773
0
{
2774
0
    for (int i = 0; i < length; ++i) {
2775
0
        QRgbaFloat32 d = dest[i];
2776
0
        QRgbaFloat32 s = src[i];
2777
2778
0
        float da = d.alpha();
2779
0
        float sa = s.alpha();
2780
2781
0
#define OP(a, b) color_dodge_op_rgbafp(a, b, da, sa)
2782
0
        float r = OP(  d.red(),   s.red());
2783
0
        float b = OP( d.blue(),  s.blue());
2784
0
        float g = OP(d.green(), s.green());
2785
0
        float a = mix_alpha_rgbafp(da, sa);
2786
0
#undef OP
2787
2788
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2789
0
    }
2790
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_ColorDodge_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_ColorDodge_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
2791
2792
void QT_FASTCALL comp_func_ColorDodge_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
2793
0
{
2794
0
    if (const_alpha == 255)
2795
0
        comp_func_ColorDodge_impl(dest, src, length, QFullCoverage());
2796
0
    else
2797
0
        comp_func_ColorDodge_impl(dest, src, length, QPartialCoverage(const_alpha));
2798
0
}
2799
#endif
2800
2801
/*
2802
   if Sca.Da + Dca.Sa < Sa.Da
2803
       Dca' = Sca.(1 - Da) + Dca.(1 - Sa)
2804
   else if Sca == 0
2805
       Dca' = Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa)
2806
   otherwise
2807
       Dca' = Sa.(Sca.Da + Dca.Sa - Sa.Da)/Sca + Sca.(1 - Da) + Dca.(1 - Sa)
2808
*/
2809
static inline int color_burn_op(int dst, int src, int da, int sa)
2810
18.3M
{
2811
18.3M
    const int src_da = src * da;
2812
18.3M
    const int dst_sa = dst * sa;
2813
18.3M
    const int sa_da = sa * da;
2814
2815
18.3M
    const int temp = src * (255 - da) + dst * (255 - sa);
2816
2817
18.3M
    if (src_da + dst_sa < sa_da)
2818
15.2M
        return qt_div_255(temp);
2819
3.12M
    else if (src == 0)
2820
1.64M
        return qt_div_255(dst_sa + temp);
2821
1.47M
    return qt_div_255(sa * (src_da + dst_sa - sa_da) / src + temp);
2822
18.3M
}
2823
2824
template <typename T>
2825
static inline void comp_func_solid_ColorBurn_impl(uint *dest, int length, uint color, const T &coverage)
2826
0
{
2827
0
    int sa = qAlpha(color);
2828
0
    int sr = qRed(color);
2829
0
    int sg = qGreen(color);
2830
0
    int sb = qBlue(color);
2831
2832
0
    for (int i = 0; i < length; ++i) {
2833
0
        uint d = dest[i];
2834
0
        int da = qAlpha(d);
2835
2836
0
#define OP(a, b) color_burn_op(a, b, da, sa)
2837
0
        int r =  OP(  qRed(d), sr);
2838
0
        int b =  OP( qBlue(d), sb);
2839
0
        int g =  OP(qGreen(d), sg);
2840
0
        int a = mix_alpha(da, sa);
2841
0
#undef OP
2842
2843
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
2844
0
    }
2845
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorBurn_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorBurn_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
2846
2847
void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha)
2848
0
{
2849
0
    if (const_alpha == 255)
2850
0
        comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage());
2851
0
    else
2852
0
        comp_func_solid_ColorBurn_impl(dest, length, color, QPartialCoverage(const_alpha));
2853
0
}
2854
2855
#if QT_CONFIG(raster_64bit)
2856
static inline uint color_burn_op_rgb64(qint64 dst, qint64 src, qint64 da, qint64 sa)
2857
7.26M
{
2858
7.26M
    const qint64 src_da = src * da;
2859
7.26M
    const qint64 dst_sa = dst * sa;
2860
7.26M
    const qint64 sa_da = sa * da;
2861
2862
7.26M
    const qint64 temp = src * (65535U - da) + dst * (65535U - sa);
2863
2864
7.26M
    if (src_da + dst_sa < sa_da)
2865
1.62M
        return qt_div_65535(temp);
2866
5.63M
    else if (src == 0)
2867
3.62M
        return qt_div_65535(dst_sa + temp);
2868
2.01M
    return qt_div_65535(sa * (src_da + dst_sa - sa_da) / src + temp);
2869
7.26M
}
2870
2871
template <typename T>
2872
static inline void comp_func_solid_ColorBurn_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
2873
0
{
2874
0
    uint sa = color.alpha();
2875
0
    uint sr = color.red();
2876
0
    uint sg = color.green();
2877
0
    uint sb = color.blue();
2878
2879
0
    for (int i = 0; i < length; ++i) {
2880
0
        QRgba64 d = dest[i];
2881
0
        uint da = d.alpha();
2882
2883
0
#define OP(a, b) color_burn_op_rgb64(a, b, da, sa)
2884
0
        uint r =  OP(  d.red(), sr);
2885
0
        uint b =  OP( d.blue(), sb);
2886
0
        uint g =  OP(d.green(), sg);
2887
0
        uint a = mix_alpha_rgb64(da, sa);
2888
0
#undef OP
2889
2890
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2891
0
    }
2892
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorBurn_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorBurn_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
2893
2894
void QT_FASTCALL comp_func_solid_ColorBurn_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
2895
0
{
2896
0
    if (const_alpha == 255)
2897
0
        comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage());
2898
0
    else
2899
0
        comp_func_solid_ColorBurn_impl(dest, length, color, QPartialCoverage(const_alpha));
2900
0
}
2901
#endif
2902
2903
#if QT_CONFIG(raster_fp)
2904
static inline float color_burn_op_rgbafp(float dst, float src, float da, float sa)
2905
0
{
2906
0
    const float src_da = src * da;
2907
0
    const float dst_sa = dst * sa;
2908
0
    const float sa_da = sa * da;
2909
2910
0
    const float temp = src * (1.0f - da) + dst * (1.0f - sa);
2911
2912
0
    if (src_da + dst_sa < sa_da)
2913
0
        return temp;
2914
0
    else if (src == 0)
2915
0
        return dst_sa + temp;
2916
0
    return sa * (src_da + dst_sa - sa_da) / src + temp;
2917
0
}
2918
2919
template <typename T>
2920
static inline void comp_func_solid_ColorBurn_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
2921
0
{
2922
0
    float sa = color.alpha();
2923
0
    float sr = color.red();
2924
0
    float sg = color.green();
2925
0
    float sb = color.blue();
2926
2927
0
    for (int i = 0; i < length; ++i) {
2928
0
        QRgbaFloat32 d = dest[i];
2929
0
        float da = d.alpha();
2930
2931
0
#define OP(a, b) color_burn_op_rgbafp(a, b, da, sa)
2932
0
        float r =  OP(  d.red(), sr);
2933
0
        float b =  OP( d.blue(), sb);
2934
0
        float g =  OP(d.green(), sg);
2935
0
        float a = mix_alpha_rgbafp(da, sa);
2936
0
#undef OP
2937
2938
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
2939
0
    }
2940
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorBurn_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_ColorBurn_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
2941
2942
void QT_FASTCALL comp_func_solid_ColorBurn_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
2943
0
{
2944
0
    if (const_alpha == 255)
2945
0
        comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage());
2946
0
    else
2947
0
        comp_func_solid_ColorBurn_impl(dest, length, color, QPartialCoverage(const_alpha));
2948
0
}
2949
#endif
2950
2951
template <typename T>
2952
static inline void comp_func_ColorBurn_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
2953
101k
{
2954
6.22M
    for (int i = 0; i < length; ++i) {
2955
6.12M
        uint d = dest[i];
2956
6.12M
        uint s = src[i];
2957
2958
6.12M
        int da = qAlpha(d);
2959
6.12M
        int sa = qAlpha(s);
2960
2961
18.3M
#define OP(a, b) color_burn_op(a, b, da, sa)
2962
6.12M
        int r = OP(  qRed(d),   qRed(s));
2963
6.12M
        int b = OP( qBlue(d),  qBlue(s));
2964
6.12M
        int g = OP(qGreen(d), qGreen(s));
2965
6.12M
        int a = mix_alpha(da, sa);
2966
6.12M
#undef OP
2967
2968
6.12M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2969
6.12M
    }
2970
101k
}
qcompositionfunctions.cpp:void comp_func_ColorBurn_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
2953
89.0k
{
2954
5.60M
    for (int i = 0; i < length; ++i) {
2955
5.51M
        uint d = dest[i];
2956
5.51M
        uint s = src[i];
2957
2958
5.51M
        int da = qAlpha(d);
2959
5.51M
        int sa = qAlpha(s);
2960
2961
5.51M
#define OP(a, b) color_burn_op(a, b, da, sa)
2962
5.51M
        int r = OP(  qRed(d),   qRed(s));
2963
5.51M
        int b = OP( qBlue(d),  qBlue(s));
2964
5.51M
        int g = OP(qGreen(d), qGreen(s));
2965
5.51M
        int a = mix_alpha(da, sa);
2966
5.51M
#undef OP
2967
2968
5.51M
        coverage.store(&dest[i], qRgba(r, g, b, a));
2969
5.51M
    }
2970
89.0k
}
qcompositionfunctions.cpp:void comp_func_ColorBurn_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
2953
12.8k
{
2954
620k
    for (int i = 0; i < length; ++i) {
2955
607k
        uint d = dest[i];
2956
607k
        uint s = src[i];
2957
2958
607k
        int da = qAlpha(d);
2959
607k
        int sa = qAlpha(s);
2960
2961
607k
#define OP(a, b) color_burn_op(a, b, da, sa)
2962
607k
        int r = OP(  qRed(d),   qRed(s));
2963
607k
        int b = OP( qBlue(d),  qBlue(s));
2964
607k
        int g = OP(qGreen(d), qGreen(s));
2965
607k
        int a = mix_alpha(da, sa);
2966
607k
#undef OP
2967
2968
607k
        coverage.store(&dest[i], qRgba(r, g, b, a));
2969
607k
    }
2970
12.8k
}
2971
2972
void QT_FASTCALL comp_func_ColorBurn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
2973
101k
{
2974
101k
    if (const_alpha == 255)
2975
89.0k
        comp_func_ColorBurn_impl(dest, src, length, QFullCoverage());
2976
12.8k
    else
2977
12.8k
        comp_func_ColorBurn_impl(dest, src, length, QPartialCoverage(const_alpha));
2978
101k
}
2979
2980
#if QT_CONFIG(raster_64bit)
2981
template <typename T>
2982
static inline void comp_func_ColorBurn_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
2983
42.1k
{
2984
2.46M
    for (int i = 0; i < length; ++i) {
2985
2.42M
        QRgba64 d = dest[i];
2986
2.42M
        QRgba64 s = src[i];
2987
2988
2.42M
        uint da = d.alpha();
2989
2.42M
        uint sa = s.alpha();
2990
2991
7.26M
#define OP(a, b) color_burn_op_rgb64(a, b, da, sa)
2992
2.42M
        uint r = OP(  d.red(),   s.red());
2993
2.42M
        uint b = OP( d.blue(),  s.blue());
2994
2.42M
        uint g = OP(d.green(), s.green());
2995
2.42M
        uint a = mix_alpha_rgb64(da, sa);
2996
2.42M
#undef OP
2997
2998
2.42M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2999
2.42M
    }
3000
42.1k
}
qcompositionfunctions.cpp:void comp_func_ColorBurn_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
2983
12.1k
{
2984
716k
    for (int i = 0; i < length; ++i) {
2985
704k
        QRgba64 d = dest[i];
2986
704k
        QRgba64 s = src[i];
2987
2988
704k
        uint da = d.alpha();
2989
704k
        uint sa = s.alpha();
2990
2991
704k
#define OP(a, b) color_burn_op_rgb64(a, b, da, sa)
2992
704k
        uint r = OP(  d.red(),   s.red());
2993
704k
        uint b = OP( d.blue(),  s.blue());
2994
704k
        uint g = OP(d.green(), s.green());
2995
704k
        uint a = mix_alpha_rgb64(da, sa);
2996
704k
#undef OP
2997
2998
704k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2999
704k
    }
3000
12.1k
}
qcompositionfunctions.cpp:void comp_func_ColorBurn_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
2983
29.9k
{
2984
1.74M
    for (int i = 0; i < length; ++i) {
2985
1.71M
        QRgba64 d = dest[i];
2986
1.71M
        QRgba64 s = src[i];
2987
2988
1.71M
        uint da = d.alpha();
2989
1.71M
        uint sa = s.alpha();
2990
2991
1.71M
#define OP(a, b) color_burn_op_rgb64(a, b, da, sa)
2992
1.71M
        uint r = OP(  d.red(),   s.red());
2993
1.71M
        uint b = OP( d.blue(),  s.blue());
2994
1.71M
        uint g = OP(d.green(), s.green());
2995
1.71M
        uint a = mix_alpha_rgb64(da, sa);
2996
1.71M
#undef OP
2997
2998
1.71M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
2999
1.71M
    }
3000
29.9k
}
3001
3002
void QT_FASTCALL comp_func_ColorBurn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3003
42.1k
{
3004
42.1k
    if (const_alpha == 255)
3005
12.1k
        comp_func_ColorBurn_impl(dest, src, length, QFullCoverage());
3006
29.9k
    else
3007
29.9k
        comp_func_ColorBurn_impl(dest, src, length, QPartialCoverage(const_alpha));
3008
42.1k
}
3009
#endif
3010
3011
#if QT_CONFIG(raster_fp)
3012
template <typename T>
3013
static inline void comp_func_ColorBurn_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
3014
0
{
3015
0
    for (int i = 0; i < length; ++i) {
3016
0
        QRgbaFloat32 d = dest[i];
3017
0
        QRgbaFloat32 s = src[i];
3018
3019
0
        float da = d.alpha();
3020
0
        float sa = s.alpha();
3021
3022
0
#define OP(a, b) color_burn_op_rgbafp(a, b, da, sa)
3023
0
        float r = OP(  d.red(),   s.red());
3024
0
        float b = OP( d.blue(),  s.blue());
3025
0
        float g = OP(d.green(), s.green());
3026
0
        float a = mix_alpha_rgbafp(da, sa);
3027
0
#undef OP
3028
3029
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3030
0
    }
3031
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_ColorBurn_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_ColorBurn_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
3032
3033
void QT_FASTCALL comp_func_ColorBurn_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3034
0
{
3035
0
    if (const_alpha == 255)
3036
0
        comp_func_ColorBurn_impl(dest, src, length, QFullCoverage());
3037
0
    else
3038
0
        comp_func_ColorBurn_impl(dest, src, length, QPartialCoverage(const_alpha));
3039
0
}
3040
#endif
3041
3042
/*
3043
    if 2.Sca < Sa
3044
        Dca' = 2.Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa)
3045
    otherwise
3046
        Dca' = Sa.Da - 2.(Da - Dca).(Sa - Sca) + Sca.(1 - Da) + Dca.(1 - Sa)
3047
*/
3048
static inline uint hardlight_op(int dst, int src, int da, int sa)
3049
3.35M
{
3050
3.35M
    const uint temp = src * (255 - da) + dst * (255 - sa);
3051
3052
3.35M
    if (2 * src < sa)
3053
2.83M
        return qt_div_255(2 * src * dst + temp);
3054
522k
    else
3055
522k
        return qt_div_255(sa * da - 2 * (da - dst) * (sa - src) + temp);
3056
3.35M
}
3057
3058
template <typename T>
3059
static inline void comp_func_solid_HardLight_impl(uint *dest, int length, uint color, const T &coverage)
3060
0
{
3061
0
    int sa = qAlpha(color);
3062
0
    int sr = qRed(color);
3063
0
    int sg = qGreen(color);
3064
0
    int sb = qBlue(color);
3065
3066
0
    for (int i = 0; i < length; ++i) {
3067
0
        uint d = dest[i];
3068
0
        int da = qAlpha(d);
3069
3070
0
#define OP(a, b) hardlight_op(a, b, da, sa)
3071
0
        int r =  OP(  qRed(d), sr);
3072
0
        int b =  OP( qBlue(d), sb);
3073
0
        int g =  OP(qGreen(d), sg);
3074
0
        int a = mix_alpha(da, sa);
3075
0
#undef OP
3076
3077
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
3078
0
    }
3079
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_HardLight_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_HardLight_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
3080
3081
void QT_FASTCALL comp_func_solid_HardLight(uint *dest, int length, uint color, uint const_alpha)
3082
0
{
3083
0
    if (const_alpha == 255)
3084
0
        comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage());
3085
0
    else
3086
0
        comp_func_solid_HardLight_impl(dest, length, color, QPartialCoverage(const_alpha));
3087
0
}
3088
3089
#if QT_CONFIG(raster_64bit)
3090
static inline uint hardlight_op_rgb64(uint dst, uint src, uint da, uint sa)
3091
3.56M
{
3092
3.56M
    const uint temp = src * (65535U - da) + dst * (65535U - sa);
3093
3094
3.56M
    if (2 * src < sa)
3095
289k
        return qt_div_65535(2 * src * dst + temp);
3096
3.27M
    else
3097
3.27M
        return qt_div_65535(sa * da - 2 * (da - dst) * (sa - src) + temp);
3098
3.56M
}
3099
3100
template <typename T>
3101
static inline void comp_func_solid_HardLight_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
3102
0
{
3103
0
    uint sa = color.alpha();
3104
0
    uint sr = color.red();
3105
0
    uint sg = color.green();
3106
0
    uint sb = color.blue();
3107
3108
0
    for (int i = 0; i < length; ++i) {
3109
0
        QRgba64 d = dest[i];
3110
0
        uint da = d.alpha();
3111
3112
0
#define OP(a, b) hardlight_op_rgb64(a, b, da, sa)
3113
0
        uint r =  OP(  d.red(), sr);
3114
0
        uint b =  OP( d.blue(), sb);
3115
0
        uint g =  OP(d.green(), sg);
3116
0
        uint a = mix_alpha_rgb64(da, sa);
3117
0
#undef OP
3118
3119
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3120
0
    }
3121
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_HardLight_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_HardLight_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
3122
3123
void QT_FASTCALL comp_func_solid_HardLight_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
3124
0
{
3125
0
    if (const_alpha == 255)
3126
0
        comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage());
3127
0
    else
3128
0
        comp_func_solid_HardLight_impl(dest, length, color, QPartialCoverage(const_alpha));
3129
0
}
3130
#endif
3131
3132
#if QT_CONFIG(raster_fp)
3133
static inline float hardlight_op_rgbafp(float dst, float src, float da, float sa)
3134
0
{
3135
0
    const float temp = src * (1.0f - da) + dst * (1.0f - sa);
3136
3137
0
    if (2 * src < sa)
3138
0
        return 2 * src * dst + temp;
3139
0
    else
3140
0
        return sa * da - 2 * (da - dst) * (sa - src) + temp;
3141
0
}
3142
3143
template <typename T>
3144
static inline void comp_func_solid_HardLight_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
3145
0
{
3146
0
    float sa = color.alpha();
3147
0
    float sr = color.red();
3148
0
    float sg = color.green();
3149
0
    float sb = color.blue();
3150
3151
0
    for (int i = 0; i < length; ++i) {
3152
0
        QRgbaFloat32 d = dest[i];
3153
0
        float da = d.alpha();
3154
3155
0
#define OP(a, b) hardlight_op_rgbafp(a, b, da, sa)
3156
0
        float r =  OP(  d.red(), sr);
3157
0
        float b =  OP( d.blue(), sb);
3158
0
        float g =  OP(d.green(), sg);
3159
0
        float a = mix_alpha_rgbafp(da, sa);
3160
0
#undef OP
3161
3162
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3163
0
    }
3164
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_HardLight_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_HardLight_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
3165
3166
void QT_FASTCALL comp_func_solid_HardLight_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
3167
0
{
3168
0
    if (const_alpha == 255)
3169
0
        comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage());
3170
0
    else
3171
0
        comp_func_solid_HardLight_impl(dest, length, color, QPartialCoverage(const_alpha));
3172
0
}
3173
#endif
3174
3175
template <typename T>
3176
static inline void comp_func_HardLight_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
3177
19.7k
{
3178
1.13M
    for (int i = 0; i < length; ++i) {
3179
1.11M
        uint d = dest[i];
3180
1.11M
        uint s = src[i];
3181
3182
1.11M
        int da = qAlpha(d);
3183
1.11M
        int sa = qAlpha(s);
3184
3185
3.35M
#define OP(a, b) hardlight_op(a, b, da, sa)
3186
1.11M
        int r = OP(  qRed(d),   qRed(s));
3187
1.11M
        int b = OP( qBlue(d),  qBlue(s));
3188
1.11M
        int g = OP(qGreen(d), qGreen(s));
3189
1.11M
        int a = mix_alpha(da, sa);
3190
1.11M
#undef OP
3191
3192
1.11M
        coverage.store(&dest[i], qRgba(r, g, b, a));
3193
1.11M
    }
3194
19.7k
}
qcompositionfunctions.cpp:void comp_func_HardLight_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
3177
14.6k
{
3178
914k
    for (int i = 0; i < length; ++i) {
3179
899k
        uint d = dest[i];
3180
899k
        uint s = src[i];
3181
3182
899k
        int da = qAlpha(d);
3183
899k
        int sa = qAlpha(s);
3184
3185
899k
#define OP(a, b) hardlight_op(a, b, da, sa)
3186
899k
        int r = OP(  qRed(d),   qRed(s));
3187
899k
        int b = OP( qBlue(d),  qBlue(s));
3188
899k
        int g = OP(qGreen(d), qGreen(s));
3189
899k
        int a = mix_alpha(da, sa);
3190
899k
#undef OP
3191
3192
899k
        coverage.store(&dest[i], qRgba(r, g, b, a));
3193
899k
    }
3194
14.6k
}
qcompositionfunctions.cpp:void comp_func_HardLight_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
3177
5.11k
{
3178
223k
    for (int i = 0; i < length; ++i) {
3179
218k
        uint d = dest[i];
3180
218k
        uint s = src[i];
3181
3182
218k
        int da = qAlpha(d);
3183
218k
        int sa = qAlpha(s);
3184
3185
218k
#define OP(a, b) hardlight_op(a, b, da, sa)
3186
218k
        int r = OP(  qRed(d),   qRed(s));
3187
218k
        int b = OP( qBlue(d),  qBlue(s));
3188
218k
        int g = OP(qGreen(d), qGreen(s));
3189
218k
        int a = mix_alpha(da, sa);
3190
218k
#undef OP
3191
3192
218k
        coverage.store(&dest[i], qRgba(r, g, b, a));
3193
218k
    }
3194
5.11k
}
3195
3196
void QT_FASTCALL comp_func_HardLight(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
3197
19.7k
{
3198
19.7k
    if (const_alpha == 255)
3199
14.6k
        comp_func_HardLight_impl(dest, src, length, QFullCoverage());
3200
5.11k
    else
3201
5.11k
        comp_func_HardLight_impl(dest, src, length, QPartialCoverage(const_alpha));
3202
19.7k
}
3203
3204
#if QT_CONFIG(raster_64bit)
3205
template <typename T>
3206
static inline void comp_func_HardLight_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
3207
20.3k
{
3208
1.20M
    for (int i = 0; i < length; ++i) {
3209
1.18M
        QRgba64 d = dest[i];
3210
1.18M
        QRgba64 s = src[i];
3211
3212
1.18M
        uint da = d.alpha();
3213
1.18M
        uint sa = s.alpha();
3214
3215
3.56M
#define OP(a, b) hardlight_op_rgb64(a, b, da, sa)
3216
1.18M
        uint r = OP(  d.red(),   s.red());
3217
1.18M
        uint b = OP( d.blue(),  s.blue());
3218
1.18M
        uint g = OP(d.green(), s.green());
3219
1.18M
        uint a = mix_alpha_rgb64(da, sa);
3220
1.18M
#undef OP
3221
3222
1.18M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3223
1.18M
    }
3224
20.3k
}
qcompositionfunctions.cpp:void comp_func_HardLight_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
3207
8.62k
{
3208
496k
    for (int i = 0; i < length; ++i) {
3209
487k
        QRgba64 d = dest[i];
3210
487k
        QRgba64 s = src[i];
3211
3212
487k
        uint da = d.alpha();
3213
487k
        uint sa = s.alpha();
3214
3215
487k
#define OP(a, b) hardlight_op_rgb64(a, b, da, sa)
3216
487k
        uint r = OP(  d.red(),   s.red());
3217
487k
        uint b = OP( d.blue(),  s.blue());
3218
487k
        uint g = OP(d.green(), s.green());
3219
487k
        uint a = mix_alpha_rgb64(da, sa);
3220
487k
#undef OP
3221
3222
487k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3223
487k
    }
3224
8.62k
}
qcompositionfunctions.cpp:void comp_func_HardLight_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
3207
11.6k
{
3208
711k
    for (int i = 0; i < length; ++i) {
3209
699k
        QRgba64 d = dest[i];
3210
699k
        QRgba64 s = src[i];
3211
3212
699k
        uint da = d.alpha();
3213
699k
        uint sa = s.alpha();
3214
3215
699k
#define OP(a, b) hardlight_op_rgb64(a, b, da, sa)
3216
699k
        uint r = OP(  d.red(),   s.red());
3217
699k
        uint b = OP( d.blue(),  s.blue());
3218
699k
        uint g = OP(d.green(), s.green());
3219
699k
        uint a = mix_alpha_rgb64(da, sa);
3220
699k
#undef OP
3221
3222
699k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3223
699k
    }
3224
11.6k
}
3225
3226
void QT_FASTCALL comp_func_HardLight_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3227
20.3k
{
3228
20.3k
    if (const_alpha == 255)
3229
8.62k
        comp_func_HardLight_impl(dest, src, length, QFullCoverage());
3230
11.6k
    else
3231
11.6k
        comp_func_HardLight_impl(dest, src, length, QPartialCoverage(const_alpha));
3232
20.3k
}
3233
#endif
3234
3235
#if QT_CONFIG(raster_fp)
3236
template <typename T>
3237
static inline void comp_func_HardLight_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
3238
0
{
3239
0
    for (int i = 0; i < length; ++i) {
3240
0
        QRgbaFloat32 d = dest[i];
3241
0
        QRgbaFloat32 s = src[i];
3242
3243
0
        float da = d.alpha();
3244
0
        float sa = s.alpha();
3245
3246
0
#define OP(a, b) hardlight_op_rgbafp(a, b, da, sa)
3247
0
        float r = OP(  d.red(),   s.red());
3248
0
        float b = OP( d.blue(),  s.blue());
3249
0
        float g = OP(d.green(), s.green());
3250
0
        float a = mix_alpha_rgbafp(da, sa);
3251
0
#undef OP
3252
3253
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3254
0
    }
3255
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_HardLight_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_HardLight_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
3256
3257
void QT_FASTCALL comp_func_HardLight_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3258
0
{
3259
0
    if (const_alpha == 255)
3260
0
        comp_func_HardLight_impl(dest, src, length, QFullCoverage());
3261
0
    else
3262
0
        comp_func_HardLight_impl(dest, src, length, QPartialCoverage(const_alpha));
3263
0
}
3264
#endif
3265
3266
/*
3267
    if 2.Sca <= Sa
3268
        Dca' = Dca.(Sa + (2.Sca - Sa).(1 - Dca/Da)) + Sca.(1 - Da) + Dca.(1 - Sa)
3269
    otherwise if 2.Sca > Sa and 4.Dca <= Da
3270
        Dca' = Dca.Sa + Da.(2.Sca - Sa).(4.Dca/Da.(4.Dca/Da + 1).(Dca/Da - 1) + 7.Dca/Da) + Sca.(1 - Da) + Dca.(1 - Sa)
3271
    otherwise if 2.Sca > Sa and 4.Dca > Da
3272
        Dca' = Dca.Sa + Da.(2.Sca - Sa).((Dca/Da)^0.5 - Dca/Da) + Sca.(1 - Da) + Dca.(1 - Sa)
3273
*/
3274
static inline int soft_light_op(int dst, int src, int da, int sa)
3275
2.06M
{
3276
2.06M
    const int src2 = src << 1;
3277
2.06M
    const int dst_np = da != 0 ? (255 * dst) / da : 0;
3278
2.06M
    const int temp = (src * (255 - da) + dst * (255 - sa)) * 255;
3279
3280
2.06M
    if (src2 < sa)
3281
1.46M
        return (dst * (sa * 255 + (src2 - sa) * (255 - dst_np)) + temp) / 65025;
3282
602k
    else if (4 * dst <= da)
3283
202k
        return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025;
3284
399k
    else {
3285
399k
        return (dst * sa * 255 + da * (src2 - sa) * (int(qSqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025;
3286
399k
    }
3287
2.06M
}
3288
3289
template <typename T>
3290
static inline void comp_func_solid_SoftLight_impl(uint *dest, int length, uint color, const T &coverage)
3291
0
{
3292
0
    int sa = qAlpha(color);
3293
0
    int sr = qRed(color);
3294
0
    int sg = qGreen(color);
3295
0
    int sb = qBlue(color);
3296
3297
0
    for (int i = 0; i < length; ++i) {
3298
0
        uint d = dest[i];
3299
0
        int da = qAlpha(d);
3300
3301
0
#define OP(a, b) soft_light_op(a, b, da, sa)
3302
0
        int r =  OP(  qRed(d), sr);
3303
0
        int b =  OP( qBlue(d), sb);
3304
0
        int g =  OP(qGreen(d), sg);
3305
0
        int a = mix_alpha(da, sa);
3306
0
#undef OP
3307
3308
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
3309
0
    }
3310
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SoftLight_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SoftLight_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
3311
3312
void QT_FASTCALL comp_func_solid_SoftLight(uint *dest, int length, uint color, uint const_alpha)
3313
0
{
3314
0
    if (const_alpha == 255)
3315
0
        comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage());
3316
0
    else
3317
0
        comp_func_solid_SoftLight_impl(dest, length, color, QPartialCoverage(const_alpha));
3318
0
}
3319
3320
#if QT_CONFIG(raster_64bit)
3321
static inline uint soft_light_op_rgb64(qint64 dst, qint64 src, qint64 da, qint64 sa)
3322
24.5M
{
3323
24.5M
    const qint64 src2 = src << 1;
3324
24.5M
    const qint64 dst_np = da != 0 ? (65535U * dst) / da : 0;
3325
24.5M
    const qint64 temp = (src * (65535U - da) + dst * (65535U - sa)) * 65535U;
3326
24.5M
    const qint64 factor = Q_UINT64_C(65535) * 65535U;
3327
3328
24.5M
    if (src2 < sa)
3329
1.92M
        return (dst * (sa * 65535U + (src2 - sa) * (65535U - dst_np)) + temp) / factor;
3330
22.6M
    else if (4 * dst <= da)
3331
21.9M
        return (dst * sa * 65535U + da * (src2 - sa) * ((((16 * dst_np - 12 * 65535U) * dst_np + 3 * factor) * dst_np) / factor) + temp) / factor;
3332
702k
    else {
3333
702k
        return (dst * sa * 65535U + da * (src2 - sa) * (int(qSqrt(qreal(dst_np * 65535U))) - dst_np) + temp) / factor;
3334
702k
    }
3335
24.5M
}
3336
3337
template <typename T>
3338
static inline void comp_func_solid_SoftLight_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
3339
0
{
3340
0
    uint sa = color.alpha();
3341
0
    uint sr = color.red();
3342
0
    uint sg = color.green();
3343
0
    uint sb = color.blue();
3344
3345
0
    for (int i = 0; i < length; ++i) {
3346
0
        QRgba64 d = dest[i];
3347
0
        uint da = d.alpha();
3348
3349
0
#define OP(a, b) soft_light_op_rgb64(a, b, da, sa)
3350
0
        uint r =  OP(  d.red(), sr);
3351
0
        uint b =  OP( d.blue(), sb);
3352
0
        uint g =  OP(d.green(), sg);
3353
0
        uint a = mix_alpha_rgb64(da, sa);
3354
0
#undef OP
3355
3356
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3357
0
    }
3358
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SoftLight_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SoftLight_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
3359
3360
void QT_FASTCALL comp_func_solid_SoftLight_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
3361
0
{
3362
0
    if (const_alpha == 255)
3363
0
        comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage());
3364
0
    else
3365
0
        comp_func_solid_SoftLight_impl(dest, length, color, QPartialCoverage(const_alpha));
3366
0
}
3367
3368
#endif
3369
3370
#if QT_CONFIG(raster_fp)
3371
static inline float soft_light_op_rgbafp(float dst, float src, float da, float sa)
3372
0
{
3373
0
    const float src2 = src * 2;
3374
0
    const float dst_np = da != 0.0f ? (dst / da) : 0.0f;
3375
0
    const float temp = src * (1.0f - da) + dst * (1.0f - sa);
3376
3377
0
    if (src2 < sa)
3378
0
        return dst * (sa + (src2 - sa) * (1.0f - dst_np)) + temp;
3379
0
    else if (4 * dst <= da)
3380
0
        return dst * sa + da * (src2 - sa) * (((16 * dst_np - 12) * dst_np + 3) * dst_np) + temp;
3381
0
    else {
3382
0
        return dst * sa + da * (src2 - sa) * (qSqrt(qreal(dst_np)) - dst_np) + temp;
3383
0
    }
3384
0
}
3385
3386
template <typename T>
3387
static inline void comp_func_solid_SoftLight_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
3388
0
{
3389
0
    float sa = color.alpha();
3390
0
    float sr = color.red();
3391
0
    float sg = color.green();
3392
0
    float sb = color.blue();
3393
3394
0
    for (int i = 0; i < length; ++i) {
3395
0
        QRgbaFloat32 d = dest[i];
3396
0
        float da = d.alpha();
3397
3398
0
#define OP(a, b) soft_light_op_rgbafp(a, b, da, sa)
3399
0
        float r =  OP(  d.red(), sr);
3400
0
        float b =  OP( d.blue(), sb);
3401
0
        float g =  OP(d.green(), sg);
3402
0
        float a = mix_alpha_rgbafp(da, sa);
3403
0
#undef OP
3404
3405
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3406
0
    }
3407
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SoftLight_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_SoftLight_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
3408
3409
void QT_FASTCALL comp_func_solid_SoftLight_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
3410
0
{
3411
0
    if (const_alpha == 255)
3412
0
        comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage());
3413
0
    else
3414
0
        comp_func_solid_SoftLight_impl(dest, length, color, QPartialCoverage(const_alpha));
3415
0
}
3416
#endif
3417
3418
template <typename T>
3419
static inline void comp_func_SoftLight_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
3420
11.9k
{
3421
699k
    for (int i = 0; i < length; ++i) {
3422
687k
        uint d = dest[i];
3423
687k
        uint s = src[i];
3424
3425
687k
        int da = qAlpha(d);
3426
687k
        int sa = qAlpha(s);
3427
3428
2.06M
#define OP(a, b) soft_light_op(a, b, da, sa)
3429
687k
        int r = OP(  qRed(d),   qRed(s));
3430
687k
        int b = OP( qBlue(d),  qBlue(s));
3431
687k
        int g = OP(qGreen(d), qGreen(s));
3432
687k
        int a = mix_alpha(da, sa);
3433
687k
#undef OP
3434
3435
687k
        coverage.store(&dest[i], qRgba(r, g, b, a));
3436
687k
    }
3437
11.9k
}
qcompositionfunctions.cpp:void comp_func_SoftLight_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
3420
7.90k
{
3421
479k
    for (int i = 0; i < length; ++i) {
3422
471k
        uint d = dest[i];
3423
471k
        uint s = src[i];
3424
3425
471k
        int da = qAlpha(d);
3426
471k
        int sa = qAlpha(s);
3427
3428
471k
#define OP(a, b) soft_light_op(a, b, da, sa)
3429
471k
        int r = OP(  qRed(d),   qRed(s));
3430
471k
        int b = OP( qBlue(d),  qBlue(s));
3431
471k
        int g = OP(qGreen(d), qGreen(s));
3432
471k
        int a = mix_alpha(da, sa);
3433
471k
#undef OP
3434
3435
471k
        coverage.store(&dest[i], qRgba(r, g, b, a));
3436
471k
    }
3437
7.90k
}
qcompositionfunctions.cpp:void comp_func_SoftLight_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
3420
4.06k
{
3421
220k
    for (int i = 0; i < length; ++i) {
3422
216k
        uint d = dest[i];
3423
216k
        uint s = src[i];
3424
3425
216k
        int da = qAlpha(d);
3426
216k
        int sa = qAlpha(s);
3427
3428
216k
#define OP(a, b) soft_light_op(a, b, da, sa)
3429
216k
        int r = OP(  qRed(d),   qRed(s));
3430
216k
        int b = OP( qBlue(d),  qBlue(s));
3431
216k
        int g = OP(qGreen(d), qGreen(s));
3432
216k
        int a = mix_alpha(da, sa);
3433
216k
#undef OP
3434
3435
216k
        coverage.store(&dest[i], qRgba(r, g, b, a));
3436
216k
    }
3437
4.06k
}
3438
3439
void QT_FASTCALL comp_func_SoftLight(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
3440
11.9k
{
3441
11.9k
    if (const_alpha == 255)
3442
7.90k
        comp_func_SoftLight_impl(dest, src, length, QFullCoverage());
3443
4.06k
    else
3444
4.06k
        comp_func_SoftLight_impl(dest, src, length, QPartialCoverage(const_alpha));
3445
11.9k
}
3446
3447
#if QT_CONFIG(raster_64bit)
3448
template <typename T>
3449
static inline void comp_func_SoftLight_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
3450
131k
{
3451
8.31M
    for (int i = 0; i < length; ++i) {
3452
8.18M
        QRgba64 d = dest[i];
3453
8.18M
        QRgba64 s = src[i];
3454
3455
8.18M
        uint da = d.alpha();
3456
8.18M
        uint sa = s.alpha();
3457
3458
24.5M
#define OP(a, b) soft_light_op_rgb64(a, b, da, sa)
3459
8.18M
        uint r = OP(  d.red(),   s.red());
3460
8.18M
        uint b = OP( d.blue(),  s.blue());
3461
8.18M
        uint g = OP(d.green(), s.green());
3462
8.18M
        uint a = mix_alpha_rgb64(da, sa);
3463
8.18M
#undef OP
3464
3465
8.18M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3466
8.18M
    }
3467
131k
}
qcompositionfunctions.cpp:void comp_func_SoftLight_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
3450
121k
{
3451
7.73M
    for (int i = 0; i < length; ++i) {
3452
7.61M
        QRgba64 d = dest[i];
3453
7.61M
        QRgba64 s = src[i];
3454
3455
7.61M
        uint da = d.alpha();
3456
7.61M
        uint sa = s.alpha();
3457
3458
7.61M
#define OP(a, b) soft_light_op_rgb64(a, b, da, sa)
3459
7.61M
        uint r = OP(  d.red(),   s.red());
3460
7.61M
        uint b = OP( d.blue(),  s.blue());
3461
7.61M
        uint g = OP(d.green(), s.green());
3462
7.61M
        uint a = mix_alpha_rgb64(da, sa);
3463
7.61M
#undef OP
3464
3465
7.61M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3466
7.61M
    }
3467
121k
}
qcompositionfunctions.cpp:void comp_func_SoftLight_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
3450
10.2k
{
3451
576k
    for (int i = 0; i < length; ++i) {
3452
566k
        QRgba64 d = dest[i];
3453
566k
        QRgba64 s = src[i];
3454
3455
566k
        uint da = d.alpha();
3456
566k
        uint sa = s.alpha();
3457
3458
566k
#define OP(a, b) soft_light_op_rgb64(a, b, da, sa)
3459
566k
        uint r = OP(  d.red(),   s.red());
3460
566k
        uint b = OP( d.blue(),  s.blue());
3461
566k
        uint g = OP(d.green(), s.green());
3462
566k
        uint a = mix_alpha_rgb64(da, sa);
3463
566k
#undef OP
3464
3465
566k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3466
566k
    }
3467
10.2k
}
3468
3469
void QT_FASTCALL comp_func_SoftLight_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3470
131k
{
3471
131k
    if (const_alpha == 255)
3472
121k
        comp_func_SoftLight_impl(dest, src, length, QFullCoverage());
3473
10.2k
    else
3474
10.2k
        comp_func_SoftLight_impl(dest, src, length, QPartialCoverage(const_alpha));
3475
131k
}
3476
#endif
3477
3478
#if QT_CONFIG(raster_fp)
3479
template <typename T>
3480
static inline void comp_func_SoftLight_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
3481
0
{
3482
0
    for (int i = 0; i < length; ++i) {
3483
0
        QRgbaFloat32 d = dest[i];
3484
0
        QRgbaFloat32 s = src[i];
3485
3486
0
        float da = d.alpha();
3487
0
        float sa = s.alpha();
3488
3489
0
#define OP(a, b) soft_light_op_rgbafp(a, b, da, sa)
3490
0
        float r = OP(  d.red(),   s.red());
3491
0
        float b = OP( d.blue(),  s.blue());
3492
0
        float g = OP(d.green(), s.green());
3493
0
        float a = mix_alpha_rgbafp(da, sa);
3494
0
#undef OP
3495
3496
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3497
0
    }
3498
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SoftLight_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_SoftLight_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
3499
3500
void QT_FASTCALL comp_func_SoftLight_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3501
0
{
3502
0
    if (const_alpha == 255)
3503
0
        comp_func_SoftLight_impl(dest, src, length, QFullCoverage());
3504
0
    else
3505
0
        comp_func_SoftLight_impl(dest, src, length, QPartialCoverage(const_alpha));
3506
0
}
3507
#endif
3508
3509
/*
3510
   Dca' = abs(Dca.Sa - Sca.Da) + Sca.(1 - Da) + Dca.(1 - Sa)
3511
        = Sca + Dca - 2.min(Sca.Da, Dca.Sa)
3512
*/
3513
static inline int difference_op(int dst, int src, int da, int sa)
3514
10.8M
{
3515
10.8M
    return src + dst - qt_div_255(2 * qMin(src * da, dst * sa));
3516
10.8M
}
3517
3518
template <typename T>
3519
static inline void comp_func_solid_Difference_impl(uint *dest, int length, uint color, const T &coverage)
3520
0
{
3521
0
    int sa = qAlpha(color);
3522
0
    int sr = qRed(color);
3523
0
    int sg = qGreen(color);
3524
0
    int sb = qBlue(color);
3525
3526
0
    for (int i = 0; i < length; ++i) {
3527
0
        uint d = dest[i];
3528
0
        int da = qAlpha(d);
3529
3530
0
#define OP(a, b) difference_op(a, b, da, sa)
3531
0
        int r =  OP(  qRed(d), sr);
3532
0
        int b =  OP( qBlue(d), sb);
3533
0
        int g =  OP(qGreen(d), sg);
3534
0
        int a = mix_alpha(da, sa);
3535
0
#undef OP
3536
3537
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
3538
0
    }
3539
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Difference_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Difference_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
3540
3541
void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha)
3542
0
{
3543
0
    if (const_alpha == 255)
3544
0
        comp_func_solid_Difference_impl(dest, length, color, QFullCoverage());
3545
0
    else
3546
0
        comp_func_solid_Difference_impl(dest, length, color, QPartialCoverage(const_alpha));
3547
0
}
3548
3549
#if QT_CONFIG(raster_64bit)
3550
static inline uint difference_op_rgb64(qint64 dst, qint64 src, qint64 da, qint64 sa)
3551
13.3M
{
3552
13.3M
    return src + dst - qt_div_65535(2 * qMin(src * da, dst * sa));
3553
13.3M
}
3554
3555
template <typename T>
3556
static inline void comp_func_solid_Difference_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
3557
0
{
3558
0
    uint sa = color.alpha();
3559
0
    uint sr = color.red();
3560
0
    uint sg = color.green();
3561
0
    uint sb = color.blue();
3562
3563
0
    for (int i = 0; i < length; ++i) {
3564
0
        QRgba64 d = dest[i];
3565
0
        uint da = d.alpha();
3566
3567
0
#define OP(a, b) difference_op_rgb64(a, b, da, sa)
3568
0
        uint r =  OP(  d.red(), sr);
3569
0
        uint b =  OP( d.blue(), sb);
3570
0
        uint g =  OP(d.green(), sg);
3571
0
        uint a = mix_alpha_rgb64(da, sa);
3572
0
#undef OP
3573
3574
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3575
0
    }
3576
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Difference_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Difference_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
3577
3578
void QT_FASTCALL comp_func_solid_Difference_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
3579
0
{
3580
0
    if (const_alpha == 255)
3581
0
        comp_func_solid_Difference_impl(dest, length, color, QFullCoverage());
3582
0
    else
3583
0
        comp_func_solid_Difference_impl(dest, length, color, QPartialCoverage(const_alpha));
3584
0
}
3585
#endif
3586
3587
#if QT_CONFIG(raster_fp)
3588
static inline float difference_op_rgbafp(float dst, float src, float da, float sa)
3589
0
{
3590
0
    return src + dst - (2 * qMin(src * da, dst * sa));
3591
0
}
3592
3593
template <typename T>
3594
static inline void comp_func_solid_Difference_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
3595
0
{
3596
0
    float sa = color.alpha();
3597
0
    float sr = color.red();
3598
0
    float sg = color.green();
3599
0
    float sb = color.blue();
3600
3601
0
    for (int i = 0; i < length; ++i) {
3602
0
        QRgbaFloat32 d = dest[i];
3603
0
        float da = d.alpha();
3604
3605
0
#define OP(a, b) difference_op_rgbafp(a, b, da, sa)
3606
0
        float r =  OP(  d.red(), sr);
3607
0
        float b =  OP( d.blue(), sb);
3608
0
        float g =  OP(d.green(), sg);
3609
0
        float a = mix_alpha_rgbafp(da, sa);
3610
0
#undef OP
3611
3612
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3613
0
    }
3614
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Difference_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Difference_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
3615
3616
void QT_FASTCALL comp_func_solid_Difference_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
3617
0
{
3618
0
    if (const_alpha == 255)
3619
0
        comp_func_solid_Difference_impl(dest, length, color, QFullCoverage());
3620
0
    else
3621
0
        comp_func_solid_Difference_impl(dest, length, color, QPartialCoverage(const_alpha));
3622
0
}
3623
#endif
3624
3625
template <typename T>
3626
static inline void comp_func_Difference_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
3627
60.7k
{
3628
3.67M
    for (int i = 0; i < length; ++i) {
3629
3.61M
        uint d = dest[i];
3630
3.61M
        uint s = src[i];
3631
3632
3.61M
        int da = qAlpha(d);
3633
3.61M
        int sa = qAlpha(s);
3634
3635
10.8M
#define OP(a, b) difference_op(a, b, da, sa)
3636
3.61M
        int r = OP(  qRed(d),   qRed(s));
3637
3.61M
        int b = OP( qBlue(d),  qBlue(s));
3638
3.61M
        int g = OP(qGreen(d), qGreen(s));
3639
3.61M
        int a = mix_alpha(da, sa);
3640
3.61M
#undef OP
3641
3642
3.61M
        coverage.store(&dest[i], qRgba(r, g, b, a));
3643
3.61M
    }
3644
60.7k
}
qcompositionfunctions.cpp:void comp_func_Difference_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
3627
49.8k
{
3628
3.15M
    for (int i = 0; i < length; ++i) {
3629
3.10M
        uint d = dest[i];
3630
3.10M
        uint s = src[i];
3631
3632
3.10M
        int da = qAlpha(d);
3633
3.10M
        int sa = qAlpha(s);
3634
3635
3.10M
#define OP(a, b) difference_op(a, b, da, sa)
3636
3.10M
        int r = OP(  qRed(d),   qRed(s));
3637
3.10M
        int b = OP( qBlue(d),  qBlue(s));
3638
3.10M
        int g = OP(qGreen(d), qGreen(s));
3639
3.10M
        int a = mix_alpha(da, sa);
3640
3.10M
#undef OP
3641
3642
3.10M
        coverage.store(&dest[i], qRgba(r, g, b, a));
3643
3.10M
    }
3644
49.8k
}
qcompositionfunctions.cpp:void comp_func_Difference_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
3627
10.8k
{
3628
527k
    for (int i = 0; i < length; ++i) {
3629
516k
        uint d = dest[i];
3630
516k
        uint s = src[i];
3631
3632
516k
        int da = qAlpha(d);
3633
516k
        int sa = qAlpha(s);
3634
3635
516k
#define OP(a, b) difference_op(a, b, da, sa)
3636
516k
        int r = OP(  qRed(d),   qRed(s));
3637
516k
        int b = OP( qBlue(d),  qBlue(s));
3638
516k
        int g = OP(qGreen(d), qGreen(s));
3639
516k
        int a = mix_alpha(da, sa);
3640
516k
#undef OP
3641
3642
516k
        coverage.store(&dest[i], qRgba(r, g, b, a));
3643
516k
    }
3644
10.8k
}
3645
3646
void QT_FASTCALL comp_func_Difference(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
3647
60.7k
{
3648
60.7k
    if (const_alpha == 255)
3649
49.8k
        comp_func_Difference_impl(dest, src, length, QFullCoverage());
3650
10.8k
    else
3651
10.8k
        comp_func_Difference_impl(dest, src, length, QPartialCoverage(const_alpha));
3652
60.7k
}
3653
3654
#if QT_CONFIG(raster_64bit)
3655
template <typename T>
3656
static inline void comp_func_Difference_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
3657
76.7k
{
3658
4.51M
    for (int i = 0; i < length; ++i) {
3659
4.44M
        QRgba64 d = dest[i];
3660
4.44M
        QRgba64 s = src[i];
3661
3662
4.44M
        uint da = d.alpha();
3663
4.44M
        uint sa = s.alpha();
3664
3665
13.3M
#define OP(a, b) difference_op_rgb64(a, b, da, sa)
3666
4.44M
        uint r = OP(  d.red(),   s.red());
3667
4.44M
        uint b = OP( d.blue(),  s.blue());
3668
4.44M
        uint g = OP(d.green(), s.green());
3669
4.44M
        uint a = mix_alpha_rgb64(da, sa);
3670
4.44M
#undef OP
3671
3672
4.44M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3673
4.44M
    }
3674
76.7k
}
qcompositionfunctions.cpp:void comp_func_Difference_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
3657
37.6k
{
3658
2.20M
    for (int i = 0; i < length; ++i) {
3659
2.16M
        QRgba64 d = dest[i];
3660
2.16M
        QRgba64 s = src[i];
3661
3662
2.16M
        uint da = d.alpha();
3663
2.16M
        uint sa = s.alpha();
3664
3665
2.16M
#define OP(a, b) difference_op_rgb64(a, b, da, sa)
3666
2.16M
        uint r = OP(  d.red(),   s.red());
3667
2.16M
        uint b = OP( d.blue(),  s.blue());
3668
2.16M
        uint g = OP(d.green(), s.green());
3669
2.16M
        uint a = mix_alpha_rgb64(da, sa);
3670
2.16M
#undef OP
3671
3672
2.16M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3673
2.16M
    }
3674
37.6k
}
qcompositionfunctions.cpp:void comp_func_Difference_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
3657
39.1k
{
3658
2.31M
    for (int i = 0; i < length; ++i) {
3659
2.27M
        QRgba64 d = dest[i];
3660
2.27M
        QRgba64 s = src[i];
3661
3662
2.27M
        uint da = d.alpha();
3663
2.27M
        uint sa = s.alpha();
3664
3665
2.27M
#define OP(a, b) difference_op_rgb64(a, b, da, sa)
3666
2.27M
        uint r = OP(  d.red(),   s.red());
3667
2.27M
        uint b = OP( d.blue(),  s.blue());
3668
2.27M
        uint g = OP(d.green(), s.green());
3669
2.27M
        uint a = mix_alpha_rgb64(da, sa);
3670
2.27M
#undef OP
3671
3672
2.27M
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3673
2.27M
    }
3674
39.1k
}
3675
3676
void QT_FASTCALL comp_func_Difference_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3677
76.7k
{
3678
76.7k
    if (const_alpha == 255)
3679
37.6k
        comp_func_Difference_impl(dest, src, length, QFullCoverage());
3680
39.1k
    else
3681
39.1k
        comp_func_Difference_impl(dest, src, length, QPartialCoverage(const_alpha));
3682
76.7k
}
3683
#endif
3684
3685
#if QT_CONFIG(raster_fp)
3686
template <typename T>
3687
static inline void comp_func_Difference_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
3688
0
{
3689
0
    for (int i = 0; i < length; ++i) {
3690
0
        QRgbaFloat32 d = dest[i];
3691
0
        QRgbaFloat32 s = src[i];
3692
3693
0
        float da = d.alpha();
3694
0
        float sa = s.alpha();
3695
3696
0
#define OP(a, b) difference_op_rgbafp(a, b, da, sa)
3697
0
        float r = OP(  d.red(),   s.red());
3698
0
        float b = OP( d.blue(),  s.blue());
3699
0
        float g = OP(d.green(), s.green());
3700
0
        float a = mix_alpha_rgbafp(da, sa);
3701
0
#undef OP
3702
3703
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3704
0
    }
3705
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Difference_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Difference_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
3706
3707
void QT_FASTCALL comp_func_Difference_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3708
0
{
3709
0
    if (const_alpha == 255)
3710
0
        comp_func_Difference_impl(dest, src, length, QFullCoverage());
3711
0
    else
3712
0
        comp_func_Difference_impl(dest, src, length, QPartialCoverage(const_alpha));
3713
0
}
3714
#endif
3715
3716
/*
3717
    Dca' = (Sca.Da + Dca.Sa - 2.Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa)
3718
*/
3719
template <typename T>
3720
static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(uint *dest, int length, uint color, const T &coverage)
3721
0
{
3722
0
    int sa = qAlpha(color);
3723
0
    int sr = qRed(color);
3724
0
    int sg = qGreen(color);
3725
0
    int sb = qBlue(color);
3726
3727
0
    for (int i = 0; i < length; ++i) {
3728
0
        uint d = dest[i];
3729
0
        int da = qAlpha(d);
3730
3731
0
#define OP(a, b) (a + b - qt_div_255(2*(a*b)))
3732
0
        int r =  OP(  qRed(d), sr);
3733
0
        int b =  OP( qBlue(d), sb);
3734
0
        int g =  OP(qGreen(d), sg);
3735
0
        int a = mix_alpha(da, sa);
3736
0
#undef OP
3737
3738
0
        coverage.store(&dest[i], qRgba(r, g, b, a));
3739
0
    }
3740
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Exclusion_impl<QFullCoverage>(unsigned int*, int, unsigned int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Exclusion_impl<QPartialCoverage>(unsigned int*, int, unsigned int, QPartialCoverage const&)
3741
3742
void QT_FASTCALL comp_func_solid_Exclusion(uint *dest, int length, uint color, uint const_alpha)
3743
0
{
3744
0
    if (const_alpha == 255)
3745
0
        comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage());
3746
0
    else
3747
0
        comp_func_solid_Exclusion_impl(dest, length, color, QPartialCoverage(const_alpha));
3748
0
}
3749
3750
#if QT_CONFIG(raster_64bit)
3751
template <typename T>
3752
static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
3753
0
{
3754
0
    uint sa = color.alpha();
3755
0
    uint sr = color.red();
3756
0
    uint sg = color.green();
3757
0
    uint sb = color.blue();
3758
3759
0
    for (int i = 0; i < length; ++i) {
3760
0
        QRgba64 d = dest[i];
3761
0
        uint da = d.alpha();
3762
3763
0
#define OP(a, b) (a + b - qt_div_65535(2*(qint64(a)*b)))
3764
0
        uint r =  OP(  d.red(), sr);
3765
0
        uint b =  OP( d.blue(), sb);
3766
0
        uint g =  OP(d.green(), sg);
3767
0
        uint a = mix_alpha_rgb64(da, sa);
3768
0
#undef OP
3769
3770
0
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3771
0
    }
3772
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Exclusion_impl<QFullCoverage>(QRgba64*, int, QRgba64, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Exclusion_impl<QPartialCoverage>(QRgba64*, int, QRgba64, QPartialCoverage const&)
3773
3774
void QT_FASTCALL comp_func_solid_Exclusion_rgb64(QRgba64 *dest, int length, QRgba64 color, uint const_alpha)
3775
0
{
3776
0
    if (const_alpha == 255)
3777
0
        comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage());
3778
0
    else
3779
0
        comp_func_solid_Exclusion_impl(dest, length, color, QPartialCoverage(const_alpha));
3780
0
}
3781
#endif
3782
3783
#if QT_CONFIG(raster_fp)
3784
template <typename T>
3785
static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
3786
0
{
3787
0
    float sa = color.alpha();
3788
0
    float sr = color.red();
3789
0
    float sg = color.green();
3790
0
    float sb = color.blue();
3791
3792
0
    for (int i = 0; i < length; ++i) {
3793
0
        QRgbaFloat32 d = dest[i];
3794
0
        float da = d.alpha();
3795
3796
0
#define OP(a, b) (a + b - (2.0f * a * b))
3797
0
        float r =  OP(  d.red(), sr);
3798
0
        float b =  OP( d.blue(), sb);
3799
0
        float g =  OP(d.green(), sg);
3800
0
        float a = mix_alpha_rgbafp(da, sa);
3801
0
#undef OP
3802
3803
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3804
0
    }
3805
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Exclusion_impl<QFullCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_solid_Exclusion_impl<QPartialCoverage>(QRgbaFloat<float>*, int, QRgbaFloat<float>, QPartialCoverage const&)
3806
3807
void QT_FASTCALL comp_func_solid_Exclusion_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
3808
0
{
3809
0
    if (const_alpha == 255)
3810
0
        comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage());
3811
0
    else
3812
0
        comp_func_solid_Exclusion_impl(dest, length, color, QPartialCoverage(const_alpha));
3813
0
}
3814
#endif
3815
3816
template <typename T>
3817
static inline void comp_func_Exclusion_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
3818
45.3k
{
3819
2.92M
    for (int i = 0; i < length; ++i) {
3820
2.87M
        uint d = dest[i];
3821
2.87M
        uint s = src[i];
3822
3823
2.87M
        int da = qAlpha(d);
3824
2.87M
        int sa = qAlpha(s);
3825
3826
8.62M
#define OP(a, b) (a + b - ((a*b) >> 7))
3827
2.87M
        int r = OP(  qRed(d),   qRed(s));
3828
2.87M
        int b = OP( qBlue(d),  qBlue(s));
3829
2.87M
        int g = OP(qGreen(d), qGreen(s));
3830
2.87M
        int a = mix_alpha(da, sa);
3831
2.87M
#undef OP
3832
3833
2.87M
        coverage.store(&dest[i], qRgba(r, g, b, a));
3834
2.87M
    }
3835
45.3k
}
qcompositionfunctions.cpp:void comp_func_Exclusion_impl<QFullCoverage>(unsigned int*, unsigned int const*, int, QFullCoverage const&)
Line
Count
Source
3818
41.6k
{
3819
2.68M
    for (int i = 0; i < length; ++i) {
3820
2.64M
        uint d = dest[i];
3821
2.64M
        uint s = src[i];
3822
3823
2.64M
        int da = qAlpha(d);
3824
2.64M
        int sa = qAlpha(s);
3825
3826
2.64M
#define OP(a, b) (a + b - ((a*b) >> 7))
3827
2.64M
        int r = OP(  qRed(d),   qRed(s));
3828
2.64M
        int b = OP( qBlue(d),  qBlue(s));
3829
2.64M
        int g = OP(qGreen(d), qGreen(s));
3830
2.64M
        int a = mix_alpha(da, sa);
3831
2.64M
#undef OP
3832
3833
2.64M
        coverage.store(&dest[i], qRgba(r, g, b, a));
3834
2.64M
    }
3835
41.6k
}
qcompositionfunctions.cpp:void comp_func_Exclusion_impl<QPartialCoverage>(unsigned int*, unsigned int const*, int, QPartialCoverage const&)
Line
Count
Source
3818
3.67k
{
3819
237k
    for (int i = 0; i < length; ++i) {
3820
233k
        uint d = dest[i];
3821
233k
        uint s = src[i];
3822
3823
233k
        int da = qAlpha(d);
3824
233k
        int sa = qAlpha(s);
3825
3826
233k
#define OP(a, b) (a + b - ((a*b) >> 7))
3827
233k
        int r = OP(  qRed(d),   qRed(s));
3828
233k
        int b = OP( qBlue(d),  qBlue(s));
3829
233k
        int g = OP(qGreen(d), qGreen(s));
3830
233k
        int a = mix_alpha(da, sa);
3831
233k
#undef OP
3832
3833
233k
        coverage.store(&dest[i], qRgba(r, g, b, a));
3834
233k
    }
3835
3.67k
}
3836
3837
void QT_FASTCALL comp_func_Exclusion(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha)
3838
45.3k
{
3839
45.3k
    if (const_alpha == 255)
3840
41.6k
        comp_func_Exclusion_impl(dest, src, length, QFullCoverage());
3841
3.67k
    else
3842
3.67k
        comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha));
3843
45.3k
}
3844
3845
#if QT_CONFIG(raster_64bit)
3846
template <typename T>
3847
static inline void comp_func_Exclusion_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
3848
4.49k
{
3849
243k
    for (int i = 0; i < length; ++i) {
3850
238k
        QRgba64 d = dest[i];
3851
238k
        QRgba64 s = src[i];
3852
3853
238k
        uint da = d.alpha();
3854
238k
        uint sa = s.alpha();
3855
3856
716k
#define OP(a, b)  (a + b - ((qint64(a)*b) >> 15))
3857
238k
        uint r = OP(  d.red(),   s.red());
3858
238k
        uint b = OP( d.blue(),  s.blue());
3859
238k
        uint g = OP(d.green(), s.green());
3860
238k
        uint a = mix_alpha_rgb64(da, sa);
3861
238k
#undef OP
3862
3863
238k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3864
238k
    }
3865
4.49k
}
qcompositionfunctions.cpp:void comp_func_Exclusion_impl<QFullCoverage>(QRgba64*, QRgba64 const*, int, QFullCoverage const&)
Line
Count
Source
3848
2.90k
{
3849
186k
    for (int i = 0; i < length; ++i) {
3850
183k
        QRgba64 d = dest[i];
3851
183k
        QRgba64 s = src[i];
3852
3853
183k
        uint da = d.alpha();
3854
183k
        uint sa = s.alpha();
3855
3856
183k
#define OP(a, b)  (a + b - ((qint64(a)*b) >> 15))
3857
183k
        uint r = OP(  d.red(),   s.red());
3858
183k
        uint b = OP( d.blue(),  s.blue());
3859
183k
        uint g = OP(d.green(), s.green());
3860
183k
        uint a = mix_alpha_rgb64(da, sa);
3861
183k
#undef OP
3862
3863
183k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3864
183k
    }
3865
2.90k
}
qcompositionfunctions.cpp:void comp_func_Exclusion_impl<QPartialCoverage>(QRgba64*, QRgba64 const*, int, QPartialCoverage const&)
Line
Count
Source
3848
1.59k
{
3849
56.8k
    for (int i = 0; i < length; ++i) {
3850
55.2k
        QRgba64 d = dest[i];
3851
55.2k
        QRgba64 s = src[i];
3852
3853
55.2k
        uint da = d.alpha();
3854
55.2k
        uint sa = s.alpha();
3855
3856
55.2k
#define OP(a, b)  (a + b - ((qint64(a)*b) >> 15))
3857
55.2k
        uint r = OP(  d.red(),   s.red());
3858
55.2k
        uint b = OP( d.blue(),  s.blue());
3859
55.2k
        uint g = OP(d.green(), s.green());
3860
55.2k
        uint a = mix_alpha_rgb64(da, sa);
3861
55.2k
#undef OP
3862
3863
55.2k
        coverage.store(&dest[i], qRgba64(r, g, b, a));
3864
55.2k
    }
3865
1.59k
}
3866
3867
void QT_FASTCALL comp_func_Exclusion_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3868
4.49k
{
3869
4.49k
    if (const_alpha == 255)
3870
2.90k
        comp_func_Exclusion_impl(dest, src, length, QFullCoverage());
3871
1.59k
    else
3872
1.59k
        comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha));
3873
4.49k
}
3874
#endif
3875
3876
#if QT_CONFIG(raster_fp)
3877
template <typename T>
3878
static inline void comp_func_Exclusion_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
3879
0
{
3880
0
    for (int i = 0; i < length; ++i) {
3881
0
        QRgbaFloat32 d = dest[i];
3882
0
        QRgbaFloat32 s = src[i];
3883
3884
0
        float da = d.alpha();
3885
0
        float sa = s.alpha();
3886
3887
0
#define OP(a, b) (a + b - (2.0f * a * b))
3888
0
        float r = OP(  d.red(),   s.red());
3889
0
        float b = OP( d.blue(),  s.blue());
3890
0
        float g = OP(d.green(), s.green());
3891
0
        float a = mix_alpha_rgbafp(da, sa);
3892
0
#undef OP
3893
3894
0
        coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
3895
0
    }
3896
0
}
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Exclusion_impl<QFullCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QFullCoverage const&)
Unexecuted instantiation: qcompositionfunctions.cpp:void comp_func_Exclusion_impl<QPartialCoverage>(QRgbaFloat<float>*, QRgbaFloat<float> const*, int, QPartialCoverage const&)
3897
3898
void QT_FASTCALL comp_func_Exclusion_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
3899
0
{
3900
0
    if (const_alpha == 255)
3901
0
        comp_func_Exclusion_impl(dest, src, length, QFullCoverage());
3902
0
    else
3903
0
        comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha));
3904
0
}
3905
#endif
3906
3907
void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest,
3908
                                                    int length,
3909
                                                    uint color,
3910
                                                    uint const_alpha)
3911
0
{
3912
0
    Q_UNUSED(const_alpha);
3913
0
    while (length--)
3914
0
        *dest++ |= color;
3915
0
}
3916
3917
void QT_FASTCALL rasterop_SourceOrDestination(uint *Q_DECL_RESTRICT dest,
3918
                                              const uint *Q_DECL_RESTRICT src,
3919
                                              int length,
3920
                                              uint const_alpha)
3921
0
{
3922
0
    Q_UNUSED(const_alpha);
3923
0
    while (length--)
3924
0
        *dest++ |= *src++;
3925
0
}
3926
3927
void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest,
3928
                                                     int length,
3929
                                                     uint color,
3930
                                                     uint const_alpha)
3931
0
{
3932
0
    Q_UNUSED(const_alpha);
3933
0
    color |= 0xff000000;
3934
0
    while (length--)
3935
0
        *dest++ &= color;
3936
0
}
3937
3938
void QT_FASTCALL rasterop_SourceAndDestination(uint *Q_DECL_RESTRICT dest,
3939
                                               const uint *Q_DECL_RESTRICT src,
3940
                                               int length,
3941
                                               uint const_alpha)
3942
0
{
3943
0
    Q_UNUSED(const_alpha);
3944
0
    while (length--) {
3945
0
        *dest = (*src & *dest) | 0xff000000;
3946
0
        ++dest; ++src;
3947
0
    }
3948
0
}
3949
3950
void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest,
3951
                                                     int length,
3952
                                                     uint color,
3953
                                                     uint const_alpha)
3954
0
{
3955
0
    Q_UNUSED(const_alpha);
3956
0
    color &= 0x00ffffff;
3957
0
    while (length--)
3958
0
        *dest++ ^= color;
3959
0
}
3960
3961
void QT_FASTCALL rasterop_SourceXorDestination(uint *Q_DECL_RESTRICT dest,
3962
                                               const uint *Q_DECL_RESTRICT src,
3963
                                               int length,
3964
                                               uint const_alpha)
3965
0
{
3966
0
    Q_UNUSED(const_alpha);
3967
0
    while (length--) {
3968
0
        *dest = (*src ^ *dest) | 0xff000000;
3969
0
        ++dest; ++src;
3970
0
    }
3971
0
}
3972
3973
void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest,
3974
                                                           int length,
3975
                                                           uint color,
3976
                                                           uint const_alpha)
3977
0
{
3978
0
    Q_UNUSED(const_alpha);
3979
0
    color = ~color;
3980
0
    while (length--) {
3981
0
        *dest = (color & ~(*dest)) | 0xff000000;
3982
0
        ++dest;
3983
0
    }
3984
0
}
3985
3986
void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *Q_DECL_RESTRICT dest,
3987
                                                     const uint *Q_DECL_RESTRICT src,
3988
                                                     int length,
3989
                                                     uint const_alpha)
3990
0
{
3991
0
    Q_UNUSED(const_alpha);
3992
0
    while (length--) {
3993
0
        *dest = (~(*src) & ~(*dest)) | 0xff000000;
3994
0
        ++dest; ++src;
3995
0
    }
3996
0
}
3997
3998
void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest,
3999
                                                          int length,
4000
                                                          uint color,
4001
                                                          uint const_alpha)
4002
0
{
4003
0
    Q_UNUSED(const_alpha);
4004
0
    color = ~color | 0xff000000;
4005
0
    while (length--) {
4006
0
        *dest = color | ~(*dest);
4007
0
        ++dest;
4008
0
    }
4009
0
}
4010
4011
void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *Q_DECL_RESTRICT dest,
4012
                                                    const uint *Q_DECL_RESTRICT src,
4013
                                                    int length,
4014
                                                    uint const_alpha)
4015
0
{
4016
0
    Q_UNUSED(const_alpha);
4017
0
    while (length--) {
4018
0
        *dest = ~(*src) | ~(*dest) | 0xff000000;
4019
0
        ++dest; ++src;
4020
0
    }
4021
0
}
4022
4023
void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest,
4024
                                                        int length,
4025
                                                        uint color,
4026
                                                        uint const_alpha)
4027
0
{
4028
0
    Q_UNUSED(const_alpha);
4029
0
    color = ~color & 0x00ffffff;
4030
0
    while (length--) {
4031
0
        *dest = color ^ (*dest);
4032
0
        ++dest;
4033
0
    }
4034
0
}
4035
4036
void QT_FASTCALL rasterop_NotSourceXorDestination(uint *Q_DECL_RESTRICT dest,
4037
                                                  const uint *Q_DECL_RESTRICT src,
4038
                                                  int length,
4039
                                                  uint const_alpha)
4040
0
{
4041
0
    Q_UNUSED(const_alpha);
4042
0
    while (length--) {
4043
0
        *dest = ((~(*src)) ^ (*dest)) | 0xff000000;
4044
0
        ++dest; ++src;
4045
0
    }
4046
0
}
4047
4048
void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length,
4049
                                          uint color, uint const_alpha)
4050
0
{
4051
0
    Q_UNUSED(const_alpha);
4052
0
    qt_memfill(dest, ~color | 0xff000000, length);
4053
0
}
4054
4055
void QT_FASTCALL rasterop_NotSource(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src,
4056
                                    int length, uint const_alpha)
4057
0
{
4058
0
    Q_UNUSED(const_alpha);
4059
0
    while (length--)
4060
0
        *dest++ = ~(*src++) | 0xff000000;
4061
0
}
4062
4063
void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest,
4064
                                                        int length,
4065
                                                        uint color,
4066
                                                        uint const_alpha)
4067
0
{
4068
0
    Q_UNUSED(const_alpha);
4069
0
    color = ~color | 0xff000000;
4070
0
    while (length--) {
4071
0
        *dest = color & *dest;
4072
0
        ++dest;
4073
0
    }
4074
0
}
4075
4076
void QT_FASTCALL rasterop_NotSourceAndDestination(uint *Q_DECL_RESTRICT dest,
4077
                                                  const uint *Q_DECL_RESTRICT src,
4078
                                                  int length,
4079
                                                  uint const_alpha)
4080
0
{
4081
0
    Q_UNUSED(const_alpha);
4082
0
    while (length--) {
4083
0
        *dest = (~(*src) & *dest) | 0xff000000;
4084
0
        ++dest; ++src;
4085
0
    }
4086
0
}
4087
4088
void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest,
4089
                                                        int length,
4090
                                                        uint color,
4091
                                                        uint const_alpha)
4092
0
{
4093
0
    Q_UNUSED(const_alpha);
4094
0
    while (length--) {
4095
0
        *dest = (color & ~(*dest)) | 0xff000000;
4096
0
        ++dest;
4097
0
    }
4098
0
}
4099
4100
void QT_FASTCALL rasterop_SourceAndNotDestination(uint *Q_DECL_RESTRICT dest,
4101
                                                  const uint *Q_DECL_RESTRICT src,
4102
                                                  int length,
4103
                                                  uint const_alpha)
4104
0
{
4105
0
    Q_UNUSED(const_alpha);
4106
0
    while (length--) {
4107
0
        *dest = (*src & ~(*dest)) | 0xff000000;
4108
0
        ++dest; ++src;
4109
0
    }
4110
0
}
4111
4112
void QT_FASTCALL rasterop_NotSourceOrDestination(uint *Q_DECL_RESTRICT dest,
4113
                                                 const uint *Q_DECL_RESTRICT src,
4114
                                                 int length,
4115
                                                 uint const_alpha)
4116
0
{
4117
0
    Q_UNUSED(const_alpha);
4118
0
    while (length--) {
4119
0
        *dest = (~(*src) | *dest) | 0xff000000;
4120
0
        ++dest; ++src;
4121
0
    }
4122
0
}
4123
4124
void QT_FASTCALL rasterop_solid_NotSourceOrDestination(uint *Q_DECL_RESTRICT dest,
4125
                                                       int length,
4126
                                                       uint color,
4127
                                                       uint const_alpha)
4128
0
{
4129
0
    Q_UNUSED(const_alpha);
4130
0
    color = ~color | 0xff000000;
4131
0
    while (length--)
4132
0
        *dest++ |= color;
4133
0
}
4134
4135
void QT_FASTCALL rasterop_SourceOrNotDestination(uint *Q_DECL_RESTRICT dest,
4136
                                                 const uint *Q_DECL_RESTRICT src,
4137
                                                 int length,
4138
                                                 uint const_alpha)
4139
0
{
4140
0
    Q_UNUSED(const_alpha);
4141
0
    while (length--) {
4142
0
        *dest = (*src | ~(*dest)) | 0xff000000;
4143
0
        ++dest; ++src;
4144
0
    }
4145
0
}
4146
4147
void QT_FASTCALL rasterop_solid_SourceOrNotDestination(uint *Q_DECL_RESTRICT dest,
4148
                                                       int length,
4149
                                                       uint color,
4150
                                                       uint const_alpha)
4151
0
{
4152
0
    Q_UNUSED(const_alpha);
4153
0
    while (length--) {
4154
0
        *dest = (color | ~(*dest)) | 0xff000000;
4155
0
        ++dest;
4156
0
    }
4157
0
}
4158
4159
void QT_FASTCALL rasterop_ClearDestination(uint *Q_DECL_RESTRICT dest,
4160
                                           const uint *Q_DECL_RESTRICT src,
4161
                                           int length,
4162
                                           uint const_alpha)
4163
0
{
4164
0
    Q_UNUSED(src);
4165
0
    comp_func_solid_SourceOver (dest, length, 0xff000000, const_alpha);
4166
0
}
4167
4168
void QT_FASTCALL rasterop_solid_ClearDestination(uint *Q_DECL_RESTRICT dest,
4169
                                                 int length,
4170
                                                 uint color,
4171
                                                 uint const_alpha)
4172
0
{
4173
0
    Q_UNUSED(color);
4174
0
    comp_func_solid_SourceOver (dest, length, 0xff000000, const_alpha);
4175
0
}
4176
4177
void QT_FASTCALL rasterop_SetDestination(uint *Q_DECL_RESTRICT dest,
4178
                                         const uint *Q_DECL_RESTRICT src,
4179
                                         int length,
4180
                                         uint const_alpha)
4181
0
{
4182
0
    Q_UNUSED(src);
4183
0
    comp_func_solid_SourceOver (dest, length, 0xffffffff, const_alpha);
4184
0
}
4185
4186
void QT_FASTCALL rasterop_solid_SetDestination(uint *Q_DECL_RESTRICT dest,
4187
                                               int length,
4188
                                               uint color,
4189
                                               uint const_alpha)
4190
0
{
4191
0
    Q_UNUSED(color);
4192
0
    comp_func_solid_SourceOver (dest, length, 0xffffffff, const_alpha);
4193
0
}
4194
4195
void QT_FASTCALL rasterop_NotDestination(uint *Q_DECL_RESTRICT dest,
4196
                                         const uint *Q_DECL_RESTRICT src,
4197
                                         int length,
4198
                                         uint const_alpha)
4199
0
{
4200
0
    Q_UNUSED(src);
4201
0
    rasterop_solid_SourceXorDestination (dest, length, 0x00ffffff, const_alpha);
4202
0
}
4203
4204
void QT_FASTCALL rasterop_solid_NotDestination(uint *Q_DECL_RESTRICT dest,
4205
                                               int length,
4206
                                               uint color,
4207
                                               uint const_alpha)
4208
0
{
4209
    Q_UNUSED(color);
4210
0
    rasterop_solid_SourceXorDestination (dest, length, 0x00ffffff, const_alpha);
4211
0
}
4212
4213
CompositionFunctionSolid qt_functionForModeSolid_C[] = {
4214
        comp_func_solid_SourceOver,
4215
        comp_func_solid_DestinationOver,
4216
        comp_func_solid_Clear,
4217
        comp_func_solid_Source,
4218
        comp_func_solid_Destination,
4219
        comp_func_solid_SourceIn,
4220
        comp_func_solid_DestinationIn,
4221
        comp_func_solid_SourceOut,
4222
        comp_func_solid_DestinationOut,
4223
        comp_func_solid_SourceAtop,
4224
        comp_func_solid_DestinationAtop,
4225
        comp_func_solid_XOR,
4226
        comp_func_solid_Plus,
4227
        comp_func_solid_Multiply,
4228
        comp_func_solid_Screen,
4229
        comp_func_solid_Overlay,
4230
        comp_func_solid_Darken,
4231
        comp_func_solid_Lighten,
4232
        comp_func_solid_ColorDodge,
4233
        comp_func_solid_ColorBurn,
4234
        comp_func_solid_HardLight,
4235
        comp_func_solid_SoftLight,
4236
        comp_func_solid_Difference,
4237
        comp_func_solid_Exclusion,
4238
        rasterop_solid_SourceOrDestination,
4239
        rasterop_solid_SourceAndDestination,
4240
        rasterop_solid_SourceXorDestination,
4241
        rasterop_solid_NotSourceAndNotDestination,
4242
        rasterop_solid_NotSourceOrNotDestination,
4243
        rasterop_solid_NotSourceXorDestination,
4244
        rasterop_solid_NotSource,
4245
        rasterop_solid_NotSourceAndDestination,
4246
        rasterop_solid_SourceAndNotDestination,
4247
        rasterop_solid_NotSourceOrDestination,
4248
        rasterop_solid_SourceOrNotDestination,
4249
        rasterop_solid_ClearDestination,
4250
        rasterop_solid_SetDestination,
4251
        rasterop_solid_NotDestination
4252
};
4253
4254
static_assert(std::size(qt_functionForModeSolid_C) == QPainter::NCompositionModes);
4255
4256
CompositionFunctionSolid64 qt_functionForModeSolid64_C[] = {
4257
#if QT_CONFIG(raster_64bit)
4258
        comp_func_solid_SourceOver_rgb64,
4259
        comp_func_solid_DestinationOver_rgb64,
4260
        comp_func_solid_Clear_rgb64,
4261
        comp_func_solid_Source_rgb64,
4262
        comp_func_solid_Destination_rgb64,
4263
        comp_func_solid_SourceIn_rgb64,
4264
        comp_func_solid_DestinationIn_rgb64,
4265
        comp_func_solid_SourceOut_rgb64,
4266
        comp_func_solid_DestinationOut_rgb64,
4267
        comp_func_solid_SourceAtop_rgb64,
4268
        comp_func_solid_DestinationAtop_rgb64,
4269
        comp_func_solid_XOR_rgb64,
4270
        comp_func_solid_Plus_rgb64,
4271
        comp_func_solid_Multiply_rgb64,
4272
        comp_func_solid_Screen_rgb64,
4273
        comp_func_solid_Overlay_rgb64,
4274
        comp_func_solid_Darken_rgb64,
4275
        comp_func_solid_Lighten_rgb64,
4276
        comp_func_solid_ColorDodge_rgb64,
4277
        comp_func_solid_ColorBurn_rgb64,
4278
        comp_func_solid_HardLight_rgb64,
4279
        comp_func_solid_SoftLight_rgb64,
4280
        comp_func_solid_Difference_rgb64,
4281
        comp_func_solid_Exclusion_rgb64,
4282
#else
4283
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4284
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4285
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4286
#endif
4287
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4288
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
4289
};
4290
4291
static_assert(std::size(qt_functionForModeSolid64_C) == QPainter::NCompositionModes);
4292
4293
CompositionFunctionSolidFP qt_functionForModeSolidFP_C[] = {
4294
#if QT_CONFIG(raster_fp)
4295
        comp_func_solid_SourceOver_rgbafp,
4296
        comp_func_solid_DestinationOver_rgbafp,
4297
        comp_func_solid_Clear_rgbafp,
4298
        comp_func_solid_Source_rgbafp,
4299
        comp_func_solid_Destination_rgbafp,
4300
        comp_func_solid_SourceIn_rgbafp,
4301
        comp_func_solid_DestinationIn_rgbafp,
4302
        comp_func_solid_SourceOut_rgbafp,
4303
        comp_func_solid_DestinationOut_rgbafp,
4304
        comp_func_solid_SourceAtop_rgbafp,
4305
        comp_func_solid_DestinationAtop_rgbafp,
4306
        comp_func_solid_XOR_rgbafp,
4307
        comp_func_solid_Plus_rgbafp,
4308
        comp_func_solid_Multiply_rgbafp,
4309
        comp_func_solid_Screen_rgbafp,
4310
        comp_func_solid_Overlay_rgbafp,
4311
        comp_func_solid_Darken_rgbafp,
4312
        comp_func_solid_Lighten_rgbafp,
4313
        comp_func_solid_ColorDodge_rgbafp,
4314
        comp_func_solid_ColorBurn_rgbafp,
4315
        comp_func_solid_HardLight_rgbafp,
4316
        comp_func_solid_SoftLight_rgbafp,
4317
        comp_func_solid_Difference_rgbafp,
4318
        comp_func_solid_Exclusion_rgbafp,
4319
#else
4320
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4321
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4322
#endif
4323
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4324
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
4325
};
4326
4327
static_assert(std::size(qt_functionForModeSolidFP_C) == QPainter::NCompositionModes);
4328
4329
CompositionFunction qt_functionForMode_C[] = {
4330
        comp_func_SourceOver,
4331
        comp_func_DestinationOver,
4332
        comp_func_Clear,
4333
        comp_func_Source,
4334
        comp_func_Destination,
4335
        comp_func_SourceIn,
4336
        comp_func_DestinationIn,
4337
        comp_func_SourceOut,
4338
        comp_func_DestinationOut,
4339
        comp_func_SourceAtop,
4340
        comp_func_DestinationAtop,
4341
        comp_func_XOR,
4342
        comp_func_Plus,
4343
        comp_func_Multiply,
4344
        comp_func_Screen,
4345
        comp_func_Overlay,
4346
        comp_func_Darken,
4347
        comp_func_Lighten,
4348
        comp_func_ColorDodge,
4349
        comp_func_ColorBurn,
4350
        comp_func_HardLight,
4351
        comp_func_SoftLight,
4352
        comp_func_Difference,
4353
        comp_func_Exclusion,
4354
        rasterop_SourceOrDestination,
4355
        rasterop_SourceAndDestination,
4356
        rasterop_SourceXorDestination,
4357
        rasterop_NotSourceAndNotDestination,
4358
        rasterop_NotSourceOrNotDestination,
4359
        rasterop_NotSourceXorDestination,
4360
        rasterop_NotSource,
4361
        rasterop_NotSourceAndDestination,
4362
        rasterop_SourceAndNotDestination,
4363
        rasterop_NotSourceOrDestination,
4364
        rasterop_SourceOrNotDestination,
4365
        rasterop_ClearDestination,
4366
        rasterop_SetDestination,
4367
        rasterop_NotDestination
4368
};
4369
4370
static_assert(std::size(qt_functionForMode_C) == QPainter::NCompositionModes);
4371
4372
CompositionFunction64 qt_functionForMode64_C[] = {
4373
#if QT_CONFIG(raster_64bit)
4374
        comp_func_SourceOver_rgb64,
4375
        comp_func_DestinationOver_rgb64,
4376
        comp_func_Clear_rgb64,
4377
        comp_func_Source_rgb64,
4378
        comp_func_Destination_rgb64,
4379
        comp_func_SourceIn_rgb64,
4380
        comp_func_DestinationIn_rgb64,
4381
        comp_func_SourceOut_rgb64,
4382
        comp_func_DestinationOut_rgb64,
4383
        comp_func_SourceAtop_rgb64,
4384
        comp_func_DestinationAtop_rgb64,
4385
        comp_func_XOR_rgb64,
4386
        comp_func_Plus_rgb64,
4387
        comp_func_Multiply_rgb64,
4388
        comp_func_Screen_rgb64,
4389
        comp_func_Overlay_rgb64,
4390
        comp_func_Darken_rgb64,
4391
        comp_func_Lighten_rgb64,
4392
        comp_func_ColorDodge_rgb64,
4393
        comp_func_ColorBurn_rgb64,
4394
        comp_func_HardLight_rgb64,
4395
        comp_func_SoftLight_rgb64,
4396
        comp_func_Difference_rgb64,
4397
        comp_func_Exclusion_rgb64,
4398
#else
4399
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4400
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4401
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4402
#endif
4403
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4404
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
4405
};
4406
4407
static_assert(std::size(qt_functionForMode64_C) == QPainter::NCompositionModes);
4408
4409
CompositionFunctionFP qt_functionForModeFP_C[] = {
4410
#if QT_CONFIG(raster_fp)
4411
        comp_func_SourceOver_rgbafp,
4412
        comp_func_DestinationOver_rgbafp,
4413
        comp_func_Clear_rgbafp,
4414
        comp_func_Source_rgbafp,
4415
        comp_func_Destination_rgbafp,
4416
        comp_func_SourceIn_rgbafp,
4417
        comp_func_DestinationIn_rgbafp,
4418
        comp_func_SourceOut_rgbafp,
4419
        comp_func_DestinationOut_rgbafp,
4420
        comp_func_SourceAtop_rgbafp,
4421
        comp_func_DestinationAtop_rgbafp,
4422
        comp_func_XOR_rgbafp,
4423
        comp_func_Plus_rgbafp,
4424
        comp_func_Multiply_rgbafp,
4425
        comp_func_Screen_rgbafp,
4426
        comp_func_Overlay_rgbafp,
4427
        comp_func_Darken_rgbafp,
4428
        comp_func_Lighten_rgbafp,
4429
        comp_func_ColorDodge_rgbafp,
4430
        comp_func_ColorBurn_rgbafp,
4431
        comp_func_HardLight_rgbafp,
4432
        comp_func_SoftLight_rgbafp,
4433
        comp_func_Difference_rgbafp,
4434
        comp_func_Exclusion_rgbafp,
4435
#else
4436
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4437
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4438
#endif
4439
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
4440
        nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
4441
};
4442
4443
static_assert(std::size(qt_functionForModeFP_C) == QPainter::NCompositionModes);
4444
4445
QT_END_NAMESPACE