painting/qblendfunctions.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4struct SourceOnlyAlpha -
5{ -
6 inline uchar alpha(uchar src) const { return src; }
never executed: return src;
0
7 inline quint16 bytemul(quint16 spix) const { return spix; }
never executed: return spix;
0
8}; -
9 -
10 -
11struct SourceAndConstAlpha -
12{ -
13 SourceAndConstAlpha(int a) : m_alpha256(a) { -
14 m_alpha255 = (m_alpha256 * 255) >> 8; -
15 };
never executed: }
0
16 inline uchar alpha(uchar src) const { return (src * m_alpha256) >> 8; }
never executed: return (src * m_alpha256) >> 8;
0
17 inline quint16 bytemul(quint16 x) const { -
18 uint t = (((x & 0x07e0)*m_alpha255) >> 8) & 0x07e0; -
19 t |= (((x & 0xf81f)*(m_alpha255>>2)) >> 6) & 0xf81f; -
20 return t;
never executed: return t;
0
21 } -
22 int m_alpha255; -
23 int m_alpha256; -
24}; -
25 -
26 -
27 -
28 -
29 -
30 -
31struct Blend_RGB16_on_RGB16_NoAlpha { -
32 inline void write(quint16 *dst, quint16 src) { *dst = src; }
never executed: }
0
33 -
34 inline void flush(void *) {} -
35}; -
36 -
37struct Blend_RGB16_on_RGB16_ConstAlpha { -
38 inline Blend_RGB16_on_RGB16_ConstAlpha(quint32 alpha) { -
39 m_alpha = (alpha * 255) >> 8; -
40 m_ialpha = 255 - m_alpha; -
41 }
never executed: }
0
42 -
43 inline void write(quint16 *dst, quint16 src) { -
44 *dst = BYTE_MUL_RGB16(src, m_alpha) + BYTE_MUL_RGB16(*dst, m_ialpha); -
45 }
never executed: }
0
46 -
47 inline void flush(void *) {} -
48 -
49 quint32 m_alpha; -
50 quint32 m_ialpha; -
51}; -
52 -
53struct Blend_ARGB32_on_RGB16_SourceAlpha { -
54 inline void write(quint16 *dst, quint32 src) { -
55 const quint8 alpha = qAlpha(src); -
56 if (alpha) {
evaluated: alpha
TRUEFALSE
yes
Evaluation Count:5760
yes
Evaluation Count:3456
3456-5760
57 quint16 s = qConvertRgb32To16(src); -
58 if(alpha < 255)
partially evaluated: alpha < 255
TRUEFALSE
yes
Evaluation Count:5760
no
Evaluation Count:0
0-5760
59 s += BYTE_MUL_RGB16(*dst, 255 - alpha);
executed: s += BYTE_MUL_RGB16(*dst, 255 - alpha);
Execution Count:5760
5760
60 *dst = s; -
61 }
executed: }
Execution Count:5760
5760
62 }
executed: }
Execution Count:9216
9216
63 -
64 inline void flush(void *) {} -
65}; -
66 -
67struct Blend_ARGB32_on_RGB16_SourceAndConstAlpha { -
68 inline Blend_ARGB32_on_RGB16_SourceAndConstAlpha(quint32 alpha) { -
69 m_alpha = (alpha * 255) >> 8; -
70 }
never executed: }
0
71 -
72 inline void write(quint16 *dst, quint32 src) { -
73 src = BYTE_MUL(src, m_alpha); -
74 const quint8 alpha = qAlpha(src); -
75 if(alpha) {
never evaluated: alpha
0
76 quint16 s = qConvertRgb32To16(src); -
77 if(alpha < 255)
never evaluated: alpha < 255
0
78 s += BYTE_MUL_RGB16(*dst, 255 - alpha);
never executed: s += BYTE_MUL_RGB16(*dst, 255 - alpha);
0
79 *dst = s; -
80 }
never executed: }
0
81 }
never executed: }
0
82 -
83 inline void flush(void *) {} -
84 -
85 quint32 m_alpha; -
86}; -
87 -
88void qt_scale_image_rgb16_on_rgb16(uchar *destPixels, int dbpl, -
89 const uchar *srcPixels, int sbpl, -
90 const QRectF &targetRect, -
91 const QRectF &sourceRect, -
92 const QRect &clip, -
93 int const_alpha) -
94{ -
95 -
96 -
97 -
98 -
99 -
100 -
101 -
102 if (const_alpha == 256) {
never evaluated: const_alpha == 256
0
103 Blend_RGB16_on_RGB16_NoAlpha noAlpha; -
104 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, -
105 targetRect, sourceRect, clip, noAlpha); -
106 } else {
never executed: }
0
107 Blend_RGB16_on_RGB16_ConstAlpha constAlpha(const_alpha); -
108 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, -
109 targetRect, sourceRect, clip, constAlpha); -
110 }
never executed: }
0
111} -
112 -
113void qt_scale_image_argb32_on_rgb16(uchar *destPixels, int dbpl, -
114 const uchar *srcPixels, int sbpl, -
115 const QRectF &targetRect, -
116 const QRectF &sourceRect, -
117 const QRect &clip, -
118 int const_alpha) -
119{ -
120 -
121 -
122 -
123 -
124 -
125 -
126 -
127 if (const_alpha == 256) {
partially evaluated: const_alpha == 256
TRUEFALSE
yes
Evaluation Count:288
no
Evaluation Count:0
0-288
128 Blend_ARGB32_on_RGB16_SourceAlpha noAlpha; -
129 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, -
130 targetRect, sourceRect, clip, noAlpha); -
131 } else {
executed: }
Execution Count:288
288
132 Blend_ARGB32_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha); -
133 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, -
134 targetRect, sourceRect, clip, constAlpha); -
135 }
never executed: }
0
136} -
137 -
138void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl, -
139 const uchar *src, int sbpl, -
140 int w, int h, -
141 int const_alpha) -
142{ -
143 -
144 -
145 -
146 -
147 -
148 if (const_alpha == 256) {
evaluated: const_alpha == 256
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:7
6-7
149 if (w <= 64) {
evaluated: w <= 64
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:1
1-5
150 while (h--) {
evaluated: h--
TRUEFALSE
yes
Evaluation Count:86
yes
Evaluation Count:5
5-86
151 do { ushort *_d = (ushort*)(dst); const ushort *_s = (ushort*)(src); register int n = ((w) + 7) / 8; switch ((w) & 0x07) { case 0: do { *_d++ = *_s++; case 7: *_d++ = *_s++; case 6: *_d++ = *_s++; case 5: *_d++ = *_s++; case 4: *_d++ = *_s++; case 3: *_d++ = *_s++; case 2: *_d++ = *_s++; case 1: *_d++ = *_s++; } while (--n > 0); } } while (0);
code before this statement executed: case 7:
Execution Count:160
code before this statement executed: case 6:
Execution Count:160
code before this statement executed: case 5:
Execution Count:166
code before this statement executed: case 4:
Execution Count:206
code before this statement executed: case 3:
Execution Count:246
code before this statement executed: case 2:
Execution Count:246
code before this statement executed: case 1:
Execution Count:246
executed: }
Execution Count:246
executed: }
Execution Count:86
executed: }
Execution Count:86
evaluated: --n > 0
TRUEFALSE
yes
Evaluation Count:160
yes
Evaluation Count:86
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:86
0-246
152 dst += dbpl; -
153 src += sbpl; -
154 }
executed: }
Execution Count:86
86
155 } else {
executed: }
Execution Count:5
5
156 int length = w << 1; -
157 while (h--) {
evaluated: h--
TRUEFALSE
yes
Evaluation Count:128
yes
Evaluation Count:1
1-128
158 memcpy(dst, src, length); -
159 dst += dbpl; -
160 src += sbpl; -
161 }
executed: }
Execution Count:128
128
162 }
executed: }
Execution Count:1
1
163 } else if (const_alpha != 0) {
partially evaluated: const_alpha != 0
TRUEFALSE
yes
Evaluation Count:7
no
Evaluation Count:0
0-7
164 quint16 *d = (quint16 *) dst; -
165 const quint16 *s = (const quint16 *) src; -
166 quint8 a = (255 * const_alpha) >> 8; -
167 quint8 ia = 255 - a; -
168 while (h--) {
evaluated: h--
TRUEFALSE
yes
Evaluation Count:780
yes
Evaluation Count:7
7-780
169 for (int x=0; x<w; ++x) {
evaluated: x<w
TRUEFALSE
yes
Evaluation Count:96912
yes
Evaluation Count:780
780-96912
170 d[x] = BYTE_MUL_RGB16(s[x], a) + BYTE_MUL_RGB16(d[x], ia); -
171 }
executed: }
Execution Count:96912
96912
172 d = (quint16 *)(((uchar *) d) + dbpl); -
173 s = (const quint16 *)(((const uchar *) s) + sbpl); -
174 }
executed: }
Execution Count:780
780
175 }
executed: }
Execution Count:7
7
176} -
177 -
178 -
179void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels, int dbpl, -
180 const uchar *srcPixels, int sbpl, -
181 int w, int h, -
182 int const_alpha) -
183{ -
184 quint16 *dst = (quint16 *) destPixels; -
185 const quint32 *src = (const quint32 *) srcPixels; -
186 -
187 const_alpha = (const_alpha * 255) >> 8; -
188 for (int y=0; y<h; ++y) {
evaluated: y<h
TRUEFALSE
yes
Evaluation Count:790
yes
Evaluation Count:8
8-790
189 for (int i = 0; i < w; ++i) {
evaluated: i < w
TRUEFALSE
yes
Evaluation Count:97012
yes
Evaluation Count:790
790-97012
190 uint s = src[i]; -
191 s = BYTE_MUL(s, const_alpha); -
192 int alpha = qAlpha(s); -
193 s = qConvertRgb32To16(s); -
194 s += BYTE_MUL_RGB16(dst[i], 255 - alpha); -
195 dst[i] = s; -
196 }
executed: }
Execution Count:97012
97012
197 dst = (quint16 *)(((uchar *) dst) + dbpl); -
198 src = (const quint32 *)(((const uchar *) src) + sbpl); -
199 }
executed: }
Execution Count:790
790
200}
executed: }
Execution Count:8
8
201 -
202static void qt_blend_argb32_on_rgb16(uchar *destPixels, int dbpl, -
203 const uchar *srcPixels, int sbpl, -
204 int w, int h, -
205 int const_alpha) -
206{ -
207 if (const_alpha != 256) {
evaluated: const_alpha != 256
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:9617
8-9617
208 qt_blend_argb32_on_rgb16_const_alpha(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha); -
209 return;
executed: return;
Execution Count:8
8
210 } -
211 -
212 quint16 *dst = (quint16 *) destPixels; -
213 quint32 *src = (quint32 *) srcPixels; -
214 -
215 for (int y=0; y<h; ++y) {
evaluated: y<h
TRUEFALSE
yes
Evaluation Count:105787
yes
Evaluation Count:9617
9617-105787
216 for (int x=0; x<w; ++x) {
evaluated: x<w
TRUEFALSE
yes
Evaluation Count:1843135
yes
Evaluation Count:105787
105787-1843135
217 -
218 quint32 spix = src[x]; -
219 quint32 alpha = spix >> 24; -
220 -
221 if (alpha == 255) {
evaluated: alpha == 255
TRUEFALSE
yes
Evaluation Count:787945
yes
Evaluation Count:1055190
787945-1055190
222 dst[x] = qConvertRgb32To16(spix); -
223 } else if (alpha != 0) {
executed: }
Execution Count:787945
evaluated: alpha != 0
TRUEFALSE
yes
Evaluation Count:143740
yes
Evaluation Count:911450
143740-911450
224 quint32 dpix = dst[x]; -
225 -
226 quint32 sia = 255 - alpha; -
227 -
228 quint32 sr = (spix >> 8) & 0xf800; -
229 quint32 sg = (spix >> 5) & 0x07e0; -
230 quint32 sb = (spix >> 3) & 0x001f; -
231 -
232 quint32 dr = (dpix & 0x0000f800); -
233 quint32 dg = (dpix & 0x000007e0); -
234 quint32 db = (dpix & 0x0000001f); -
235 -
236 quint32 siar = dr * sia; -
237 quint32 siag = dg * sia; -
238 quint32 siab = db * sia; -
239 -
240 quint32 rr = sr + ((siar + (siar>>8) + (0x80 << 8)) >> 8); -
241 quint32 rg = sg + ((siag + (siag>>8) + (0x80 << 3)) >> 8); -
242 quint32 rb = sb + ((siab + (siab>>8) + (0x80 >> 3)) >> 8); -
243 -
244 dst[x] = (rr & 0xf800) -
245 | (rg & 0x07e0) -
246 | (rb); -
247 }
executed: }
Execution Count:143740
143740
248 } -
249 dst = (quint16 *) (((uchar *) dst) + dbpl); -
250 src = (quint32 *) (((uchar *) src) + sbpl); -
251 }
executed: }
Execution Count:105787
105787
252}
executed: }
Execution Count:9617
9617
253 -
254 -
255static void qt_blend_rgb32_on_rgb16(uchar *destPixels, int dbpl, -
256 const uchar *srcPixels, int sbpl, -
257 int w, int h, -
258 int const_alpha) -
259{ -
260 -
261 -
262 -
263 -
264 -
265 if (const_alpha != 256) {
evaluated: const_alpha != 256
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:136
7-136
266 qt_blend_argb32_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha); -
267 return;
executed: return;
Execution Count:7
7
268 } -
269 -
270 const quint32 *src = (const quint32 *) srcPixels; -
271 int srcExtraStride = (sbpl >> 2) - w; -
272 -
273 int dstJPL = dbpl / 2; -
274 -
275 quint16 *dst = (quint16 *) destPixels; -
276 quint16 *dstEnd = dst + dstJPL * h; -
277 -
278 int dstExtraStride = dstJPL - w; -
279 -
280 while (dst < dstEnd) {
evaluated: dst < dstEnd
TRUEFALSE
yes
Evaluation Count:9036
yes
Evaluation Count:136
136-9036
281 const quint32 *srcEnd = src + w; -
282 while (src < srcEnd) {
evaluated: src < srcEnd
TRUEFALSE
yes
Evaluation Count:1427828
yes
Evaluation Count:9036
9036-1427828
283 *dst = qConvertRgb32To16(*src); -
284 ++dst; -
285 ++src; -
286 }
executed: }
Execution Count:1427828
1427828
287 dst += dstExtraStride; -
288 src += srcExtraStride; -
289 }
executed: }
Execution Count:9036
9036
290}
executed: }
Execution Count:136
136
291 -
292 -
293 -
294 -
295 -
296 -
297 -
298static void qt_blend_argb32_on_argb32(uchar *destPixels, int dbpl, -
299 const uchar *srcPixels, int sbpl, -
300 int w, int h, -
301 int const_alpha) -
302{ -
303 -
304 -
305 -
306 -
307 -
308 -
309 const uint *src = (const uint *) srcPixels; -
310 uint *dst = (uint *) destPixels; -
311 if (const_alpha == 256) {
never evaluated: const_alpha == 256
0
312 for (int y=0; y<h; ++y) {
never evaluated: y<h
0
313 for (int x=0; x<w; ++x) {
never evaluated: x<w
0
314 uint s = src[x]; -
315 if (s >= 0xff000000)
never evaluated: s >= 0xff000000
0
316 dst[x] = s;
never executed: dst[x] = s;
0
317 else if (s != 0)
never evaluated: s != 0
0
318 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
never executed: dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
0
319 } -
320 dst = (quint32 *)(((uchar *) dst) + dbpl); -
321 src = (const quint32 *)(((const uchar *) src) + sbpl); -
322 }
never executed: }
0
323 } else if (const_alpha != 0) {
never executed: }
never evaluated: const_alpha != 0
0
324 const_alpha = (const_alpha * 255) >> 8; -
325 for (int y=0; y<h; ++y) {
never evaluated: y<h
0
326 for (int x=0; x<w; ++x) {
never evaluated: x<w
0
327 uint s = BYTE_MUL(src[x], const_alpha); -
328 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); -
329 }
never executed: }
0
330 dst = (quint32 *)(((uchar *) dst) + dbpl); -
331 src = (const quint32 *)(((const uchar *) src) + sbpl); -
332 }
never executed: }
0
333 }
never executed: }
0
334} -
335 -
336 -
337void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl, -
338 const uchar *srcPixels, int sbpl, -
339 int w, int h, -
340 int const_alpha) -
341{ -
342 -
343 -
344 -
345 -
346 -
347 -
348 if (const_alpha != 256) {
partially evaluated: const_alpha != 256
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:40
0-40
349 qt_blend_argb32_on_argb32(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha); -
350 return;
never executed: return;
0
351 } -
352 -
353 const uint *src = (const uint *) srcPixels; -
354 uint *dst = (uint *) destPixels; -
355 int len = w * 4; -
356 for (int y=0; y<h; ++y) {
evaluated: y<h
TRUEFALSE
yes
Evaluation Count:5276
yes
Evaluation Count:40
40-5276
357 memcpy(dst, src, len); -
358 dst = (quint32 *)(((uchar *) dst) + dbpl); -
359 src = (const quint32 *)(((const uchar *) src) + sbpl); -
360 }
executed: }
Execution Count:5276
5276
361}
executed: }
Execution Count:40
40
362 -
363 -
364 -
365struct Blend_RGB32_on_RGB32_NoAlpha { -
366 inline void write(quint32 *dst, quint32 src) { *dst = src; }
executed: }
Execution Count:4353
4353
367 -
368 inline void flush(void *) {} -
369}; -
370 -
371struct Blend_RGB32_on_RGB32_ConstAlpha { -
372 inline Blend_RGB32_on_RGB32_ConstAlpha(quint32 alpha) { -
373 m_alpha = (alpha * 255) >> 8; -
374 m_ialpha = 255 - m_alpha; -
375 }
never executed: }
0
376 -
377 inline void write(quint32 *dst, quint32 src) { -
378 *dst = BYTE_MUL(src, m_alpha) + BYTE_MUL(*dst, m_ialpha); -
379 }
never executed: }
0
380 -
381 inline void flush(void *) {} -
382 -
383 quint32 m_alpha; -
384 quint32 m_ialpha; -
385}; -
386 -
387struct Blend_ARGB32_on_ARGB32_SourceAlpha { -
388 inline void write(quint32 *dst, quint32 src) { -
389 *dst = src + BYTE_MUL(*dst, qAlpha(~src)); -
390 }
never executed: }
0
391 -
392 inline void flush(void *) {} -
393}; -
394 -
395struct Blend_ARGB32_on_ARGB32_SourceAndConstAlpha { -
396 inline Blend_ARGB32_on_ARGB32_SourceAndConstAlpha(quint32 alpha) { -
397 m_alpha = (alpha * 255) >> 8; -
398 m_ialpha = 255 - m_alpha; -
399 }
never executed: }
0
400 -
401 inline void write(quint32 *dst, quint32 src) { -
402 src = BYTE_MUL(src, m_alpha); -
403 *dst = src + BYTE_MUL(*dst, qAlpha(~src)); -
404 }
never executed: }
0
405 -
406 inline void flush(void *) {} -
407 -
408 quint32 m_alpha; -
409 quint32 m_ialpha; -
410}; -
411 -
412void qt_scale_image_rgb32_on_rgb32(uchar *destPixels, int dbpl, -
413 const uchar *srcPixels, int sbpl, -
414 const QRectF &targetRect, -
415 const QRectF &sourceRect, -
416 const QRect &clip, -
417 int const_alpha) -
418{ -
419 -
420 -
421 -
422 -
423 -
424 -
425 -
426 if (const_alpha == 256) {
partially evaluated: const_alpha == 256
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-6
427 Blend_RGB32_on_RGB32_NoAlpha noAlpha; -
428 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, -
429 targetRect, sourceRect, clip, noAlpha); -
430 } else {
executed: }
Execution Count:6
6
431 Blend_RGB32_on_RGB32_ConstAlpha constAlpha(const_alpha); -
432 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, -
433 targetRect, sourceRect, clip, constAlpha); -
434 }
never executed: }
0
435} -
436 -
437void qt_scale_image_argb32_on_argb32(uchar *destPixels, int dbpl, -
438 const uchar *srcPixels, int sbpl, -
439 const QRectF &targetRect, -
440 const QRectF &sourceRect, -
441 const QRect &clip, -
442 int const_alpha) -
443{ -
444 -
445 -
446 -
447 -
448 -
449 -
450 -
451 if (const_alpha == 256) {
never evaluated: const_alpha == 256
0
452 Blend_ARGB32_on_ARGB32_SourceAlpha sourceAlpha; -
453 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, -
454 targetRect, sourceRect, clip, sourceAlpha); -
455 } else {
never executed: }
0
456 Blend_ARGB32_on_ARGB32_SourceAndConstAlpha constAlpha(const_alpha); -
457 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, -
458 targetRect, sourceRect, clip, constAlpha); -
459 }
never executed: }
0
460} -
461 -
462void qt_transform_image_rgb16_on_rgb16(uchar *destPixels, int dbpl, -
463 const uchar *srcPixels, int sbpl, -
464 const QRectF &targetRect, -
465 const QRectF &sourceRect, -
466 const QRect &clip, -
467 const QTransform &targetRectTransform, -
468 int const_alpha) -
469{ -
470 if (const_alpha == 256) {
never evaluated: const_alpha == 256
0
471 Blend_RGB16_on_RGB16_NoAlpha noAlpha; -
472 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl, -
473 reinterpret_cast<const quint16 *>(srcPixels), sbpl, -
474 targetRect, sourceRect, clip, targetRectTransform, noAlpha); -
475 } else {
never executed: }
0
476 Blend_RGB16_on_RGB16_ConstAlpha constAlpha(const_alpha); -
477 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl, -
478 reinterpret_cast<const quint16 *>(srcPixels), sbpl, -
479 targetRect, sourceRect, clip, targetRectTransform, constAlpha); -
480 }
never executed: }
0
481} -
482 -
483void qt_transform_image_argb32_on_rgb16(uchar *destPixels, int dbpl, -
484 const uchar *srcPixels, int sbpl, -
485 const QRectF &targetRect, -
486 const QRectF &sourceRect, -
487 const QRect &clip, -
488 const QTransform &targetRectTransform, -
489 int const_alpha) -
490{ -
491 if (const_alpha == 256) {
never evaluated: const_alpha == 256
0
492 Blend_ARGB32_on_RGB16_SourceAlpha noAlpha; -
493 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl, -
494 reinterpret_cast<const quint32 *>(srcPixels), sbpl, -
495 targetRect, sourceRect, clip, targetRectTransform, noAlpha); -
496 } else {
never executed: }
0
497 Blend_ARGB32_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha); -
498 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl, -
499 reinterpret_cast<const quint32 *>(srcPixels), sbpl, -
500 targetRect, sourceRect, clip, targetRectTransform, constAlpha); -
501 }
never executed: }
0
502} -
503 -
504 -
505void qt_transform_image_rgb32_on_rgb32(uchar *destPixels, int dbpl, -
506 const uchar *srcPixels, int sbpl, -
507 const QRectF &targetRect, -
508 const QRectF &sourceRect, -
509 const QRect &clip, -
510 const QTransform &targetRectTransform, -
511 int const_alpha) -
512{ -
513 if (const_alpha == 256) {
partially evaluated: const_alpha == 256
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
514 Blend_RGB32_on_RGB32_NoAlpha noAlpha; -
515 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl, -
516 reinterpret_cast<const quint32 *>(srcPixels), sbpl, -
517 targetRect, sourceRect, clip, targetRectTransform, noAlpha); -
518 } else {
executed: }
Execution Count:1
1
519 Blend_RGB32_on_RGB32_ConstAlpha constAlpha(const_alpha); -
520 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl, -
521 reinterpret_cast<const quint32 *>(srcPixels), sbpl, -
522 targetRect, sourceRect, clip, targetRectTransform, constAlpha); -
523 }
never executed: }
0
524} -
525 -
526void qt_transform_image_argb32_on_argb32(uchar *destPixels, int dbpl, -
527 const uchar *srcPixels, int sbpl, -
528 const QRectF &targetRect, -
529 const QRectF &sourceRect, -
530 const QRect &clip, -
531 const QTransform &targetRectTransform, -
532 int const_alpha) -
533{ -
534 if (const_alpha == 256) {
never evaluated: const_alpha == 256
0
535 Blend_ARGB32_on_ARGB32_SourceAlpha sourceAlpha; -
536 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl, -
537 reinterpret_cast<const quint32 *>(srcPixels), sbpl, -
538 targetRect, sourceRect, clip, targetRectTransform, sourceAlpha); -
539 } else {
never executed: }
0
540 Blend_ARGB32_on_ARGB32_SourceAndConstAlpha constAlpha(const_alpha); -
541 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl, -
542 reinterpret_cast<const quint32 *>(srcPixels), sbpl, -
543 targetRect, sourceRect, clip, targetRectTransform, constAlpha); -
544 }
never executed: }
0
545} -
546 -
547SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] = { -
548 { -
549 0, -
550 0, -
551 0, -
552 0, -
553 0, -
554 0, -
555 0, -
556 0, -
557 0, -
558 0, -
559 0, -
560 0, -
561 0, -
562 0, -
563 0, -
564 0 -
565 }, -
566 { -
567 0, -
568 0, -
569 0, -
570 0, -
571 0, -
572 0, -
573 0, -
574 0, -
575 0, -
576 0, -
577 0, -
578 0, -
579 0, -
580 0, -
581 0, -
582 0 -
583 }, -
584 { -
585 0, -
586 0, -
587 0, -
588 0, -
589 0, -
590 0, -
591 0, -
592 0, -
593 0, -
594 0, -
595 0, -
596 0, -
597 0, -
598 0, -
599 0, -
600 0 -
601 }, -
602 { -
603 0, -
604 0, -
605 0, -
606 0, -
607 0, -
608 0, -
609 0, -
610 0, -
611 0, -
612 0, -
613 0, -
614 0, -
615 0, -
616 0, -
617 0, -
618 0 -
619 }, -
620 { -
621 0, -
622 0, -
623 0, -
624 0, -
625 qt_scale_image_rgb32_on_rgb32, -
626 0, -
627 qt_scale_image_argb32_on_argb32, -
628 0, -
629 0, -
630 0, -
631 0, -
632 0, -
633 0, -
634 0, -
635 0, -
636 0 -
637 }, -
638 { -
639 0, -
640 0, -
641 0, -
642 0, -
643 0, -
644 0, -
645 0, -
646 0, -
647 0, -
648 0, -
649 0, -
650 0, -
651 0, -
652 0, -
653 0, -
654 0 -
655 }, -
656 { -
657 0, -
658 0, -
659 0, -
660 0, -
661 qt_scale_image_rgb32_on_rgb32, -
662 0, -
663 qt_scale_image_argb32_on_argb32, -
664 0, -
665 0, -
666 0, -
667 0, -
668 0, -
669 0, -
670 0, -
671 0, -
672 0 -
673 }, -
674 { -
675 0, -
676 0, -
677 0, -
678 0, -
679 0, -
680 0, -
681 qt_scale_image_argb32_on_rgb16, -
682 qt_scale_image_rgb16_on_rgb16, -
683 0, -
684 0, -
685 0, -
686 0, -
687 0, -
688 0, -
689 0, -
690 0 -
691 }, -
692 { -
693 0, -
694 0, -
695 0, -
696 0, -
697 0, -
698 0, -
699 0, -
700 0, -
701 0, -
702 0, -
703 0, -
704 0, -
705 0, -
706 0, -
707 0, -
708 0 -
709 }, -
710 { -
711 0, -
712 0, -
713 0, -
714 0, -
715 0, -
716 0, -
717 0, -
718 0, -
719 0, -
720 0, -
721 0, -
722 0, -
723 0, -
724 0, -
725 0, -
726 0 -
727 }, -
728 { -
729 0, -
730 0, -
731 0, -
732 0, -
733 0, -
734 0, -
735 0, -
736 0, -
737 0, -
738 0, -
739 0, -
740 0, -
741 0, -
742 0, -
743 0, -
744 0 -
745 }, -
746 { -
747 0, -
748 0, -
749 0, -
750 0, -
751 0, -
752 0, -
753 0, -
754 0, -
755 0, -
756 0, -
757 0, -
758 0, -
759 0, -
760 0, -
761 0, -
762 0 -
763 }, -
764 { -
765 0, -
766 0, -
767 0, -
768 0, -
769 0, -
770 0, -
771 0, -
772 0, -
773 0, -
774 0, -
775 0, -
776 0, -
777 0, -
778 0, -
779 0, -
780 0 -
781 }, -
782 { -
783 0, -
784 0, -
785 0, -
786 0, -
787 0, -
788 0, -
789 0, -
790 0, -
791 0, -
792 0, -
793 0, -
794 0, -
795 0, -
796 0, -
797 0, -
798 0 -
799 }, -
800 { -
801 0, -
802 0, -
803 0, -
804 0, -
805 0, -
806 0, -
807 0, -
808 0, -
809 0, -
810 0, -
811 0, -
812 0, -
813 0, -
814 0, -
815 0, -
816 0 -
817 }, -
818 { -
819 0, -
820 0, -
821 0, -
822 0, -
823 0, -
824 0, -
825 0, -
826 0, -
827 0, -
828 0, -
829 0, -
830 0, -
831 0, -
832 0, -
833 0, -
834 0 -
835 } -
836}; -
837 -
838 -
839SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] = { -
840 { -
841 0, -
842 0, -
843 0, -
844 0, -
845 0, -
846 0, -
847 0, -
848 0, -
849 0, -
850 0, -
851 0, -
852 0, -
853 0, -
854 0, -
855 0, -
856 0 -
857 }, -
858 { -
859 0, -
860 0, -
861 0, -
862 0, -
863 0, -
864 0, -
865 0, -
866 0, -
867 0, -
868 0, -
869 0, -
870 0, -
871 0, -
872 0, -
873 0, -
874 0 -
875 }, -
876 { -
877 0, -
878 0, -
879 0, -
880 0, -
881 0, -
882 0, -
883 0, -
884 0, -
885 0, -
886 0, -
887 0, -
888 0, -
889 0, -
890 0, -
891 0, -
892 0 -
893 }, -
894 { -
895 0, -
896 0, -
897 0, -
898 0, -
899 0, -
900 0, -
901 0, -
902 0, -
903 0, -
904 0, -
905 0, -
906 0, -
907 0, -
908 0, -
909 0, -
910 0 -
911 }, -
912 { -
913 0, -
914 0, -
915 0, -
916 0, -
917 qt_blend_rgb32_on_rgb32, -
918 0, -
919 qt_blend_argb32_on_argb32, -
920 0, -
921 0, -
922 0, -
923 0, -
924 0, -
925 0, -
926 0, -
927 0, -
928 0 -
929 }, -
930 { -
931 0, -
932 0, -
933 0, -
934 0, -
935 0, -
936 0, -
937 0, -
938 0, -
939 0, -
940 0, -
941 0, -
942 0, -
943 0, -
944 0, -
945 0, -
946 0 -
947 }, -
948 { -
949 0, -
950 0, -
951 0, -
952 0, -
953 qt_blend_rgb32_on_rgb32, -
954 0, -
955 qt_blend_argb32_on_argb32, -
956 0, -
957 0, -
958 0, -
959 0, -
960 0, -
961 0, -
962 0, -
963 0, -
964 0 -
965 }, -
966 { -
967 0, -
968 0, -
969 0, -
970 0, -
971 qt_blend_rgb32_on_rgb16, -
972 0, -
973 qt_blend_argb32_on_rgb16, -
974 qt_blend_rgb16_on_rgb16, -
975 0, -
976 0, -
977 0, -
978 0, -
979 0, -
980 0, -
981 0, -
982 0 -
983 }, -
984 { -
985 0, -
986 0, -
987 0, -
988 0, -
989 0, -
990 0, -
991 0, -
992 0, -
993 0, -
994 0, -
995 0, -
996 0, -
997 0, -
998 0, -
999 0, -
1000 0 -
1001 }, -
1002 { -
1003 0, -
1004 0, -
1005 0, -
1006 0, -
1007 0, -
1008 0, -
1009 0, -
1010 0, -
1011 0, -
1012 0, -
1013 0, -
1014 0, -
1015 0, -
1016 0, -
1017 0, -
1018 0 -
1019 }, -
1020 { -
1021 0, -
1022 0, -
1023 0, -
1024 0, -
1025 0, -
1026 0, -
1027 0, -
1028 0, -
1029 0, -
1030 0, -
1031 0, -
1032 0, -
1033 0, -
1034 0, -
1035 0, -
1036 0 -
1037 }, -
1038 { -
1039 0, -
1040 0, -
1041 0, -
1042 0, -
1043 0, -
1044 0, -
1045 0, -
1046 0, -
1047 0, -
1048 0, -
1049 0, -
1050 0, -
1051 0, -
1052 0, -
1053 0, -
1054 0 -
1055 }, -
1056 { -
1057 0, -
1058 0, -
1059 0, -
1060 0, -
1061 0, -
1062 0, -
1063 0, -
1064 0, -
1065 0, -
1066 0, -
1067 0, -
1068 0, -
1069 0, -
1070 0, -
1071 0, -
1072 0 -
1073 }, -
1074 { -
1075 0, -
1076 0, -
1077 0, -
1078 0, -
1079 0, -
1080 0, -
1081 0, -
1082 0, -
1083 0, -
1084 0, -
1085 0, -
1086 0, -
1087 0, -
1088 0, -
1089 0, -
1090 0 -
1091 }, -
1092 { -
1093 0, -
1094 0, -
1095 0, -
1096 0, -
1097 0, -
1098 0, -
1099 0, -
1100 0, -
1101 0, -
1102 0, -
1103 0, -
1104 0, -
1105 0, -
1106 0, -
1107 0, -
1108 0 -
1109 }, -
1110 { -
1111 0, -
1112 0, -
1113 0, -
1114 0, -
1115 0, -
1116 0, -
1117 0, -
1118 0, -
1119 0, -
1120 0, -
1121 0, -
1122 0, -
1123 0, -
1124 0, -
1125 0, -
1126 0 -
1127 } -
1128}; -
1129 -
1130SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats] = { -
1131 { -
1132 0, -
1133 0, -
1134 0, -
1135 0, -
1136 0, -
1137 0, -
1138 0, -
1139 0, -
1140 0, -
1141 0, -
1142 0, -
1143 0, -
1144 0, -
1145 0, -
1146 0, -
1147 0 -
1148 }, -
1149 { -
1150 0, -
1151 0, -
1152 0, -
1153 0, -
1154 0, -
1155 0, -
1156 0, -
1157 0, -
1158 0, -
1159 0, -
1160 0, -
1161 0, -
1162 0, -
1163 0, -
1164 0, -
1165 0 -
1166 }, -
1167 { -
1168 0, -
1169 0, -
1170 0, -
1171 0, -
1172 0, -
1173 0, -
1174 0, -
1175 0, -
1176 0, -
1177 0, -
1178 0, -
1179 0, -
1180 0, -
1181 0, -
1182 0, -
1183 0 -
1184 }, -
1185 { -
1186 0, -
1187 0, -
1188 0, -
1189 0, -
1190 0, -
1191 0, -
1192 0, -
1193 0, -
1194 0, -
1195 0, -
1196 0, -
1197 0, -
1198 0, -
1199 0, -
1200 0, -
1201 0 -
1202 }, -
1203 { -
1204 0, -
1205 0, -
1206 0, -
1207 0, -
1208 qt_transform_image_rgb32_on_rgb32, -
1209 0, -
1210 qt_transform_image_argb32_on_argb32, -
1211 0, -
1212 0, -
1213 0, -
1214 0, -
1215 0, -
1216 0, -
1217 0, -
1218 0, -
1219 0 -
1220 }, -
1221 { -
1222 0, -
1223 0, -
1224 0, -
1225 0, -
1226 0, -
1227 0, -
1228 0, -
1229 0, -
1230 0, -
1231 0, -
1232 0, -
1233 0, -
1234 0, -
1235 0, -
1236 0, -
1237 0 -
1238 }, -
1239 { -
1240 0, -
1241 0, -
1242 0, -
1243 0, -
1244 qt_transform_image_rgb32_on_rgb32, -
1245 0, -
1246 qt_transform_image_argb32_on_argb32, -
1247 0, -
1248 0, -
1249 0, -
1250 0, -
1251 0, -
1252 0, -
1253 0, -
1254 0, -
1255 0 -
1256 }, -
1257 { -
1258 0, -
1259 0, -
1260 0, -
1261 0, -
1262 0, -
1263 0, -
1264 qt_transform_image_argb32_on_rgb16, -
1265 qt_transform_image_rgb16_on_rgb16, -
1266 0, -
1267 0, -
1268 0, -
1269 0, -
1270 0, -
1271 0, -
1272 0, -
1273 0 -
1274 }, -
1275 { -
1276 0, -
1277 0, -
1278 0, -
1279 0, -
1280 0, -
1281 0, -
1282 0, -
1283 0, -
1284 0, -
1285 0, -
1286 0, -
1287 0, -
1288 0, -
1289 0, -
1290 0, -
1291 0 -
1292 }, -
1293 { -
1294 0, -
1295 0, -
1296 0, -
1297 0, -
1298 0, -
1299 0, -
1300 0, -
1301 0, -
1302 0, -
1303 0, -
1304 0, -
1305 0, -
1306 0, -
1307 0, -
1308 0, -
1309 0 -
1310 }, -
1311 { -
1312 0, -
1313 0, -
1314 0, -
1315 0, -
1316 0, -
1317 0, -
1318 0, -
1319 0, -
1320 0, -
1321 0, -
1322 0, -
1323 0, -
1324 0, -
1325 0, -
1326 0, -
1327 0 -
1328 }, -
1329 { -
1330 0, -
1331 0, -
1332 0, -
1333 0, -
1334 0, -
1335 0, -
1336 0, -
1337 0, -
1338 0, -
1339 0, -
1340 0, -
1341 0, -
1342 0, -
1343 0, -
1344 0, -
1345 0 -
1346 }, -
1347 { -
1348 0, -
1349 0, -
1350 0, -
1351 0, -
1352 0, -
1353 0, -
1354 0, -
1355 0, -
1356 0, -
1357 0, -
1358 0, -
1359 0, -
1360 0, -
1361 0, -
1362 0, -
1363 0 -
1364 }, -
1365 { -
1366 0, -
1367 0, -
1368 0, -
1369 0, -
1370 0, -
1371 0, -
1372 0, -
1373 0, -
1374 0, -
1375 0, -
1376 0, -
1377 0, -
1378 0, -
1379 0, -
1380 0, -
1381 0 -
1382 }, -
1383 { -
1384 0, -
1385 0, -
1386 0, -
1387 0, -
1388 0, -
1389 0, -
1390 0, -
1391 0, -
1392 0, -
1393 0, -
1394 0, -
1395 0, -
1396 0, -
1397 0, -
1398 0, -
1399 0 -
1400 }, -
1401 { -
1402 0, -
1403 0, -
1404 0, -
1405 0, -
1406 0, -
1407 0, -
1408 0, -
1409 0, -
1410 0, -
1411 0, -
1412 0, -
1413 0, -
1414 0, -
1415 0, -
1416 0, -
1417 0 -
1418 } -
1419}; -
1420 -
1421 -
1422 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial