Line | Source Code | Coverage |
---|
1 | /**************************************************************************** | - |
2 | ** | - |
3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). | - |
4 | ** Contact: http://www.qt-project.org/legal | - |
5 | ** | - |
6 | ** This file is part of the QtGui module of the Qt Toolkit. | - |
7 | ** | - |
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - |
9 | ** Commercial License Usage | - |
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
11 | ** accordance with the commercial license agreement provided with the | - |
12 | ** Software or, alternatively, in accordance with the terms contained in | - |
13 | ** a written agreement between you and Digia. For licensing terms and | - |
14 | ** conditions see http://qt.digia.com/licensing. For further information | - |
15 | ** use the contact form at http://qt.digia.com/contact-us. | - |
16 | ** | - |
17 | ** GNU Lesser General Public License Usage | - |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
19 | ** General Public License version 2.1 as published by the Free Software | - |
20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | - |
21 | ** packaging of this file. Please review the following information to | - |
22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | - |
23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - |
24 | ** | - |
25 | ** In addition, as a special exception, Digia gives you certain additional | - |
26 | ** rights. These rights are described in the Digia Qt LGPL Exception | - |
27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - |
28 | ** | - |
29 | ** GNU General Public License Usage | - |
30 | ** Alternatively, this file may be used under the terms of the GNU | - |
31 | ** General Public License version 3.0 as published by the Free Software | - |
32 | ** Foundation and appearing in the file LICENSE.GPL included in the | - |
33 | ** packaging of this file. Please review the following information to | - |
34 | ** ensure the GNU General Public License version 3.0 requirements will be | - |
35 | ** met: http://www.gnu.org/copyleft/gpl.html. | - |
36 | ** | - |
37 | ** | - |
38 | ** $QT_END_LICENSE$ | - |
39 | ** | - |
40 | ****************************************************************************/ | - |
41 | | - |
42 | #if defined(__OPTIMIZE__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) \ | - |
43 | && (__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__ >= 440) | - |
44 | // GCC 4.4 supports #pragma GCC optimize and #pragma GCC target | - |
45 | | - |
46 | # if (__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__ < 473) | - |
47 | // From GCC 4.7.3 onwards, GCC optimize can result in gcc bailing out with OOM | - |
48 | # pragma GCC optimize "O3" | - |
49 | # endif | - |
50 | | - |
51 | # if defined(__i386__) && defined(__SSE2__) && !defined(__SSE2_MATH__) | - |
52 | # pragma GCC target "fpmath=sse" | - |
53 | # endif | - |
54 | #endif | - |
55 | | - |
56 | #include <qstylehints.h> | - |
57 | #include <qguiapplication.h> | - |
58 | #include <qatomic.h> | - |
59 | #include <private/qdrawhelper_p.h> | - |
60 | #include <private/qpaintengine_raster_p.h> | - |
61 | #include <private/qpainter_p.h> | - |
62 | #include <private/qdrawhelper_x86_p.h> | - |
63 | #include <private/qdrawhelper_neon_p.h> | - |
64 | #if defined(QT_COMPILER_SUPPORTS_MIPS_DSP) || defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2) | - |
65 | #include <private/qdrawhelper_mips_dsp_p.h> | - |
66 | #endif | - |
67 | #include <private/qmath_p.h> | - |
68 | #include <private/qguiapplication_p.h> | - |
69 | #include <qmath.h> | - |
70 | | - |
71 | QT_BEGIN_NAMESPACE | - |
72 | | - |
73 | #define MASK(src, a) src = BYTE_MUL(src, a) | - |
74 | | - |
75 | /* | - |
76 | constants and structures | - |
77 | */ | - |
78 | | - |
79 | enum { | - |
80 | fixed_scale = 1 << 16, | - |
81 | half_point = 1 << 15 | - |
82 | }; | - |
83 | | - |
84 | // must be multiple of 4 for easier SIMD implementations | - |
85 | static const int buffer_size = 2048; | - |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
90 | // To convert in place, let 'dest' and 'src' be the same. | - |
91 | static const uint *QT_FASTCALL convertIndexedToARGB32PM(uint *buffer, const uint *src, int count, | - |
92 | const QPixelLayout *, const QRgb *clut) | - |
93 | { | - |
94 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:69009 | yes Evaluation Count:3393 |
| 3393-69009 |
95 | buffer[i] = PREMUL(clut[src[i]]); executed: buffer[i] = PREMUL(clut[src[i]]); Execution Count:69009 | 69009 |
96 | return buffer; executed: return buffer; Execution Count:3393 | 3393 |
97 | } | - |
98 | | - |
99 | static const uint *QT_FASTCALL convertPassThrough(uint *, const uint *src, int, | - |
100 | const QPixelLayout *, const QRgb *) | - |
101 | { | - |
102 | return src; executed: return src; Execution Count:45567 | 45567 |
103 | } | - |
104 | | - |
105 | static const uint *QT_FASTCALL convertRGB16ToARGB32PM(uint *buffer, const uint *src, int count, | - |
106 | const QPixelLayout *, const QRgb *) | - |
107 | { | - |
108 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:934240 | yes Evaluation Count:5603 |
| 5603-934240 |
109 | buffer[i] = qConvertRgb16To32(src[i]); executed: buffer[i] = qConvertRgb16To32(src[i]); Execution Count:934240 | 934240 |
110 | return buffer; executed: return buffer; Execution Count:5603 | 5603 |
111 | } | - |
112 | | - |
113 | static const uint *QT_FASTCALL convertARGB32ToARGB32PM(uint *buffer, const uint *src, int count, | - |
114 | const QPixelLayout *, const QRgb *) | - |
115 | { | - |
116 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:1431100 | yes Evaluation Count:16167 |
| 16167-1431100 |
117 | buffer[i] = PREMUL(src[i]); executed: buffer[i] = PREMUL(src[i]); Execution Count:1431100 | 1431100 |
118 | return buffer; executed: return buffer; Execution Count:16167 | 16167 |
119 | } | - |
120 | | - |
121 | static const uint *QT_FASTCALL convertToRGB32(uint *buffer, const uint *src, int count, | - |
122 | const QPixelLayout *layout, const QRgb *) | - |
123 | { | - |
124 | Q_ASSERT(layout->redWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
125 | Q_ASSERT(layout->greenWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
126 | Q_ASSERT(layout->blueWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
127 | Q_ASSERT(layout->alphaWidth == 0); executed (the execution status of this line is deduced): qt_noop(); | - |
128 | | - |
129 | const uint redMask = ((1 << layout->redWidth) - 1); executed (the execution status of this line is deduced): const uint redMask = ((1 << layout->redWidth) - 1); | - |
130 | const uint greenMask = ((1 << layout->greenWidth) - 1); executed (the execution status of this line is deduced): const uint greenMask = ((1 << layout->greenWidth) - 1); | - |
131 | const uint blueMask = ((1 << layout->blueWidth) - 1); executed (the execution status of this line is deduced): const uint blueMask = ((1 << layout->blueWidth) - 1); | - |
132 | | - |
133 | const uchar redLeftShift = 8 - layout->redWidth; executed (the execution status of this line is deduced): const uchar redLeftShift = 8 - layout->redWidth; | - |
134 | const uchar greenLeftShift = 8 - layout->greenWidth; executed (the execution status of this line is deduced): const uchar greenLeftShift = 8 - layout->greenWidth; | - |
135 | const uchar blueLeftShift = 8 - layout->blueWidth; executed (the execution status of this line is deduced): const uchar blueLeftShift = 8 - layout->blueWidth; | - |
136 | | - |
137 | const uchar redRightShift = 2 * layout->redWidth - 8; executed (the execution status of this line is deduced): const uchar redRightShift = 2 * layout->redWidth - 8; | - |
138 | const uchar greenRightShift = 2 * layout->greenWidth - 8; executed (the execution status of this line is deduced): const uchar greenRightShift = 2 * layout->greenWidth - 8; | - |
139 | const uchar blueRightShift = 2 * layout->blueWidth - 8; executed (the execution status of this line is deduced): const uchar blueRightShift = 2 * layout->blueWidth - 8; | - |
140 | | - |
141 | for (int i = 0; i < count; ++i) { evaluated: i < count yes Evaluation Count:6092321 | yes Evaluation Count:1088066 |
| 1088066-6092321 |
142 | uint red = (src[i] >> layout->redShift) & redMask; executed (the execution status of this line is deduced): uint red = (src[i] >> layout->redShift) & redMask; | - |
143 | uint green = (src[i] >> layout->greenShift) & greenMask; executed (the execution status of this line is deduced): uint green = (src[i] >> layout->greenShift) & greenMask; | - |
144 | uint blue = (src[i] >> layout->blueShift) & blueMask; executed (the execution status of this line is deduced): uint blue = (src[i] >> layout->blueShift) & blueMask; | - |
145 | | - |
146 | red = ((red << redLeftShift) | (red >> redRightShift)) << 16; executed (the execution status of this line is deduced): red = ((red << redLeftShift) | (red >> redRightShift)) << 16; | - |
147 | green = ((green << greenLeftShift) | (green >> greenRightShift)) << 8; executed (the execution status of this line is deduced): green = ((green << greenLeftShift) | (green >> greenRightShift)) << 8; | - |
148 | blue = (blue << blueLeftShift) | (blue >> blueRightShift); executed (the execution status of this line is deduced): blue = (blue << blueLeftShift) | (blue >> blueRightShift); | - |
149 | buffer[i] = 0xff000000 | red | green | blue; executed (the execution status of this line is deduced): buffer[i] = 0xff000000 | red | green | blue; | - |
150 | } executed: } Execution Count:6092321 | 6092321 |
151 | | - |
152 | return buffer; executed: return buffer; Execution Count:1088066 | 1088066 |
153 | } | - |
154 | | - |
155 | static const uint *QT_FASTCALL convertToARGB32PM(uint *buffer, const uint *src, int count, | - |
156 | const QPixelLayout *layout, const QRgb *) | - |
157 | { | - |
158 | Q_ASSERT(layout->redWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
159 | Q_ASSERT(layout->greenWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
160 | Q_ASSERT(layout->blueWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
161 | Q_ASSERT(layout->alphaWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
162 | | - |
163 | const uint redMask = ((1 << layout->redWidth) - 1); executed (the execution status of this line is deduced): const uint redMask = ((1 << layout->redWidth) - 1); | - |
164 | const uint greenMask = ((1 << layout->greenWidth) - 1); executed (the execution status of this line is deduced): const uint greenMask = ((1 << layout->greenWidth) - 1); | - |
165 | const uint blueMask = ((1 << layout->blueWidth) - 1); executed (the execution status of this line is deduced): const uint blueMask = ((1 << layout->blueWidth) - 1); | - |
166 | | - |
167 | const uchar redLeftShift = 8 - layout->redWidth; executed (the execution status of this line is deduced): const uchar redLeftShift = 8 - layout->redWidth; | - |
168 | const uchar greenLeftShift = 8 - layout->greenWidth; executed (the execution status of this line is deduced): const uchar greenLeftShift = 8 - layout->greenWidth; | - |
169 | const uchar blueLeftShift = 8 - layout->blueWidth; executed (the execution status of this line is deduced): const uchar blueLeftShift = 8 - layout->blueWidth; | - |
170 | | - |
171 | const uchar redRightShift = 2 * layout->redWidth - 8; executed (the execution status of this line is deduced): const uchar redRightShift = 2 * layout->redWidth - 8; | - |
172 | const uchar greenRightShift = 2 * layout->greenWidth - 8; executed (the execution status of this line is deduced): const uchar greenRightShift = 2 * layout->greenWidth - 8; | - |
173 | const uchar blueRightShift = 2 * layout->blueWidth - 8; executed (the execution status of this line is deduced): const uchar blueRightShift = 2 * layout->blueWidth - 8; | - |
174 | | - |
175 | const uint alphaMask = ((1 << layout->alphaWidth) - 1); executed (the execution status of this line is deduced): const uint alphaMask = ((1 << layout->alphaWidth) - 1); | - |
176 | const uchar alphaLeftShift = 8 - layout->alphaWidth; executed (the execution status of this line is deduced): const uchar alphaLeftShift = 8 - layout->alphaWidth; | - |
177 | const uchar alphaRightShift = 2 * layout->alphaWidth - 8; executed (the execution status of this line is deduced): const uchar alphaRightShift = 2 * layout->alphaWidth - 8; | - |
178 | | - |
179 | if (layout->premultiplied) { partially evaluated: layout->premultiplied yes Evaluation Count:449773 | no Evaluation Count:0 |
| 0-449773 |
180 | for (int i = 0; i < count; ++i) { evaluated: i < count yes Evaluation Count:3279420 | yes Evaluation Count:449773 |
| 449773-3279420 |
181 | uint alpha = (src[i] >> layout->alphaShift) & alphaMask; executed (the execution status of this line is deduced): uint alpha = (src[i] >> layout->alphaShift) & alphaMask; | - |
182 | uint red = (src[i] >> layout->redShift) & redMask; executed (the execution status of this line is deduced): uint red = (src[i] >> layout->redShift) & redMask; | - |
183 | uint green = (src[i] >> layout->greenShift) & greenMask; executed (the execution status of this line is deduced): uint green = (src[i] >> layout->greenShift) & greenMask; | - |
184 | uint blue = (src[i] >> layout->blueShift) & blueMask; executed (the execution status of this line is deduced): uint blue = (src[i] >> layout->blueShift) & blueMask; | - |
185 | | - |
186 | alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); executed (the execution status of this line is deduced): alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); | - |
187 | red = qMin(alpha, (red << redLeftShift) | (red >> redRightShift)); executed (the execution status of this line is deduced): red = qMin(alpha, (red << redLeftShift) | (red >> redRightShift)); | - |
188 | green = qMin(alpha, (green << greenLeftShift) | (green >> greenRightShift)); executed (the execution status of this line is deduced): green = qMin(alpha, (green << greenLeftShift) | (green >> greenRightShift)); | - |
189 | blue = qMin(alpha, (blue << blueLeftShift) | (blue >> blueRightShift)); executed (the execution status of this line is deduced): blue = qMin(alpha, (blue << blueLeftShift) | (blue >> blueRightShift)); | - |
190 | buffer[i] = (alpha << 24) | (red << 16) | (green << 8) | blue; executed (the execution status of this line is deduced): buffer[i] = (alpha << 24) | (red << 16) | (green << 8) | blue; | - |
191 | } executed: } Execution Count:3279420 | 3279420 |
192 | } else { executed: } Execution Count:449773 | 449773 |
193 | for (int i = 0; i < count; ++i) { never evaluated: i < count | 0 |
194 | uint alpha = (src[i] >> layout->alphaShift) & alphaMask; never executed (the execution status of this line is deduced): uint alpha = (src[i] >> layout->alphaShift) & alphaMask; | - |
195 | uint red = (src[i] >> layout->redShift) & redMask; never executed (the execution status of this line is deduced): uint red = (src[i] >> layout->redShift) & redMask; | - |
196 | uint green = (src[i] >> layout->greenShift) & greenMask; never executed (the execution status of this line is deduced): uint green = (src[i] >> layout->greenShift) & greenMask; | - |
197 | uint blue = (src[i] >> layout->blueShift) & blueMask; never executed (the execution status of this line is deduced): uint blue = (src[i] >> layout->blueShift) & blueMask; | - |
198 | | - |
199 | alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); never executed (the execution status of this line is deduced): alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); | - |
200 | red = (red << redLeftShift) | (red >> redRightShift); never executed (the execution status of this line is deduced): red = (red << redLeftShift) | (red >> redRightShift); | - |
201 | green = (green << greenLeftShift) | (green >> greenRightShift); never executed (the execution status of this line is deduced): green = (green << greenLeftShift) | (green >> greenRightShift); | - |
202 | blue = (blue << blueLeftShift) | (blue >> blueRightShift); never executed (the execution status of this line is deduced): blue = (blue << blueLeftShift) | (blue >> blueRightShift); | - |
203 | buffer[i] = PREMUL((alpha << 24) | (red << 16) | (green << 8) | blue); never executed (the execution status of this line is deduced): buffer[i] = PREMUL((alpha << 24) | (red << 16) | (green << 8) | blue); | - |
204 | } | 0 |
205 | } | 0 |
206 | return buffer; executed: return buffer; Execution Count:449773 | 449773 |
207 | } | - |
208 | | - |
209 | static const uint *QT_FASTCALL convertRGB16FromARGB32PM(uint *buffer, const uint *src, int count, | - |
210 | const QPixelLayout *, const QRgb *) | - |
211 | { | - |
212 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:242710 | yes Evaluation Count:5005 |
| 5005-242710 |
213 | buffer[i] = qConvertRgb32To16(INV_PREMUL(src[i])); executed: buffer[i] = qConvertRgb32To16((qAlpha(src[i]) == 0 ? 0 : ((qAlpha(src[i]) << 24) | (((255*qRed(src[i]))/ qAlpha(src[i])) << 16) | (((255*qGreen(src[i])) / qAlpha(src[i])) << 8) | ((255*qBlue(src[i])) / qAlpha(src[i]))))); Execution Count:242710 | 242710 |
214 | return buffer; executed: return buffer; Execution Count:5005 | 5005 |
215 | } | - |
216 | | - |
217 | static const uint *QT_FASTCALL convertARGB32FromARGB32PM(uint *buffer, const uint *src, int count, | - |
218 | const QPixelLayout *, const QRgb *) | - |
219 | { | - |
220 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:1885106 | yes Evaluation Count:45857 |
| 45857-1885106 |
221 | buffer[i] = INV_PREMUL(src[i]); executed: buffer[i] = (qAlpha(src[i]) == 0 ? 0 : ((qAlpha(src[i]) << 24) | (((255*qRed(src[i]))/ qAlpha(src[i])) << 16) | (((255*qGreen(src[i])) / qAlpha(src[i])) << 8) | ((255*qBlue(src[i])) / qAlpha(src[i])))); Execution Count:1885106 evaluated: qAlpha(src[i]) == 0 yes Evaluation Count:422700 | yes Evaluation Count:1462406 |
| 422700-1885106 |
222 | return buffer; executed: return buffer; Execution Count:45857 | 45857 |
223 | } | - |
224 | | - |
225 | static const uint *QT_FASTCALL convertFromARGB32PM(uint *buffer, const uint *src, int count, | - |
226 | const QPixelLayout *layout, const QRgb *) | - |
227 | { | - |
228 | Q_ASSERT(layout->redWidth <= 8); executed (the execution status of this line is deduced): qt_noop(); | - |
229 | Q_ASSERT(layout->greenWidth <= 8); executed (the execution status of this line is deduced): qt_noop(); | - |
230 | Q_ASSERT(layout->blueWidth <= 8); executed (the execution status of this line is deduced): qt_noop(); | - |
231 | Q_ASSERT(layout->alphaWidth <= 8); executed (the execution status of this line is deduced): qt_noop(); | - |
232 | | - |
233 | const uint redMask = (1 << layout->redWidth) - 1; executed (the execution status of this line is deduced): const uint redMask = (1 << layout->redWidth) - 1; | - |
234 | const uint greenMask = (1 << layout->greenWidth) - 1; executed (the execution status of this line is deduced): const uint greenMask = (1 << layout->greenWidth) - 1; | - |
235 | const uint blueMask = (1 << layout->blueWidth) - 1; executed (the execution status of this line is deduced): const uint blueMask = (1 << layout->blueWidth) - 1; | - |
236 | const uint alphaMask = (1 << layout->alphaWidth) - 1; executed (the execution status of this line is deduced): const uint alphaMask = (1 << layout->alphaWidth) - 1; | - |
237 | | - |
238 | const uchar redRightShift = 24 - layout->redWidth; executed (the execution status of this line is deduced): const uchar redRightShift = 24 - layout->redWidth; | - |
239 | const uchar greenRightShift = 16 - layout->greenWidth; executed (the execution status of this line is deduced): const uchar greenRightShift = 16 - layout->greenWidth; | - |
240 | const uchar blueRightShift = 8 - layout->blueWidth; executed (the execution status of this line is deduced): const uchar blueRightShift = 8 - layout->blueWidth; | - |
241 | const uchar alphaRightShift = 32 - layout->alphaWidth; executed (the execution status of this line is deduced): const uchar alphaRightShift = 32 - layout->alphaWidth; | - |
242 | | - |
243 | if (!layout->premultiplied) { evaluated: !layout->premultiplied yes Evaluation Count:104293 | yes Evaluation Count:62937 |
| 62937-104293 |
244 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:8235233 | yes Evaluation Count:104293 |
| 104293-8235233 |
245 | buffer[i] = qAlpha(src[i]) == 255 ? src[i] : INV_PREMUL(src[i]); executed: buffer[i] = qAlpha(src[i]) == 255 ? src[i] : (qAlpha(src[i]) == 0 ? 0 : ((qAlpha(src[i]) << 24) | (((255*qRed(src[i]))/ qAlpha(src[i])) << 16) | (((255*qGreen(src[i])) / qAlpha(src[i])) << 8) | ((255*qBlue(src[i])) / qAlpha(src[i])))); Execution Count:8235233 evaluated: qAlpha(src[i]) == 255 yes Evaluation Count:7952693 | yes Evaluation Count:282540 |
| 282540-8235233 |
246 | src = buffer; executed (the execution status of this line is deduced): src = buffer; | - |
247 | } executed: } Execution Count:104293 | 104293 |
248 | for (int i = 0; i < count; ++i) { evaluated: i < count yes Evaluation Count:12486467 | yes Evaluation Count:167230 |
| 167230-12486467 |
249 | uint red = ((src[i] >> redRightShift) & redMask) << layout->redShift; executed (the execution status of this line is deduced): uint red = ((src[i] >> redRightShift) & redMask) << layout->redShift; | - |
250 | uint green = ((src[i] >> greenRightShift) & greenMask) << layout->greenShift; executed (the execution status of this line is deduced): uint green = ((src[i] >> greenRightShift) & greenMask) << layout->greenShift; | - |
251 | uint blue = ((src[i] >> blueRightShift) & blueMask) << layout->blueShift; executed (the execution status of this line is deduced): uint blue = ((src[i] >> blueRightShift) & blueMask) << layout->blueShift; | - |
252 | uint alpha = ((src[i] >> alphaRightShift) & alphaMask) << layout->alphaShift; executed (the execution status of this line is deduced): uint alpha = ((src[i] >> alphaRightShift) & alphaMask) << layout->alphaShift; | - |
253 | buffer[i] = red | green | blue | alpha; executed (the execution status of this line is deduced): buffer[i] = red | green | blue | alpha; | - |
254 | } executed: } Execution Count:12486467 | 12486467 |
255 | return buffer; executed: return buffer; Execution Count:167230 | 167230 |
256 | } | - |
257 | | - |
258 | template <QPixelLayout::BPP bpp> static | - |
259 | uint QT_FASTCALL fetchPixel(const uchar *src, int index); | - |
260 | | - |
261 | template <> | - |
262 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP1LSB>(const uchar *src, int index) | - |
263 | { | - |
264 | return (src[index >> 3] >> (index & 7)) & 1; executed: return (src[index >> 3] >> (index & 7)) & 1; Execution Count:22984 | 22984 |
265 | } | - |
266 | | - |
267 | template <> | - |
268 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP1MSB>(const uchar *src, int index) | - |
269 | { | - |
270 | return (src[index >> 3] >> (~index & 7)) & 1; executed: return (src[index >> 3] >> (~index & 7)) & 1; Execution Count:23065 | 23065 |
271 | } | - |
272 | | - |
273 | template <> | - |
274 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP8>(const uchar *src, int index) | - |
275 | { | - |
276 | return src[index]; executed: return src[index]; Execution Count:22960 | 22960 |
277 | } | - |
278 | | - |
279 | template <> | - |
280 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP16>(const uchar *src, int index) | - |
281 | { | - |
282 | return reinterpret_cast<const quint16 *>(src)[index]; executed: return reinterpret_cast<const quint16 *>(src)[index]; Execution Count:3572749 | 3572749 |
283 | } | - |
284 | | - |
285 | template <> | - |
286 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP24>(const uchar *src, int index) | - |
287 | { | - |
288 | return reinterpret_cast<const quint24 *>(src)[index]; executed: return reinterpret_cast<const quint24 *>(src)[index]; Execution Count:6734832 | 6734832 |
289 | } | - |
290 | | - |
291 | template <> | - |
292 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP32>(const uchar *src, int index) | - |
293 | { | - |
294 | return reinterpret_cast<const uint *>(src)[index]; never executed: return reinterpret_cast<const uint *>(src)[index]; | 0 |
295 | } | - |
296 | | - |
297 | template <QPixelLayout::BPP bpp> | - |
298 | inline const uint *QT_FASTCALL fetchPixels(uint *buffer, const uchar *src, int index, int count) | - |
299 | { | - |
300 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:10374461 | yes Evaluation Count:1546778 |
| 1546778-10374461 |
301 | buffer[i] = fetchPixel<bpp>(src, index + i); executed: buffer[i] = fetchPixel<bpp>(src, index + i); Execution Count:10374461 | 10374461 |
302 | return buffer; executed: return buffer; Execution Count:1546778 | 1546778 |
303 | } | - |
304 | | - |
305 | template <> | - |
306 | inline const uint *QT_FASTCALL fetchPixels<QPixelLayout::BPP32>(uint *, const uchar *src, int index, int) | - |
307 | { | - |
308 | return reinterpret_cast<const uint *>(src) + index; executed: return reinterpret_cast<const uint *>(src) + index; Execution Count:50906 | 50906 |
309 | } | - |
310 | | - |
311 | template <QPixelLayout::BPP width> static | - |
312 | void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel); | - |
313 | | - |
314 | template <> | - |
315 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP1LSB>(uchar *dest, int index, uint pixel) | - |
316 | { | - |
317 | if (pixel) | 0 |
318 | dest[index >> 3] |= 1 << (index & 7); never executed: dest[index >> 3] |= 1 << (index & 7); | 0 |
319 | else | - |
320 | dest[index >> 3] &= ~(1 << (index & 7)); never executed: dest[index >> 3] &= ~(1 << (index & 7)); | 0 |
321 | } | - |
322 | | - |
323 | template <> | - |
324 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP1MSB>(uchar *dest, int index, uint pixel) | - |
325 | { | - |
326 | if (pixel) | 0 |
327 | dest[index >> 3] |= 1 << (~index & 7); never executed: dest[index >> 3] |= 1 << (~index & 7); | 0 |
328 | else | - |
329 | dest[index >> 3] &= ~(1 << (~index & 7)); never executed: dest[index >> 3] &= ~(1 << (~index & 7)); | 0 |
330 | } | - |
331 | | - |
332 | template <> | - |
333 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP8>(uchar *dest, int index, uint pixel) | - |
334 | { | - |
335 | dest[index] = uchar(pixel); never executed (the execution status of this line is deduced): dest[index] = uchar(pixel); | - |
336 | } | 0 |
337 | | - |
338 | template <> | - |
339 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP16>(uchar *dest, int index, uint pixel) | - |
340 | { | - |
341 | reinterpret_cast<quint16 *>(dest)[index] = quint16(pixel); executed (the execution status of this line is deduced): reinterpret_cast<quint16 *>(dest)[index] = quint16(pixel); | - |
342 | } executed: } Execution Count:3419198 | 3419198 |
343 | | - |
344 | template <> | - |
345 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP24>(uchar *dest, int index, uint pixel) | - |
346 | { | - |
347 | reinterpret_cast<quint24 *>(dest)[index] = quint24(pixel); executed (the execution status of this line is deduced): reinterpret_cast<quint24 *>(dest)[index] = quint24(pixel); | - |
348 | } executed: } Execution Count:9311579 | 9311579 |
349 | | - |
350 | template <> | - |
351 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP32>(uchar *dest, int index, uint pixel) | - |
352 | { | - |
353 | reinterpret_cast<uint *>(dest)[index] = pixel; never executed (the execution status of this line is deduced): reinterpret_cast<uint *>(dest)[index] = pixel; | - |
354 | } | 0 |
355 | | - |
356 | template <QPixelLayout::BPP width> | - |
357 | inline void QT_FASTCALL storePixels(uchar *dest, const uint *src, int index, int count) | - |
358 | { | - |
359 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:12730777 | yes Evaluation Count:172251 |
| 172251-12730777 |
360 | storePixel<width>(dest, index + i, src[i]); executed: storePixel<width>(dest, index + i, src[i]); Execution Count:12730777 | 12730777 |
361 | } executed: } Execution Count:172251 | 172251 |
362 | | - |
363 | template <> | - |
364 | inline void QT_FASTCALL storePixels<QPixelLayout::BPP32>(uchar *dest, const uint *src, int index, int count) | - |
365 | { | - |
366 | memcpy(reinterpret_cast<uint *>(dest) + index, src, count * sizeof(uint)); executed (the execution status of this line is deduced): memcpy(reinterpret_cast<uint *>(dest) + index, src, count * sizeof(uint)); | - |
367 | } executed: } Execution Count:56276 | 56276 |
368 | | - |
369 | // Note: | - |
370 | // convertToArgb32() assumes that no color channel is less than 4 bits. | - |
371 | // convertFromArgb32() assumes that no color channel is more than 8 bits. | - |
372 | // QImage::rgbSwapped() assumes that the red and blue color channels have the same number of bits. | - |
373 | QPixelLayout qPixelLayouts[QImage::NImageFormats] = { | - |
374 | { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPPNone, 0, 0 }, // Format_Invalid | - |
375 | { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1MSB, convertIndexedToARGB32PM, 0 }, // Format_Mono | - |
376 | { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1LSB, convertIndexedToARGB32PM, 0 }, // Format_MonoLSB | - |
377 | { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertIndexedToARGB32PM, 0 }, // Format_Indexed8 | - |
378 | { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP32, convertPassThrough, convertPassThrough }, // Format_RGB32 | - |
379 | { 8, 16, 8, 8, 8, 0, 8, 24, false, QPixelLayout::BPP32, convertARGB32ToARGB32PM, convertARGB32FromARGB32PM }, // Format_ARGB32 | - |
380 | { 8, 16, 8, 8, 8, 0, 8, 24, true, QPixelLayout::BPP32, convertPassThrough, convertPassThrough }, // Format_ARGB32_Premultiplied | - |
381 | { 5, 11, 6, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16, convertRGB16ToARGB32PM, convertRGB16FromARGB32PM }, // Format_RGB16 | - |
382 | { 5, 19, 6, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB8565_Premultiplied | - |
383 | { 6, 12, 6, 6, 6, 0, 0, 0, false, QPixelLayout::BPP24, convertToRGB32, convertFromARGB32PM }, // Format_RGB666 | - |
384 | { 6, 12, 6, 6, 6, 0, 6, 18, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB6666_Premultiplied | - |
385 | { 5, 10, 5, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16, convertToRGB32, convertFromARGB32PM }, // Format_RGB555 | - |
386 | { 5, 18, 5, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB8555_Premultiplied | - |
387 | { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP24, convertToRGB32, convertFromARGB32PM }, // Format_RGB888 | - |
388 | { 4, 8, 4, 4, 4, 0, 0, 0, false, QPixelLayout::BPP16, convertToRGB32, convertFromARGB32PM }, // Format_RGB444 | - |
389 | { 4, 8, 4, 4, 4, 0, 4, 12, true, QPixelLayout::BPP16, convertToARGB32PM, convertFromARGB32PM } // Format_ARGB4444_Premultiplied | - |
390 | }; | - |
391 | | - |
392 | FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { | - |
393 | 0, // BPPNone | - |
394 | fetchPixels<QPixelLayout::BPP1MSB>, // BPP1MSB | - |
395 | fetchPixels<QPixelLayout::BPP1LSB>, // BPP1LSB | - |
396 | fetchPixels<QPixelLayout::BPP8>, // BPP8 | - |
397 | fetchPixels<QPixelLayout::BPP16>, // BPP16 | - |
398 | fetchPixels<QPixelLayout::BPP24>, // BPP24 | - |
399 | fetchPixels<QPixelLayout::BPP32> // BPP32 | - |
400 | }; | - |
401 | | - |
402 | StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { | - |
403 | 0, // BPPNone | - |
404 | storePixels<QPixelLayout::BPP1MSB>, // BPP1MSB | - |
405 | storePixels<QPixelLayout::BPP1LSB>, // BPP1LSB | - |
406 | storePixels<QPixelLayout::BPP8>, // BPP8 | - |
407 | storePixels<QPixelLayout::BPP16>, // BPP16 | - |
408 | storePixels<QPixelLayout::BPP24>, // BPP24 | - |
409 | storePixels<QPixelLayout::BPP32> // BPP32 | - |
410 | }; | - |
411 | | - |
412 | typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index); | - |
413 | | - |
414 | FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = { | - |
415 | 0, // BPPNone | - |
416 | fetchPixel<QPixelLayout::BPP1MSB>, // BPP1MSB | - |
417 | fetchPixel<QPixelLayout::BPP1LSB>, // BPP1LSB | - |
418 | fetchPixel<QPixelLayout::BPP8>, // BPP8 | - |
419 | fetchPixel<QPixelLayout::BPP16>, // BPP16 | - |
420 | fetchPixel<QPixelLayout::BPP24>, // BPP24 | - |
421 | fetchPixel<QPixelLayout::BPP32> // BPP32 | - |
422 | }; | - |
423 | | - |
424 | /* | - |
425 | Destination fetch. This is simple as we don't have to do bounds checks or | - |
426 | transformations | - |
427 | */ | - |
428 | | - |
429 | static uint * QT_FASTCALL destFetchMono(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) | - |
430 | { | - |
431 | uchar *Q_DECL_RESTRICT data = (uchar *)rasterBuffer->scanLine(y); executed (the execution status of this line is deduced): uchar *__restrict__ data = (uchar *)rasterBuffer->scanLine(y); | - |
432 | uint *start = buffer; executed (the execution status of this line is deduced): uint *start = buffer; | - |
433 | const uint *end = buffer + length; executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
434 | while (buffer < end) { evaluated: buffer < end yes Evaluation Count:9885 | yes Evaluation Count:501 |
| 501-9885 |
435 | *buffer = data[x>>3] & (0x80 >> (x & 7)) ? rasterBuffer->destColor1 : rasterBuffer->destColor0; evaluated: data[x>>3] & (0x80 >> (x & 7)) yes Evaluation Count:27 | yes Evaluation Count:9858 |
| 27-9858 |
436 | ++buffer; executed (the execution status of this line is deduced): ++buffer; | - |
437 | ++x; executed (the execution status of this line is deduced): ++x; | - |
438 | } executed: } Execution Count:9885 | 9885 |
439 | return start; executed: return start; Execution Count:501 | 501 |
440 | } | - |
441 | | - |
442 | static uint * QT_FASTCALL destFetchMonoLsb(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) | - |
443 | { | - |
444 | uchar *Q_DECL_RESTRICT data = (uchar *)rasterBuffer->scanLine(y); executed (the execution status of this line is deduced): uchar *__restrict__ data = (uchar *)rasterBuffer->scanLine(y); | - |
445 | uint *start = buffer; executed (the execution status of this line is deduced): uint *start = buffer; | - |
446 | const uint *end = buffer + length; executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
447 | while (buffer < end) { evaluated: buffer < end yes Evaluation Count:107917 | yes Evaluation Count:98539 |
| 98539-107917 |
448 | *buffer = data[x>>3] & (0x1 << (x & 7)) ? rasterBuffer->destColor1 : rasterBuffer->destColor0; evaluated: data[x>>3] & (0x1 << (x & 7)) yes Evaluation Count:4802 | yes Evaluation Count:103115 |
| 4802-103115 |
449 | ++buffer; executed (the execution status of this line is deduced): ++buffer; | - |
450 | ++x; executed (the execution status of this line is deduced): ++x; | - |
451 | } executed: } Execution Count:107917 | 107917 |
452 | return start; executed: return start; Execution Count:98539 | 98539 |
453 | } | - |
454 | | - |
455 | static uint * QT_FASTCALL destFetchARGB32P(uint *, QRasterBuffer *rasterBuffer, int x, int y, int) | - |
456 | { | - |
457 | return (uint *)rasterBuffer->scanLine(y) + x; executed: return (uint *)rasterBuffer->scanLine(y) + x; Execution Count:113961 | 113961 |
458 | } | - |
459 | | - |
460 | static uint * QT_FASTCALL destFetchRGB16(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) | - |
461 | { | - |
462 | const ushort *Q_DECL_RESTRICT data = (const ushort *)rasterBuffer->scanLine(y) + x; executed (the execution status of this line is deduced): const ushort *__restrict__ data = (const ushort *)rasterBuffer->scanLine(y) + x; | - |
463 | for (int i = 0; i < length; ++i) evaluated: i < length yes Evaluation Count:9273799 | yes Evaluation Count:1045892 |
| 1045892-9273799 |
464 | buffer[i] = qConvertRgb16To32(data[i]); executed: buffer[i] = qConvertRgb16To32(data[i]); Execution Count:9273799 | 9273799 |
465 | return buffer; executed: return buffer; Execution Count:1045892 | 1045892 |
466 | } | - |
467 | | - |
468 | static uint *QT_FASTCALL destFetch(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) | - |
469 | { | - |
470 | const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; | - |
471 | const uint *ptr = qFetchPixels[layout->bpp](buffer, rasterBuffer->scanLine(y), x, length); executed (the execution status of this line is deduced): const uint *ptr = qFetchPixels[layout->bpp](buffer, rasterBuffer->scanLine(y), x, length); | - |
472 | return const_cast<uint *>(layout->convertToARGB32PM(buffer, ptr, length, layout, 0)); executed: return const_cast<uint *>(layout->convertToARGB32PM(buffer, ptr, length, layout, 0)); Execution Count:44952 | 44952 |
473 | } | - |
474 | | - |
475 | | - |
476 | static DestFetchProc destFetchProc[QImage::NImageFormats] = | - |
477 | { | - |
478 | 0, // Format_Invalid | - |
479 | destFetchMono, // Format_Mono, | - |
480 | destFetchMonoLsb, // Format_MonoLSB | - |
481 | 0, // Format_Indexed8 | - |
482 | destFetchARGB32P, // Format_RGB32 | - |
483 | destFetch, // Format_ARGB32, | - |
484 | destFetchARGB32P, // Format_ARGB32_Premultiplied | - |
485 | destFetchRGB16, // Format_RGB16 | - |
486 | destFetch, // Format_ARGB8565_Premultiplied | - |
487 | destFetch, // Format_RGB666 | - |
488 | destFetch, // Format_ARGB6666_Premultiplied | - |
489 | destFetch, // Format_RGB555 | - |
490 | destFetch, // Format_ARGB8555_Premultiplied | - |
491 | destFetch, // Format_RGB888 | - |
492 | destFetch, // Format_RGB444 | - |
493 | destFetch // Format_ARGB4444_Premultiplied | - |
494 | }; | - |
495 | | - |
496 | /* | - |
497 | Returns the color in the mono destination color table | - |
498 | that is the "nearest" to /color/. | - |
499 | */ | - |
500 | static inline QRgb findNearestColor(QRgb color, QRasterBuffer *rbuf) | - |
501 | { | - |
502 | QRgb color_0 = PREMUL(rbuf->destColor0); executed (the execution status of this line is deduced): QRgb color_0 = PREMUL(rbuf->destColor0); | - |
503 | QRgb color_1 = PREMUL(rbuf->destColor1); executed (the execution status of this line is deduced): QRgb color_1 = PREMUL(rbuf->destColor1); | - |
504 | color = PREMUL(color); executed (the execution status of this line is deduced): color = PREMUL(color); | - |
505 | | - |
506 | int r = qRed(color); executed (the execution status of this line is deduced): int r = qRed(color); | - |
507 | int g = qGreen(color); executed (the execution status of this line is deduced): int g = qGreen(color); | - |
508 | int b = qBlue(color); executed (the execution status of this line is deduced): int b = qBlue(color); | - |
509 | int rx, gx, bx; executed (the execution status of this line is deduced): int rx, gx, bx; | - |
510 | int dist_0, dist_1; executed (the execution status of this line is deduced): int dist_0, dist_1; | - |
511 | | - |
512 | rx = r - qRed(color_0); executed (the execution status of this line is deduced): rx = r - qRed(color_0); | - |
513 | gx = g - qGreen(color_0); executed (the execution status of this line is deduced): gx = g - qGreen(color_0); | - |
514 | bx = b - qBlue(color_0); executed (the execution status of this line is deduced): bx = b - qBlue(color_0); | - |
515 | dist_0 = rx*rx + gx*gx + bx*bx; executed (the execution status of this line is deduced): dist_0 = rx*rx + gx*gx + bx*bx; | - |
516 | | - |
517 | rx = r - qRed(color_1); executed (the execution status of this line is deduced): rx = r - qRed(color_1); | - |
518 | gx = g - qGreen(color_1); executed (the execution status of this line is deduced): gx = g - qGreen(color_1); | - |
519 | bx = b - qBlue(color_1); executed (the execution status of this line is deduced): bx = b - qBlue(color_1); | - |
520 | dist_1 = rx*rx + gx*gx + bx*bx; executed (the execution status of this line is deduced): dist_1 = rx*rx + gx*gx + bx*bx; | - |
521 | | - |
522 | if (dist_0 < dist_1) partially evaluated: dist_0 < dist_1 no Evaluation Count:0 | yes Evaluation Count:4820 |
| 0-4820 |
523 | return color_0; never executed: return color_0; | 0 |
524 | return color_1; executed: return color_1; Execution Count:4820 | 4820 |
525 | } | - |
526 | | - |
527 | /* | - |
528 | Destination store. | - |
529 | */ | - |
530 | | - |
531 | static void QT_FASTCALL destStoreMono(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) | - |
532 | { | - |
533 | uchar *Q_DECL_RESTRICT data = (uchar *)rasterBuffer->scanLine(y); executed (the execution status of this line is deduced): uchar *__restrict__ data = (uchar *)rasterBuffer->scanLine(y); | - |
534 | if (rasterBuffer->monoDestinationWithClut) { partially evaluated: rasterBuffer->monoDestinationWithClut yes Evaluation Count:1288 | no Evaluation Count:0 |
| 0-1288 |
535 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:45095 | yes Evaluation Count:1288 |
| 1288-45095 |
536 | if (buffer[i] == rasterBuffer->destColor0) { evaluated: buffer[i] == rasterBuffer->destColor0 yes Evaluation Count:82 | yes Evaluation Count:45013 |
| 82-45013 |
537 | data[x >> 3] &= ~(0x80 >> (x & 7)); executed (the execution status of this line is deduced): data[x >> 3] &= ~(0x80 >> (x & 7)); | - |
538 | } else if (buffer[i] == rasterBuffer->destColor1) { executed: } Execution Count:82 evaluated: buffer[i] == rasterBuffer->destColor1 yes Evaluation Count:44977 | yes Evaluation Count:36 |
| 36-44977 |
539 | data[x >> 3] |= 0x80 >> (x & 7); executed (the execution status of this line is deduced): data[x >> 3] |= 0x80 >> (x & 7); | - |
540 | } else if (findNearestColor(buffer[i], rasterBuffer) == rasterBuffer->destColor0) { executed: } Execution Count:44977 partially evaluated: findNearestColor(buffer[i], rasterBuffer) == rasterBuffer->destColor0 yes Evaluation Count:36 | no Evaluation Count:0 |
| 0-44977 |
541 | data[x >> 3] &= ~(0x80 >> (x & 7)); executed (the execution status of this line is deduced): data[x >> 3] &= ~(0x80 >> (x & 7)); | - |
542 | } else { executed: } Execution Count:36 | 36 |
543 | data[x >> 3] |= 0x80 >> (x & 7); never executed (the execution status of this line is deduced): data[x >> 3] |= 0x80 >> (x & 7); | - |
544 | } | 0 |
545 | ++x; executed (the execution status of this line is deduced): ++x; | - |
546 | } executed: } Execution Count:45095 | 45095 |
547 | } else { executed: } Execution Count:1288 | 1288 |
548 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
549 | if (qGray(buffer[i]) < int(qt_bayer_matrix[y & 15][x & 15])) never evaluated: qGray(buffer[i]) < int(qt_bayer_matrix[y & 15][x & 15]) | 0 |
550 | data[x >> 3] |= 0x80 >> (x & 7); never executed: data[x >> 3] |= 0x80 >> (x & 7); | 0 |
551 | else | - |
552 | data[x >> 3] &= ~(0x80 >> (x & 7)); never executed: data[x >> 3] &= ~(0x80 >> (x & 7)); | 0 |
553 | ++x; never executed (the execution status of this line is deduced): ++x; | - |
554 | } | 0 |
555 | } | 0 |
556 | } | - |
557 | | - |
558 | static void QT_FASTCALL destStoreMonoLsb(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) | - |
559 | { | - |
560 | uchar *Q_DECL_RESTRICT data = (uchar *)rasterBuffer->scanLine(y); executed (the execution status of this line is deduced): uchar *__restrict__ data = (uchar *)rasterBuffer->scanLine(y); | - |
561 | if (rasterBuffer->monoDestinationWithClut) { partially evaluated: rasterBuffer->monoDestinationWithClut yes Evaluation Count:133696 | no Evaluation Count:0 |
| 0-133696 |
562 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:214899 | yes Evaluation Count:133696 |
| 133696-214899 |
563 | if (buffer[i] == rasterBuffer->destColor0) { evaluated: buffer[i] == rasterBuffer->destColor0 yes Evaluation Count:158833 | yes Evaluation Count:56066 |
| 56066-158833 |
564 | data[x >> 3] &= ~(1 << (x & 7)); executed (the execution status of this line is deduced): data[x >> 3] &= ~(1 << (x & 7)); | - |
565 | } else if (buffer[i] == rasterBuffer->destColor1) { executed: } Execution Count:158833 evaluated: buffer[i] == rasterBuffer->destColor1 yes Evaluation Count:51282 | yes Evaluation Count:4784 |
| 4784-158833 |
566 | data[x >> 3] |= 1 << (x & 7); executed (the execution status of this line is deduced): data[x >> 3] |= 1 << (x & 7); | - |
567 | } else if (findNearestColor(buffer[i], rasterBuffer) == rasterBuffer->destColor0) { executed: } Execution Count:51282 partially evaluated: findNearestColor(buffer[i], rasterBuffer) == rasterBuffer->destColor0 no Evaluation Count:0 | yes Evaluation Count:4784 |
| 0-51282 |
568 | data[x >> 3] &= ~(1 << (x & 7)); never executed (the execution status of this line is deduced): data[x >> 3] &= ~(1 << (x & 7)); | - |
569 | } else { | 0 |
570 | data[x >> 3] |= 1 << (x & 7); executed (the execution status of this line is deduced): data[x >> 3] |= 1 << (x & 7); | - |
571 | } executed: } Execution Count:4784 | 4784 |
572 | ++x; executed (the execution status of this line is deduced): ++x; | - |
573 | } executed: } Execution Count:214899 | 214899 |
574 | } else { executed: } Execution Count:133696 | 133696 |
575 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
576 | if (qGray(buffer[i]) < int(qt_bayer_matrix[y & 15][x & 15])) never evaluated: qGray(buffer[i]) < int(qt_bayer_matrix[y & 15][x & 15]) | 0 |
577 | data[x >> 3] |= 1 << (x & 7); never executed: data[x >> 3] |= 1 << (x & 7); | 0 |
578 | else | - |
579 | data[x >> 3] &= ~(1 << (x & 7)); never executed: data[x >> 3] &= ~(1 << (x & 7)); | 0 |
580 | ++x; never executed (the execution status of this line is deduced): ++x; | - |
581 | } | 0 |
582 | } | 0 |
583 | } | - |
584 | | - |
585 | static void QT_FASTCALL destStoreRGB16(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) | - |
586 | { | - |
587 | quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x; executed (the execution status of this line is deduced): quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x; | - |
588 | for (int i = 0; i < length; ++i) evaluated: i < length yes Evaluation Count:9735058 | yes Evaluation Count:1071868 |
| 1071868-9735058 |
589 | data[i] = qConvertRgb32To16(buffer[i]); executed: data[i] = qConvertRgb32To16(buffer[i]); Execution Count:9735058 | 9735058 |
590 | } executed: } Execution Count:1071868 | 1071868 |
591 | | - |
592 | static void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) | - |
593 | { | - |
594 | uint buf[buffer_size]; executed (the execution status of this line is deduced): uint buf[buffer_size]; | - |
595 | const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; | - |
596 | StorePixelsFunc store = qStorePixels[layout->bpp]; executed (the execution status of this line is deduced): StorePixelsFunc store = qStorePixels[layout->bpp]; | - |
597 | uchar *dest = rasterBuffer->scanLine(y); executed (the execution status of this line is deduced): uchar *dest = rasterBuffer->scanLine(y); | - |
598 | while (length) { evaluated: length yes Evaluation Count:150341 | yes Evaluation Count:150341 |
| 150341 |
599 | int l = qMin(length, buffer_size); executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
600 | const uint *ptr = layout->convertFromARGB32PM(buf, buffer, l, layout, 0); executed (the execution status of this line is deduced): const uint *ptr = layout->convertFromARGB32PM(buf, buffer, l, layout, 0); | - |
601 | store(dest, ptr, x, l); executed (the execution status of this line is deduced): store(dest, ptr, x, l); | - |
602 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
603 | buffer += l; executed (the execution status of this line is deduced): buffer += l; | - |
604 | x += l; executed (the execution status of this line is deduced): x += l; | - |
605 | } executed: } Execution Count:150341 | 150341 |
606 | } executed: } Execution Count:150341 | 150341 |
607 | | - |
608 | static DestStoreProc destStoreProc[QImage::NImageFormats] = | - |
609 | { | - |
610 | 0, // Format_Invalid | - |
611 | destStoreMono, // Format_Mono, | - |
612 | destStoreMonoLsb, // Format_MonoLSB | - |
613 | 0, // Format_Indexed8 | - |
614 | 0, // Format_RGB32 | - |
615 | destStore, // Format_ARGB32, | - |
616 | 0, // Format_ARGB32_Premultiplied | - |
617 | destStoreRGB16, // Format_RGB16 | - |
618 | destStore, // Format_ARGB8565_Premultiplied | - |
619 | destStore, // Format_RGB666 | - |
620 | destStore, // Format_ARGB6666_Premultiplied | - |
621 | destStore, // Format_RGB555 | - |
622 | destStore, // Format_ARGB8555_Premultiplied | - |
623 | destStore, // Format_RGB888 | - |
624 | destStore, // Format_RGB444 | - |
625 | destStore // Format_ARGB4444_Premultiplied | - |
626 | }; | - |
627 | | - |
628 | /* | - |
629 | Source fetches | - |
630 | | - |
631 | This is a bit more complicated, as we need several fetch routines for every surface type | - |
632 | | - |
633 | We need 5 fetch methods per surface type: | - |
634 | untransformed | - |
635 | transformed (tiled and not tiled) | - |
636 | transformed bilinear (tiled and not tiled) | - |
637 | | - |
638 | We don't need bounds checks for untransformed, but we need them for the other ones. | - |
639 | | - |
640 | The generic implementation does pixel by pixel fetches | - |
641 | */ | - |
642 | | - |
643 | enum TextureBlendType { | - |
644 | BlendUntransformed, | - |
645 | BlendTiled, | - |
646 | BlendTransformed, | - |
647 | BlendTransformedTiled, | - |
648 | BlendTransformedBilinear, | - |
649 | BlendTransformedBilinearTiled, | - |
650 | NBlendTypes | - |
651 | }; | - |
652 | | - |
653 | static const uint *QT_FASTCALL fetchUntransformed(uint *buffer, const Operator *, | - |
654 | const QSpanData *data, int y, int x, int length) | - |
655 | { | - |
656 | const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; | - |
657 | const uint *ptr = qFetchPixels[layout->bpp](buffer, data->texture.scanLine(y), x, length); executed (the execution status of this line is deduced): const uint *ptr = qFetchPixels[layout->bpp](buffer, data->texture.scanLine(y), x, length); | - |
658 | const QRgb *clut = data->texture.colorTable ? data->texture.colorTable->constData() : 0; evaluated: data->texture.colorTable yes Evaluation Count:3384 | yes Evaluation Count:53928 |
| 3384-53928 |
659 | return layout->convertToARGB32PM(buffer, ptr, length, layout, clut); executed: return layout->convertToARGB32PM(buffer, ptr, length, layout, clut); Execution Count:57312 | 57312 |
660 | } | - |
661 | | - |
662 | static const uint *QT_FASTCALL fetchUntransformedARGB32PM(uint *, const Operator *, | - |
663 | const QSpanData *data, int y, int x, int) | - |
664 | { | - |
665 | const uchar *scanLine = data->texture.scanLine(y); executed (the execution status of this line is deduced): const uchar *scanLine = data->texture.scanLine(y); | - |
666 | return ((const uint *)scanLine) + x; executed: return ((const uint *)scanLine) + x; Execution Count:1108195 | 1108195 |
667 | } | - |
668 | | - |
669 | static const uint *QT_FASTCALL fetchUntransformedRGB16(uint *buffer, const Operator *, | - |
670 | const QSpanData *data, int y, int x, | - |
671 | int length) | - |
672 | { | - |
673 | const quint16 *scanLine = (const quint16 *)data->texture.scanLine(y) + x; executed (the execution status of this line is deduced): const quint16 *scanLine = (const quint16 *)data->texture.scanLine(y) + x; | - |
674 | #ifdef QT_COMPILER_SUPPORTS_MIPS_DSPR2 | - |
675 | qConvertRgb16To32_asm_mips_dspr2(buffer, scanLine, length); | - |
676 | #else | - |
677 | for (int i = 0; i < length; ++i) evaluated: i < length yes Evaluation Count:279512 | yes Evaluation Count:4124 |
| 4124-279512 |
678 | buffer[i] = qConvertRgb16To32(scanLine[i]); executed: buffer[i] = qConvertRgb16To32(scanLine[i]); Execution Count:279512 | 279512 |
679 | #endif | - |
680 | return buffer; executed: return buffer; Execution Count:4124 | 4124 |
681 | } | - |
682 | | - |
683 | // blendType is either BlendTransformed or BlendTransformedTiled | - |
684 | template<TextureBlendType blendType> | - |
685 | static const uint *QT_FASTCALL fetchTransformedARGB32PM(uint *buffer, const Operator *, const QSpanData *data, | - |
686 | int y, int x, int length) | - |
687 | { | - |
688 | int image_width = data->texture.width; never executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
689 | int image_height = data->texture.height; never executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
690 | | - |
691 | const qreal cx = x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = x + qreal(0.5); | - |
692 | const qreal cy = y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = y + qreal(0.5); | - |
693 | | - |
694 | const uint *end = buffer + length; never executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
695 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
696 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
697 | // The increment pr x in the scanline | - |
698 | int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
699 | int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
700 | | - |
701 | int fx = int((data->m21 * cy never executed (the execution status of this line is deduced): int fx = int((data->m21 * cy | - |
702 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
703 | int fy = int((data->m22 * cy never executed (the execution status of this line is deduced): int fy = int((data->m22 * cy | - |
704 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
705 | | - |
706 | while (b < end) { | 0 |
707 | int px = fx >> 16; never executed (the execution status of this line is deduced): int px = fx >> 16; | - |
708 | int py = fy >> 16; never executed (the execution status of this line is deduced): int py = fy >> 16; | - |
709 | | - |
710 | if (blendType == BlendTransformedTiled) { never evaluated: blendType == BlendTransformedTiled | 0 |
711 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
712 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
713 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
714 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
715 | } else { | 0 |
716 | px = qBound(0, px, image_width - 1); never executed (the execution status of this line is deduced): px = qBound(0, px, image_width - 1); | - |
717 | py = qBound(0, py, image_height - 1); never executed (the execution status of this line is deduced): py = qBound(0, py, image_height - 1); | - |
718 | } | 0 |
719 | *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px]; | - |
720 | | - |
721 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
722 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
723 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
724 | } | 0 |
725 | } else { | 0 |
726 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
727 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
728 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
729 | | - |
730 | qreal fx = data->m21 * cy + data->m11 * cx + data->dx; never executed (the execution status of this line is deduced): qreal fx = data->m21 * cy + data->m11 * cx + data->dx; | - |
731 | qreal fy = data->m22 * cy + data->m12 * cx + data->dy; never executed (the execution status of this line is deduced): qreal fy = data->m22 * cy + data->m12 * cx + data->dy; | - |
732 | qreal fw = data->m23 * cy + data->m13 * cx + data->m33; never executed (the execution status of this line is deduced): qreal fw = data->m23 * cy + data->m13 * cx + data->m33; | - |
733 | | - |
734 | while (b < end) { | 0 |
735 | const qreal iw = fw == 0 ? 1 : 1 / fw; | 0 |
736 | const qreal tx = fx * iw; never executed (the execution status of this line is deduced): const qreal tx = fx * iw; | - |
737 | const qreal ty = fy * iw; never executed (the execution status of this line is deduced): const qreal ty = fy * iw; | - |
738 | int px = int(tx) - (tx < 0); never executed (the execution status of this line is deduced): int px = int(tx) - (tx < 0); | - |
739 | int py = int(ty) - (ty < 0); never executed (the execution status of this line is deduced): int py = int(ty) - (ty < 0); | - |
740 | | - |
741 | if (blendType == BlendTransformedTiled) { never evaluated: blendType == BlendTransformedTiled | 0 |
742 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
743 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
744 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
745 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
746 | } else { | 0 |
747 | px = qBound(0, px, image_width - 1); never executed (the execution status of this line is deduced): px = qBound(0, px, image_width - 1); | - |
748 | py = qBound(0, py, image_height - 1); never executed (the execution status of this line is deduced): py = qBound(0, py, image_height - 1); | - |
749 | } | 0 |
750 | *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px]; | - |
751 | | - |
752 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
753 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
754 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
755 | //force increment to avoid /0 | - |
756 | if (!fw) { | 0 |
757 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
758 | } | 0 |
759 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
760 | } | 0 |
761 | } | 0 |
762 | return buffer; never executed: return buffer; | 0 |
763 | } | - |
764 | | - |
765 | template<TextureBlendType blendType> /* either BlendTransformed or BlendTransformedTiled */ | - |
766 | static const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const QSpanData *data, | - |
767 | int y, int x, int length) | - |
768 | { | - |
769 | int image_width = data->texture.width; executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
770 | int image_height = data->texture.height; executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
771 | | - |
772 | const qreal cx = x + qreal(0.5); executed (the execution status of this line is deduced): const qreal cx = x + qreal(0.5); | - |
773 | const qreal cy = y + qreal(0.5); executed (the execution status of this line is deduced): const qreal cy = y + qreal(0.5); | - |
774 | | - |
775 | const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; | - |
776 | FetchPixelFunc fetch = qFetchPixel[layout->bpp]; executed (the execution status of this line is deduced): FetchPixelFunc fetch = qFetchPixel[layout->bpp]; | - |
777 | | - |
778 | const uint *end = buffer + length; executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
779 | uint *b = buffer; executed (the execution status of this line is deduced): uint *b = buffer; | - |
780 | if (data->fast_matrix) { partially evaluated: data->fast_matrix yes Evaluation Count:73 | no Evaluation Count:0 |
| 0-73 |
781 | // The increment pr x in the scanline | - |
782 | int fdx = (int)(data->m11 * fixed_scale); executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
783 | int fdy = (int)(data->m12 * fixed_scale); executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
784 | | - |
785 | int fx = int((data->m21 * cy executed (the execution status of this line is deduced): int fx = int((data->m21 * cy | - |
786 | + data->m11 * cx + data->dx) * fixed_scale); executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
787 | int fy = int((data->m22 * cy executed (the execution status of this line is deduced): int fy = int((data->m22 * cy | - |
788 | + data->m12 * cx + data->dy) * fixed_scale); executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
789 | | - |
790 | while (b < end) { evaluated: b < end yes Evaluation Count:2129 | yes Evaluation Count:73 |
| 73-2129 |
791 | int px = fx >> 16; executed (the execution status of this line is deduced): int px = fx >> 16; | - |
792 | int py = fy >> 16; executed (the execution status of this line is deduced): int py = fy >> 16; | - |
793 | | - |
794 | if (blendType == BlendTransformedTiled) { partially evaluated: blendType == BlendTransformedTiled no Evaluation Count:0 | yes Evaluation Count:2129 |
| 0-2129 |
795 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
796 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
797 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
798 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
799 | } else { | 0 |
800 | px = qBound(0, px, image_width - 1); executed (the execution status of this line is deduced): px = qBound(0, px, image_width - 1); | - |
801 | py = qBound(0, py, image_height - 1); executed (the execution status of this line is deduced): py = qBound(0, py, image_height - 1); | - |
802 | } executed: } Execution Count:2129 | 2129 |
803 | *b = fetch(data->texture.scanLine(py), px); executed (the execution status of this line is deduced): *b = fetch(data->texture.scanLine(py), px); | - |
804 | | - |
805 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
806 | fy += fdy; executed (the execution status of this line is deduced): fy += fdy; | - |
807 | ++b; executed (the execution status of this line is deduced): ++b; | - |
808 | } executed: } Execution Count:2129 | 2129 |
809 | } else { executed: } Execution Count:73 | 73 |
810 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
811 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
812 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
813 | | - |
814 | qreal fx = data->m21 * cy + data->m11 * cx + data->dx; never executed (the execution status of this line is deduced): qreal fx = data->m21 * cy + data->m11 * cx + data->dx; | - |
815 | qreal fy = data->m22 * cy + data->m12 * cx + data->dy; never executed (the execution status of this line is deduced): qreal fy = data->m22 * cy + data->m12 * cx + data->dy; | - |
816 | qreal fw = data->m23 * cy + data->m13 * cx + data->m33; never executed (the execution status of this line is deduced): qreal fw = data->m23 * cy + data->m13 * cx + data->m33; | - |
817 | | - |
818 | while (b < end) { | 0 |
819 | const qreal iw = fw == 0 ? 1 : 1 / fw; | 0 |
820 | const qreal tx = fx * iw; never executed (the execution status of this line is deduced): const qreal tx = fx * iw; | - |
821 | const qreal ty = fy * iw; never executed (the execution status of this line is deduced): const qreal ty = fy * iw; | - |
822 | int px = int(tx) - (tx < 0); never executed (the execution status of this line is deduced): int px = int(tx) - (tx < 0); | - |
823 | int py = int(ty) - (ty < 0); never executed (the execution status of this line is deduced): int py = int(ty) - (ty < 0); | - |
824 | | - |
825 | if (blendType == BlendTransformedTiled) { never evaluated: blendType == BlendTransformedTiled | 0 |
826 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
827 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
828 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
829 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
830 | } else { | 0 |
831 | px = qBound(0, px, image_width - 1); never executed (the execution status of this line is deduced): px = qBound(0, px, image_width - 1); | - |
832 | py = qBound(0, py, image_height - 1); never executed (the execution status of this line is deduced): py = qBound(0, py, image_height - 1); | - |
833 | } | 0 |
834 | *b = fetch(data->texture.scanLine(py), px); never executed (the execution status of this line is deduced): *b = fetch(data->texture.scanLine(py), px); | - |
835 | | - |
836 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
837 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
838 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
839 | //force increment to avoid /0 | - |
840 | if (!fw) { | 0 |
841 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
842 | } | 0 |
843 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
844 | } | 0 |
845 | } | 0 |
846 | const QRgb *clut = data->texture.colorTable ? data->texture.colorTable->constData() : 0; evaluated: data->texture.colorTable yes Evaluation Count:9 | yes Evaluation Count:64 |
| 9-64 |
847 | return layout->convertToARGB32PM(buffer, buffer, length, layout, clut); executed: return layout->convertToARGB32PM(buffer, buffer, length, layout, clut); Execution Count:73 | 73 |
848 | } | - |
849 | | - |
850 | /** \internal | - |
851 | interpolate 4 argb pixels with the distx and disty factor. | - |
852 | distx and disty bust be between 0 and 16 | - |
853 | */ | - |
854 | static inline uint interpolate_4_pixels_16(uint tl, uint tr, uint bl, uint br, int distx, int disty) | - |
855 | { | - |
856 | uint distxy = distx * disty; executed (the execution status of this line is deduced): uint distxy = distx * disty; | - |
857 | //idistx * disty = (16-distx) * disty = 16*disty - distxy | - |
858 | //idistx * idisty = (16-distx) * (16-disty) = 16*16 - 16*distx -16*dity + distxy | - |
859 | uint tlrb = (tl & 0x00ff00ff) * (16*16 - 16*distx - 16*disty + distxy); executed (the execution status of this line is deduced): uint tlrb = (tl & 0x00ff00ff) * (16*16 - 16*distx - 16*disty + distxy); | - |
860 | uint tlag = ((tl & 0xff00ff00) >> 8) * (16*16 - 16*distx - 16*disty + distxy); executed (the execution status of this line is deduced): uint tlag = ((tl & 0xff00ff00) >> 8) * (16*16 - 16*distx - 16*disty + distxy); | - |
861 | uint trrb = ((tr & 0x00ff00ff) * (distx*16 - distxy)); executed (the execution status of this line is deduced): uint trrb = ((tr & 0x00ff00ff) * (distx*16 - distxy)); | - |
862 | uint trag = (((tr & 0xff00ff00) >> 8) * (distx*16 - distxy)); executed (the execution status of this line is deduced): uint trag = (((tr & 0xff00ff00) >> 8) * (distx*16 - distxy)); | - |
863 | uint blrb = ((bl & 0x00ff00ff) * (disty*16 - distxy)); executed (the execution status of this line is deduced): uint blrb = ((bl & 0x00ff00ff) * (disty*16 - distxy)); | - |
864 | uint blag = (((bl & 0xff00ff00) >> 8) * (disty*16 - distxy)); executed (the execution status of this line is deduced): uint blag = (((bl & 0xff00ff00) >> 8) * (disty*16 - distxy)); | - |
865 | uint brrb = ((br & 0x00ff00ff) * (distxy)); executed (the execution status of this line is deduced): uint brrb = ((br & 0x00ff00ff) * (distxy)); | - |
866 | uint brag = (((br & 0xff00ff00) >> 8) * (distxy)); executed (the execution status of this line is deduced): uint brag = (((br & 0xff00ff00) >> 8) * (distxy)); | - |
867 | return (((tlrb + trrb + blrb + brrb) >> 8) & 0x00ff00ff) | ((tlag + trag + blag + brag) & 0xff00ff00); executed: return (((tlrb + trrb + blrb + brrb) >> 8) & 0x00ff00ff) | ((tlag + trag + blag + brag) & 0xff00ff00); Execution Count:66942 | 66942 |
868 | } | - |
869 | | - |
870 | #if defined(__SSE2__) | - |
871 | #define interpolate_4_pixels_16_sse2(tl, tr, bl, br, distx, disty, colorMask, v_256, b) \ | - |
872 | { \ | - |
873 | const __m128i dxdy = _mm_mullo_epi16 (distx, disty); \ | - |
874 | const __m128i distx_ = _mm_slli_epi16(distx, 4); \ | - |
875 | const __m128i disty_ = _mm_slli_epi16(disty, 4); \ | - |
876 | const __m128i idxidy = _mm_add_epi16(dxdy, _mm_sub_epi16(v_256, _mm_add_epi16(distx_, disty_))); \ | - |
877 | const __m128i dxidy = _mm_sub_epi16(distx_, dxdy); \ | - |
878 | const __m128i idxdy = _mm_sub_epi16(disty_, dxdy); \ | - |
879 | \ | - |
880 | __m128i tlAG = _mm_srli_epi16(tl, 8); \ | - |
881 | __m128i tlRB = _mm_and_si128(tl, colorMask); \ | - |
882 | __m128i trAG = _mm_srli_epi16(tr, 8); \ | - |
883 | __m128i trRB = _mm_and_si128(tr, colorMask); \ | - |
884 | __m128i blAG = _mm_srli_epi16(bl, 8); \ | - |
885 | __m128i blRB = _mm_and_si128(bl, colorMask); \ | - |
886 | __m128i brAG = _mm_srli_epi16(br, 8); \ | - |
887 | __m128i brRB = _mm_and_si128(br, colorMask); \ | - |
888 | \ | - |
889 | tlAG = _mm_mullo_epi16(tlAG, idxidy); \ | - |
890 | tlRB = _mm_mullo_epi16(tlRB, idxidy); \ | - |
891 | trAG = _mm_mullo_epi16(trAG, dxidy); \ | - |
892 | trRB = _mm_mullo_epi16(trRB, dxidy); \ | - |
893 | blAG = _mm_mullo_epi16(blAG, idxdy); \ | - |
894 | blRB = _mm_mullo_epi16(blRB, idxdy); \ | - |
895 | brAG = _mm_mullo_epi16(brAG, dxdy); \ | - |
896 | brRB = _mm_mullo_epi16(brRB, dxdy); \ | - |
897 | \ | - |
898 | /* Add the values, and shift to only keep 8 significant bits per colors */ \ | - |
899 | __m128i rAG =_mm_add_epi16(_mm_add_epi16(tlAG, trAG), _mm_add_epi16(blAG, brAG)); \ | - |
900 | __m128i rRB =_mm_add_epi16(_mm_add_epi16(tlRB, trRB), _mm_add_epi16(blRB, brRB)); \ | - |
901 | rAG = _mm_andnot_si128(colorMask, rAG); \ | - |
902 | rRB = _mm_srli_epi16(rRB, 8); \ | - |
903 | _mm_storeu_si128((__m128i*)(b), _mm_or_si128(rAG, rRB)); \ | - |
904 | } | - |
905 | #endif | - |
906 | | - |
907 | #if defined(__ARM_NEON__) | - |
908 | #define interpolate_4_pixels_16_neon(tl, tr, bl, br, distx, disty, disty_, colorMask, invColorMask, v_256, b) \ | - |
909 | { \ | - |
910 | const int16x8_t dxdy = vmulq_s16(distx, disty); \ | - |
911 | const int16x8_t distx_ = vshlq_n_s16(distx, 4); \ | - |
912 | const int16x8_t idxidy = vaddq_s16(dxdy, vsubq_s16(v_256, vaddq_s16(distx_, disty_))); \ | - |
913 | const int16x8_t dxidy = vsubq_s16(distx_, dxdy); \ | - |
914 | const int16x8_t idxdy = vsubq_s16(disty_, dxdy); \ | - |
915 | \ | - |
916 | int16x8_t tlAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tl), 8)); \ | - |
917 | int16x8_t tlRB = vandq_s16(tl, colorMask); \ | - |
918 | int16x8_t trAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tr), 8)); \ | - |
919 | int16x8_t trRB = vandq_s16(tr, colorMask); \ | - |
920 | int16x8_t blAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bl), 8)); \ | - |
921 | int16x8_t blRB = vandq_s16(bl, colorMask); \ | - |
922 | int16x8_t brAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(br), 8)); \ | - |
923 | int16x8_t brRB = vandq_s16(br, colorMask); \ | - |
924 | \ | - |
925 | int16x8_t rAG = vmulq_s16(tlAG, idxidy); \ | - |
926 | int16x8_t rRB = vmulq_s16(tlRB, idxidy); \ | - |
927 | rAG = vmlaq_s16(rAG, trAG, dxidy); \ | - |
928 | rRB = vmlaq_s16(rRB, trRB, dxidy); \ | - |
929 | rAG = vmlaq_s16(rAG, blAG, idxdy); \ | - |
930 | rRB = vmlaq_s16(rRB, blRB, idxdy); \ | - |
931 | rAG = vmlaq_s16(rAG, brAG, dxdy); \ | - |
932 | rRB = vmlaq_s16(rRB, brRB, dxdy); \ | - |
933 | \ | - |
934 | rAG = vandq_s16(invColorMask, rAG); \ | - |
935 | rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8)); \ | - |
936 | vst1q_s16((int16_t*)(b), vorrq_s16(rAG, rRB)); \ | - |
937 | } | - |
938 | #endif | - |
939 | | - |
940 | template<TextureBlendType blendType> | - |
941 | void fetchTransformedBilinear_pixelBounds(int max, int l1, int l2, int &v1, int &v2); | - |
942 | | - |
943 | template<> | - |
944 | inline void fetchTransformedBilinear_pixelBounds<BlendTransformedBilinearTiled>(int max, int, int, int &v1, int &v2) | - |
945 | { | - |
946 | v1 %= max; executed (the execution status of this line is deduced): v1 %= max; | - |
947 | if (v1 < 0) evaluated: v1 < 0 yes Evaluation Count:10780 | yes Evaluation Count:13422 |
| 10780-13422 |
948 | v1 += max; executed: v1 += max; Execution Count:10780 | 10780 |
949 | v2 = v1 + 1; executed (the execution status of this line is deduced): v2 = v1 + 1; | - |
950 | if (v2 == max) evaluated: v2 == max yes Evaluation Count:3300 | yes Evaluation Count:20902 |
| 3300-20902 |
951 | v2 = 0; executed: v2 = 0; Execution Count:3300 | 3300 |
952 | Q_ASSERT(v1 >= 0 && v1 < max); executed (the execution status of this line is deduced): qt_noop(); | - |
953 | Q_ASSERT(v2 >= 0 && v2 < max); executed (the execution status of this line is deduced): qt_noop(); | - |
954 | } executed: } Execution Count:24202 | 24202 |
955 | | - |
956 | template<> | - |
957 | inline void fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(int, int l1, int l2, int &v1, int &v2) | - |
958 | { | - |
959 | if (v1 < l1) evaluated: v1 < l1 yes Evaluation Count:2219 | yes Evaluation Count:253099 |
| 2219-253099 |
960 | v2 = v1 = l1; executed: v2 = v1 = l1; Execution Count:2219 | 2219 |
961 | else if (v1 >= l2) evaluated: v1 >= l2 yes Evaluation Count:1568 | yes Evaluation Count:251531 |
| 1568-251531 |
962 | v2 = v1 = l2; executed: v2 = v1 = l2; Execution Count:1568 | 1568 |
963 | else | - |
964 | v2 = v1 + 1; executed: v2 = v1 + 1; Execution Count:251531 | 251531 |
965 | Q_ASSERT(v1 >= l1 && v1 <= l2); executed (the execution status of this line is deduced): qt_noop(); | - |
966 | Q_ASSERT(v2 >= l1 && v2 <= l2); executed (the execution status of this line is deduced): qt_noop(); | - |
967 | } executed: } Execution Count:255318 | 255318 |
968 | | - |
969 | template<TextureBlendType blendType> /* blendType = BlendTransformedBilinear or BlendTransformedBilinearTiled */ | - |
970 | static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, const Operator *, | - |
971 | const QSpanData *data, int y, int x, | - |
972 | int length) | - |
973 | { | - |
974 | int image_width = data->texture.width; executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
975 | int image_height = data->texture.height; executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
976 | | - |
977 | int image_x1 = data->texture.x1; executed (the execution status of this line is deduced): int image_x1 = data->texture.x1; | - |
978 | int image_y1 = data->texture.y1; executed (the execution status of this line is deduced): int image_y1 = data->texture.y1; | - |
979 | int image_x2 = data->texture.x2 - 1; executed (the execution status of this line is deduced): int image_x2 = data->texture.x2 - 1; | - |
980 | int image_y2 = data->texture.y2 - 1; executed (the execution status of this line is deduced): int image_y2 = data->texture.y2 - 1; | - |
981 | | - |
982 | const qreal cx = x + qreal(0.5); executed (the execution status of this line is deduced): const qreal cx = x + qreal(0.5); | - |
983 | const qreal cy = y + qreal(0.5); executed (the execution status of this line is deduced): const qreal cy = y + qreal(0.5); | - |
984 | | - |
985 | uint *end = buffer + length; executed (the execution status of this line is deduced): uint *end = buffer + length; | - |
986 | uint *b = buffer; executed (the execution status of this line is deduced): uint *b = buffer; | - |
987 | if (data->fast_matrix) { evaluated: data->fast_matrix yes Evaluation Count:1606 | yes Evaluation Count:583 |
| 583-1606 |
988 | // The increment pr x in the scanline | - |
989 | int fdx = (int)(data->m11 * fixed_scale); executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
990 | int fdy = (int)(data->m12 * fixed_scale); executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
991 | | - |
992 | int fx = int((data->m21 * cy executed (the execution status of this line is deduced): int fx = int((data->m21 * cy | - |
993 | + data->m11 * cx + data->dx) * fixed_scale); executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
994 | int fy = int((data->m22 * cy executed (the execution status of this line is deduced): int fy = int((data->m22 * cy | - |
995 | + data->m12 * cx + data->dy) * fixed_scale); executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
996 | | - |
997 | fx -= half_point; executed (the execution status of this line is deduced): fx -= half_point; | - |
998 | fy -= half_point; executed (the execution status of this line is deduced): fy -= half_point; | - |
999 | | - |
1000 | if (fdy == 0) { //simple scale, no rotation evaluated: fdy == 0 yes Evaluation Count:994 | yes Evaluation Count:612 |
| 612-994 |
1001 | int y1 = (fy >> 16); executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1002 | int y2; executed (the execution status of this line is deduced): int y2; | - |
1003 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1004 | const uint *s1 = (const uint *)data->texture.scanLine(y1); executed (the execution status of this line is deduced): const uint *s1 = (const uint *)data->texture.scanLine(y1); | - |
1005 | const uint *s2 = (const uint *)data->texture.scanLine(y2); executed (the execution status of this line is deduced): const uint *s2 = (const uint *)data->texture.scanLine(y2); | - |
1006 | | - |
1007 | if (fdx <= fixed_scale && fdx > 0) { // scale up on X evaluated: fdx <= fixed_scale yes Evaluation Count:930 | yes Evaluation Count:64 |
evaluated: fdx > 0 yes Evaluation Count:802 | yes Evaluation Count:128 |
| 64-930 |
1008 | int disty = (fy & 0x0000ffff) >> 8; executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1009 | int idisty = 256 - disty; executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1010 | int x = fx >> 16; executed (the execution status of this line is deduced): int x = fx >> 16; | - |
1011 | | - |
1012 | // The idea is first to do the interpolation between the row s1 and the row s2 | - |
1013 | // into an intermediate buffer, then we interpolate between two pixel of this buffer. | - |
1014 | | - |
1015 | // intermediate_buffer[0] is a buffer of red-blue component of the pixel, in the form 0x00RR00BB | - |
1016 | // intermediate_buffer[1] is the alpha-green component of the pixel, in the form 0x00AA00GG | - |
1017 | quint32 intermediate_buffer[2][buffer_size + 2]; executed (the execution status of this line is deduced): quint32 intermediate_buffer[2][buffer_size + 2]; | - |
1018 | // count is the size used in the intermediate_buffer. | - |
1019 | int count = qCeil(length * data->m11) + 2; //+1 for the last pixel to interpolate with, and +1 for rounding errors. executed (the execution status of this line is deduced): int count = qCeil(length * data->m11) + 2; | - |
1020 | Q_ASSERT(count <= buffer_size + 2); //length is supposed to be <= buffer_size and data->m11 < 1 in this case executed (the execution status of this line is deduced): qt_noop(); | - |
1021 | int f = 0; executed (the execution status of this line is deduced): int f = 0; | - |
1022 | int lim = count; executed (the execution status of this line is deduced): int lim = count; | - |
1023 | if (blendType == BlendTransformedBilinearTiled) { partially evaluated: blendType == BlendTransformedBilinearTiled no Evaluation Count:0 | yes Evaluation Count:802 |
| 0-802 |
1024 | x %= image_width; never executed (the execution status of this line is deduced): x %= image_width; | - |
1025 | if (x < 0) x += image_width; never executed: x += image_width; never evaluated: x < 0 | 0 |
1026 | } else { | 0 |
1027 | lim = qMin(count, image_x2-x+1); executed (the execution status of this line is deduced): lim = qMin(count, image_x2-x+1); | - |
1028 | if (x < image_x1) { partially evaluated: x < image_x1 yes Evaluation Count:802 | no Evaluation Count:0 |
| 0-802 |
1029 | Q_ASSERT(x <= image_x2); executed (the execution status of this line is deduced): qt_noop(); | - |
1030 | uint t = s1[image_x1]; executed (the execution status of this line is deduced): uint t = s1[image_x1]; | - |
1031 | uint b = s2[image_x1]; executed (the execution status of this line is deduced): uint b = s2[image_x1]; | - |
1032 | quint32 rb = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; executed (the execution status of this line is deduced): quint32 rb = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1033 | quint32 ag = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff; executed (the execution status of this line is deduced): quint32 ag = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1034 | do { | - |
1035 | intermediate_buffer[0][f] = rb; executed (the execution status of this line is deduced): intermediate_buffer[0][f] = rb; | - |
1036 | intermediate_buffer[1][f] = ag; executed (the execution status of this line is deduced): intermediate_buffer[1][f] = ag; | - |
1037 | f++; executed (the execution status of this line is deduced): f++; | - |
1038 | x++; executed (the execution status of this line is deduced): x++; | - |
1039 | } while (x < image_x1 && f < lim); executed: } Execution Count:802 partially evaluated: x < image_x1 no Evaluation Count:0 | yes Evaluation Count:802 |
never evaluated: f < lim | 0-802 |
1040 | } executed: } Execution Count:802 | 802 |
1041 | } executed: } Execution Count:802 | 802 |
1042 | | - |
1043 | if (blendType != BlendTransformedBilinearTiled) { partially evaluated: blendType != BlendTransformedBilinearTiled yes Evaluation Count:802 | no Evaluation Count:0 |
| 0-802 |
1044 | #if defined(__SSE2__) | - |
1045 | const __m128i disty_ = _mm_set1_epi16(disty); executed (the execution status of this line is deduced): const __m128i disty_ = _mm_set1_epi16(disty); | - |
1046 | const __m128i idisty_ = _mm_set1_epi16(idisty); executed (the execution status of this line is deduced): const __m128i idisty_ = _mm_set1_epi16(idisty); | - |
1047 | const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); executed (the execution status of this line is deduced): const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); | - |
1048 | | - |
1049 | lim -= 3; executed (the execution status of this line is deduced): lim -= 3; | - |
1050 | for (; f < lim; x += 4, f += 4) { evaluated: f < lim yes Evaluation Count:15770 | yes Evaluation Count:802 |
| 802-15770 |
1051 | // Load 4 pixels from s1, and split the alpha-green and red-blue component | - |
1052 | __m128i top = _mm_loadu_si128((__m128i*)((const uint *)(s1)+x)); executed (the execution status of this line is deduced): __m128i top = _mm_loadu_si128((__m128i*)((const uint *)(s1)+x)); | - |
1053 | __m128i topAG = _mm_srli_epi16(top, 8); executed (the execution status of this line is deduced): __m128i topAG = _mm_srli_epi16(top, 8); | - |
1054 | __m128i topRB = _mm_and_si128(top, colorMask); executed (the execution status of this line is deduced): __m128i topRB = _mm_and_si128(top, colorMask); | - |
1055 | // Multiplies each colour component by idisty | - |
1056 | topAG = _mm_mullo_epi16 (topAG, idisty_); executed (the execution status of this line is deduced): topAG = _mm_mullo_epi16 (topAG, idisty_); | - |
1057 | topRB = _mm_mullo_epi16 (topRB, idisty_); executed (the execution status of this line is deduced): topRB = _mm_mullo_epi16 (topRB, idisty_); | - |
1058 | | - |
1059 | // Same for the s2 vector | - |
1060 | __m128i bottom = _mm_loadu_si128((__m128i*)((const uint *)(s2)+x)); executed (the execution status of this line is deduced): __m128i bottom = _mm_loadu_si128((__m128i*)((const uint *)(s2)+x)); | - |
1061 | __m128i bottomAG = _mm_srli_epi16(bottom, 8); executed (the execution status of this line is deduced): __m128i bottomAG = _mm_srli_epi16(bottom, 8); | - |
1062 | __m128i bottomRB = _mm_and_si128(bottom, colorMask); executed (the execution status of this line is deduced): __m128i bottomRB = _mm_and_si128(bottom, colorMask); | - |
1063 | bottomAG = _mm_mullo_epi16 (bottomAG, disty_); executed (the execution status of this line is deduced): bottomAG = _mm_mullo_epi16 (bottomAG, disty_); | - |
1064 | bottomRB = _mm_mullo_epi16 (bottomRB, disty_); executed (the execution status of this line is deduced): bottomRB = _mm_mullo_epi16 (bottomRB, disty_); | - |
1065 | | - |
1066 | // Add the values, and shift to only keep 8 significant bits per colors | - |
1067 | __m128i rAG =_mm_add_epi16(topAG, bottomAG); executed (the execution status of this line is deduced): __m128i rAG =_mm_add_epi16(topAG, bottomAG); | - |
1068 | rAG = _mm_srli_epi16(rAG, 8); executed (the execution status of this line is deduced): rAG = _mm_srli_epi16(rAG, 8); | - |
1069 | _mm_storeu_si128((__m128i*)(&intermediate_buffer[1][f]), rAG); executed (the execution status of this line is deduced): _mm_storeu_si128((__m128i*)(&intermediate_buffer[1][f]), rAG); | - |
1070 | __m128i rRB =_mm_add_epi16(topRB, bottomRB); executed (the execution status of this line is deduced): __m128i rRB =_mm_add_epi16(topRB, bottomRB); | - |
1071 | rRB = _mm_srli_epi16(rRB, 8); executed (the execution status of this line is deduced): rRB = _mm_srli_epi16(rRB, 8); | - |
1072 | _mm_storeu_si128((__m128i*)(&intermediate_buffer[0][f]), rRB); executed (the execution status of this line is deduced): _mm_storeu_si128((__m128i*)(&intermediate_buffer[0][f]), rRB); | - |
1073 | } executed: } Execution Count:15770 | 15770 |
1074 | #elif defined(__ARM_NEON__) | - |
1075 | const int16x8_t disty_ = vdupq_n_s16(disty); | - |
1076 | const int16x8_t idisty_ = vdupq_n_s16(idisty); | - |
1077 | const int16x8_t colorMask = vdupq_n_s16(0x00ff); | - |
1078 | | - |
1079 | lim -= 3; | - |
1080 | for (; f < lim; x += 4, f += 4) { | - |
1081 | // Load 4 pixels from s1, and split the alpha-green and red-blue component | - |
1082 | int16x8_t top = vld1q_s16((int16_t*)((const uint *)(s1)+x)); | - |
1083 | int16x8_t topAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(top), 8)); | - |
1084 | int16x8_t topRB = vandq_s16(top, colorMask); | - |
1085 | // Multiplies each colour component by idisty | - |
1086 | topAG = vmulq_s16(topAG, idisty_); | - |
1087 | topRB = vmulq_s16(topRB, idisty_); | - |
1088 | | - |
1089 | // Same for the s2 vector | - |
1090 | int16x8_t bottom = vld1q_s16((int16_t*)((const uint *)(s2)+x)); | - |
1091 | int16x8_t bottomAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bottom), 8)); | - |
1092 | int16x8_t bottomRB = vandq_s16(bottom, colorMask); | - |
1093 | bottomAG = vmulq_s16(bottomAG, disty_); | - |
1094 | bottomRB = vmulq_s16(bottomRB, disty_); | - |
1095 | | - |
1096 | // Add the values, and shift to only keep 8 significant bits per colors | - |
1097 | int16x8_t rAG = vaddq_s16(topAG, bottomAG); | - |
1098 | rAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rAG), 8)); | - |
1099 | vst1q_s16((int16_t*)(&intermediate_buffer[1][f]), rAG); | - |
1100 | int16x8_t rRB = vaddq_s16(topRB, bottomRB); | - |
1101 | rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8)); | - |
1102 | vst1q_s16((int16_t*)(&intermediate_buffer[0][f]), rRB); | - |
1103 | } | - |
1104 | #endif | - |
1105 | } executed: } Execution Count:802 | 802 |
1106 | for (; f < count; f++) { // Same as above but without sse2 evaluated: f < count yes Evaluation Count:970 | yes Evaluation Count:802 |
| 802-970 |
1107 | if (blendType == BlendTransformedBilinearTiled) { partially evaluated: blendType == BlendTransformedBilinearTiled no Evaluation Count:0 | yes Evaluation Count:970 |
| 0-970 |
1108 | if (x >= image_width) x -= image_width; never executed: x -= image_width; never evaluated: x >= image_width | 0 |
1109 | } else { | 0 |
1110 | x = qMin(x, image_x2); executed (the execution status of this line is deduced): x = qMin(x, image_x2); | - |
1111 | } executed: } Execution Count:970 | 970 |
1112 | | - |
1113 | uint t = s1[x]; executed (the execution status of this line is deduced): uint t = s1[x]; | - |
1114 | uint b = s2[x]; executed (the execution status of this line is deduced): uint b = s2[x]; | - |
1115 | | - |
1116 | intermediate_buffer[0][f] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; executed (the execution status of this line is deduced): intermediate_buffer[0][f] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1117 | intermediate_buffer[1][f] = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff; executed (the execution status of this line is deduced): intermediate_buffer[1][f] = ((((t>>8) & 0xff00ff) * idisty + ((b>>8) & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1118 | x++; executed (the execution status of this line is deduced): x++; | - |
1119 | } executed: } Execution Count:970 | 970 |
1120 | // Now interpolate the values from the intermediate_buffer to get the final result. | - |
1121 | fx &= fixed_scale - 1; executed (the execution status of this line is deduced): fx &= fixed_scale - 1; | - |
1122 | Q_ASSERT((fx >> 16) == 0); executed (the execution status of this line is deduced): qt_noop(); | - |
1123 | while (b < end) { evaluated: b < end yes Evaluation Count:138364 | yes Evaluation Count:802 |
| 802-138364 |
1124 | register int x1 = (fx >> 16); executed (the execution status of this line is deduced): register int x1 = (fx >> 16); | - |
1125 | register int x2 = x1 + 1; executed (the execution status of this line is deduced): register int x2 = x1 + 1; | - |
1126 | Q_ASSERT(x1 >= 0); executed (the execution status of this line is deduced): qt_noop(); | - |
1127 | Q_ASSERT(x2 < count); executed (the execution status of this line is deduced): qt_noop(); | - |
1128 | | - |
1129 | register int distx = (fx & 0x0000ffff) >> 8; executed (the execution status of this line is deduced): register int distx = (fx & 0x0000ffff) >> 8; | - |
1130 | register int idistx = 256 - distx; executed (the execution status of this line is deduced): register int idistx = 256 - distx; | - |
1131 | int rb = ((intermediate_buffer[0][x1] * idistx + intermediate_buffer[0][x2] * distx) >> 8) & 0xff00ff; executed (the execution status of this line is deduced): int rb = ((intermediate_buffer[0][x1] * idistx + intermediate_buffer[0][x2] * distx) >> 8) & 0xff00ff; | - |
1132 | int ag = (intermediate_buffer[1][x1] * idistx + intermediate_buffer[1][x2] * distx) & 0xff00ff00; executed (the execution status of this line is deduced): int ag = (intermediate_buffer[1][x1] * idistx + intermediate_buffer[1][x2] * distx) & 0xff00ff00; | - |
1133 | *b = rb | ag; executed (the execution status of this line is deduced): *b = rb | ag; | - |
1134 | b++; executed (the execution status of this line is deduced): b++; | - |
1135 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1136 | } executed: } Execution Count:138364 | 138364 |
1137 | } else if ((fdx < 0 && fdx > -(fixed_scale / 8)) || fabs(data->m22) < (1./8.)) { // scale up more than 8x executed: } Execution Count:802 evaluated: fdx < 0 yes Evaluation Count:128 | yes Evaluation Count:64 |
partially evaluated: fdx > -(fixed_scale / 8) no Evaluation Count:0 | yes Evaluation Count:128 |
partially evaluated: fabs(data->m22) < (1./8.) no Evaluation Count:0 | yes Evaluation Count:192 |
| 0-802 |
1138 | int y1 = (fy >> 16); never executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1139 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1140 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1141 | const uint *s1 = (const uint *)data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const uint *s1 = (const uint *)data->texture.scanLine(y1); | - |
1142 | const uint *s2 = (const uint *)data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const uint *s2 = (const uint *)data->texture.scanLine(y2); | - |
1143 | int disty = (fy & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1144 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1145 | while (b < end) { | 0 |
1146 | int x1 = (fx >> 16); never executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1147 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1148 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); | - |
1149 | uint tl = s1[x1]; never executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1150 | uint tr = s1[x2]; never executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1151 | uint bl = s2[x1]; never executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1152 | uint br = s2[x2]; never executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1153 | | - |
1154 | int distx = (fx & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int distx = (fx & 0x0000ffff) >> 8; | - |
1155 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1156 | | - |
1157 | uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); never executed (the execution status of this line is deduced): uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); | - |
1158 | uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); never executed (the execution status of this line is deduced): uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); | - |
1159 | *b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); never executed (the execution status of this line is deduced): *b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); | - |
1160 | | - |
1161 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1162 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
1163 | } | 0 |
1164 | } else { //scale down | 0 |
1165 | int y1 = (fy >> 16); executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1166 | int y2; executed (the execution status of this line is deduced): int y2; | - |
1167 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1168 | const uint *s1 = (const uint *)data->texture.scanLine(y1); executed (the execution status of this line is deduced): const uint *s1 = (const uint *)data->texture.scanLine(y1); | - |
1169 | const uint *s2 = (const uint *)data->texture.scanLine(y2); executed (the execution status of this line is deduced): const uint *s2 = (const uint *)data->texture.scanLine(y2); | - |
1170 | int disty = (fy & 0x0000ffff) >> 12; executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 12; | - |
1171 | | - |
1172 | if (blendType != BlendTransformedBilinearTiled) { partially evaluated: blendType != BlendTransformedBilinearTiled yes Evaluation Count:192 | no Evaluation Count:0 |
| 0-192 |
1173 | #define BILINEAR_DOWNSCALE_BOUNDS_PROLOG \ | - |
1174 | while (b < end) { \ | - |
1175 | int x1 = (fx >> 16); \ | - |
1176 | int x2; \ | - |
1177 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); \ | - |
1178 | if (x1 != x2) \ | - |
1179 | break; \ | - |
1180 | uint tl = s1[x1]; \ | - |
1181 | uint tr = s1[x2]; \ | - |
1182 | uint bl = s2[x1]; \ | - |
1183 | uint br = s2[x2]; \ | - |
1184 | int distx = (fx & 0x0000ffff) >> 12; \ | - |
1185 | *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); \ | - |
1186 | fx += fdx; \ | - |
1187 | ++b; \ | - |
1188 | } \ | - |
1189 | uint *boundedEnd; \ | - |
1190 | if (fdx > 0) \ | - |
1191 | boundedEnd = qMin(end, buffer + uint((image_x2 - (fx >> 16)) / data->m11)); \ | - |
1192 | else \ | - |
1193 | boundedEnd = qMin(end, buffer + uint((image_x1 - (fx >> 16)) / data->m11)); \ | - |
1194 | boundedEnd -= 3; | - |
1195 | | - |
1196 | #if defined(__SSE2__) | - |
1197 | BILINEAR_DOWNSCALE_BOUNDS_PROLOG executed: break; Execution Count:192 never executed: } executed: boundedEnd = qMin(end, buffer + uint((image_x2 - (fx >> 16)) / data->m11)); Execution Count:64 executed: boundedEnd = qMin(end, buffer + uint((image_x1 - (fx >> 16)) / data->m11)); Execution Count:128 partially evaluated: x1 != x2 yes Evaluation Count:192 | no Evaluation Count:0 |
evaluated: fdx > 0 yes Evaluation Count:64 | yes Evaluation Count:128 |
partially evaluated: b < end yes Evaluation Count:192 | no Evaluation Count:0 |
| 0-192 |
1198 | | - |
1199 | const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); executed (the execution status of this line is deduced): const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); | - |
1200 | const __m128i v_256 = _mm_set1_epi16(256); executed (the execution status of this line is deduced): const __m128i v_256 = _mm_set1_epi16(256); | - |
1201 | const __m128i v_disty = _mm_set1_epi16(disty); executed (the execution status of this line is deduced): const __m128i v_disty = _mm_set1_epi16(disty); | - |
1202 | __m128i v_fdx = _mm_set1_epi32(fdx*4); executed (the execution status of this line is deduced): __m128i v_fdx = _mm_set1_epi32(fdx*4); | - |
1203 | | - |
1204 | ptrdiff_t secondLine = reinterpret_cast<const uint *>(s2) - reinterpret_cast<const uint *>(s1); executed (the execution status of this line is deduced): ptrdiff_t secondLine = reinterpret_cast<const uint *>(s2) - reinterpret_cast<const uint *>(s1); | - |
1205 | | - |
1206 | union Vect_buffer { __m128i vect; quint32 i[4]; }; executed (the execution status of this line is deduced): union Vect_buffer { __m128i vect; quint32 i[4]; }; | - |
1207 | Vect_buffer v_fx; executed (the execution status of this line is deduced): Vect_buffer v_fx; | - |
1208 | | - |
1209 | for (int i = 0; i < 4; i++) { evaluated: i < 4 yes Evaluation Count:768 | yes Evaluation Count:192 |
| 192-768 |
1210 | v_fx.i[i] = fx; executed (the execution status of this line is deduced): v_fx.i[i] = fx; | - |
1211 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1212 | } executed: } Execution Count:768 | 768 |
1213 | | - |
1214 | while (b < boundedEnd) { evaluated: b < boundedEnd yes Evaluation Count:4928 | yes Evaluation Count:192 |
| 192-4928 |
1215 | | - |
1216 | Vect_buffer tl, tr, bl, br; executed (the execution status of this line is deduced): Vect_buffer tl, tr, bl, br; | - |
1217 | | - |
1218 | for (int i = 0; i < 4; i++) { evaluated: i < 4 yes Evaluation Count:19712 | yes Evaluation Count:4928 |
| 4928-19712 |
1219 | int x1 = v_fx.i[i] >> 16; executed (the execution status of this line is deduced): int x1 = v_fx.i[i] >> 16; | - |
1220 | const uint *addr_tl = reinterpret_cast<const uint *>(s1) + x1; executed (the execution status of this line is deduced): const uint *addr_tl = reinterpret_cast<const uint *>(s1) + x1; | - |
1221 | const uint *addr_tr = addr_tl + 1; executed (the execution status of this line is deduced): const uint *addr_tr = addr_tl + 1; | - |
1222 | tl.i[i] = *addr_tl; executed (the execution status of this line is deduced): tl.i[i] = *addr_tl; | - |
1223 | tr.i[i] = *addr_tr; executed (the execution status of this line is deduced): tr.i[i] = *addr_tr; | - |
1224 | bl.i[i] = *(addr_tl+secondLine); executed (the execution status of this line is deduced): bl.i[i] = *(addr_tl+secondLine); | - |
1225 | br.i[i] = *(addr_tr+secondLine); executed (the execution status of this line is deduced): br.i[i] = *(addr_tr+secondLine); | - |
1226 | } executed: } Execution Count:19712 | 19712 |
1227 | __m128i v_distx = _mm_srli_epi16(v_fx.vect, 12); executed (the execution status of this line is deduced): __m128i v_distx = _mm_srli_epi16(v_fx.vect, 12); | - |
1228 | v_distx = _mm_shufflehi_epi16(v_distx, _MM_SHUFFLE(2,2,0,0)); executed (the execution status of this line is deduced): v_distx = _mm_shufflehi_epi16(v_distx, (((2) << 6) | ((2) << 4) | ((0) << 2) | (0))); | - |
1229 | v_distx = _mm_shufflelo_epi16(v_distx, _MM_SHUFFLE(2,2,0,0)); executed (the execution status of this line is deduced): v_distx = _mm_shufflelo_epi16(v_distx, (((2) << 6) | ((2) << 4) | ((0) << 2) | (0))); | - |
1230 | | - |
1231 | interpolate_4_pixels_16_sse2(tl.vect, tr.vect, bl.vect, br.vect, v_distx, v_disty, colorMask, v_256, b); executed (the execution status of this line is deduced): { const __m128i dxdy = _mm_mullo_epi16 (v_distx, v_disty); const __m128i distx_ = _mm_slli_epi16(v_distx, 4); const __m128i disty_ = _mm_slli_epi16(v_disty, 4); const __m128i idxidy = _mm_add_epi16(dxdy, _mm_sub_epi16(v_256, _mm_add_epi16(distx_, disty_))); const __m128i dxidy = _mm_sub_epi16(distx_, dxdy); const __m128i idxdy = _mm_sub_epi16(disty_, dxdy); __m128i tlAG = _mm_srli_epi16(tl.vect, 8); __m128i tlRB = _mm_and_si128(tl.vect, colorMask); __m128i trAG = _mm_srli_epi16(tr.vect, 8); __m128i trRB = _mm_and_si128(tr.vect, colorMask); __m128i blAG = _mm_srli_epi16(bl.vect, 8); __m128i blRB = _mm_and_si128(bl.vect, colorMask); __m128i brAG = _mm_srli_epi16(br.vect, 8); __m128i brRB = _mm_and_si128(br.vect, colorMask); tlAG = _mm_mullo_epi16(tlAG, idxidy); tlRB = _mm_mullo_epi16(tlRB, idxidy); trAG = _mm_mullo_epi16(trAG, dxidy); trRB = _mm_mullo_epi16(trRB, dxidy); blAG = _mm_mullo_epi16(blAG, idxdy); blRB = _mm_mullo_epi16(blRB, idxdy); brAG = _mm_mullo_epi16(brAG, dxdy); brRB = _mm_mullo_epi16(brRB, dxdy); __m128i rAG =_mm_add_epi16(_mm_add_epi16(tlAG, trAG), _mm_add_epi16(blAG, brAG)); __m128i rRB =_mm_add_epi16(_mm_add_epi16(tlRB, trRB), _mm_add_epi16(blRB, brRB)); rAG = _mm_andnot_si128(colorMask, rAG); rRB = _mm_srli_epi16(rRB, 8); _mm_storeu_si128((__m128i*)(b), _mm_or_si128(rAG, rRB)); }; | - |
1232 | b+=4; executed (the execution status of this line is deduced): b+=4; | - |
1233 | v_fx.vect = _mm_add_epi32(v_fx.vect, v_fdx); executed (the execution status of this line is deduced): v_fx.vect = _mm_add_epi32(v_fx.vect, v_fdx); | - |
1234 | } executed: } Execution Count:4928 | 4928 |
1235 | fx = v_fx.i[0]; executed (the execution status of this line is deduced): fx = v_fx.i[0]; | - |
1236 | #elif defined(__ARM_NEON__) | - |
1237 | BILINEAR_DOWNSCALE_BOUNDS_PROLOG | - |
1238 | | - |
1239 | const int16x8_t colorMask = vdupq_n_s16(0x00ff); | - |
1240 | const int16x8_t invColorMask = vmvnq_s16(colorMask); | - |
1241 | const int16x8_t v_256 = vdupq_n_s16(256); | - |
1242 | const int16x8_t v_disty = vdupq_n_s16(disty); | - |
1243 | const int16x8_t v_disty_ = vshlq_n_s16(v_disty, 4); | - |
1244 | int32x4_t v_fdx = vdupq_n_s32(fdx*4); | - |
1245 | | - |
1246 | ptrdiff_t secondLine = reinterpret_cast<const uint *>(s2) - reinterpret_cast<const uint *>(s1); | - |
1247 | | - |
1248 | union Vect_buffer { int32x4_t vect; quint32 i[4]; }; | - |
1249 | Vect_buffer v_fx; | - |
1250 | | - |
1251 | for (int i = 0; i < 4; i++) { | - |
1252 | v_fx.i[i] = fx; | - |
1253 | fx += fdx; | - |
1254 | } | - |
1255 | | - |
1256 | const int32x4_t v_ffff_mask = vdupq_n_s32(0x0000ffff); | - |
1257 | | - |
1258 | while (b < boundedEnd) { | - |
1259 | | - |
1260 | Vect_buffer tl, tr, bl, br; | - |
1261 | | - |
1262 | Vect_buffer v_fx_shifted; | - |
1263 | v_fx_shifted.vect = vshrq_n_s32(v_fx.vect, 16); | - |
1264 | | - |
1265 | int32x4_t v_distx = vshrq_n_s32(vandq_s32(v_fx.vect, v_ffff_mask), 12); | - |
1266 | | - |
1267 | for (int i = 0; i < 4; i++) { | - |
1268 | int x1 = v_fx_shifted.i[i]; | - |
1269 | const uint *addr_tl = reinterpret_cast<const uint *>(s1) + x1; | - |
1270 | const uint *addr_tr = addr_tl + 1; | - |
1271 | tl.i[i] = *addr_tl; | - |
1272 | tr.i[i] = *addr_tr; | - |
1273 | bl.i[i] = *(addr_tl+secondLine); | - |
1274 | br.i[i] = *(addr_tr+secondLine); | - |
1275 | } | - |
1276 | | - |
1277 | v_distx = vorrq_s32(v_distx, vshlq_n_s32(v_distx, 16)); | - |
1278 | | - |
1279 | interpolate_4_pixels_16_neon(vreinterpretq_s16_s32(tl.vect), vreinterpretq_s16_s32(tr.vect), vreinterpretq_s16_s32(bl.vect), vreinterpretq_s16_s32(br.vect), vreinterpretq_s16_s32(v_distx), v_disty, v_disty_, colorMask, invColorMask, v_256, b); | - |
1280 | b+=4; | - |
1281 | v_fx.vect = vaddq_s32(v_fx.vect, v_fdx); | - |
1282 | } | - |
1283 | fx = v_fx.i[0]; | - |
1284 | #endif | - |
1285 | } executed: } Execution Count:192 | 192 |
1286 | | - |
1287 | while (b < end) { evaluated: b < end yes Evaluation Count:768 | yes Evaluation Count:192 |
| 192-768 |
1288 | int x1 = (fx >> 16); executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1289 | int x2; executed (the execution status of this line is deduced): int x2; | - |
1290 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); | - |
1291 | uint tl = s1[x1]; executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1292 | uint tr = s1[x2]; executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1293 | uint bl = s2[x1]; executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1294 | uint br = s2[x2]; executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1295 | int distx = (fx & 0x0000ffff) >> 12; executed (the execution status of this line is deduced): int distx = (fx & 0x0000ffff) >> 12; | - |
1296 | *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); executed (the execution status of this line is deduced): *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); | - |
1297 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1298 | ++b; executed (the execution status of this line is deduced): ++b; | - |
1299 | } executed: } Execution Count:768 | 768 |
1300 | } executed: } Execution Count:192 | 192 |
1301 | } else { //rotation | - |
1302 | if (fabs(data->m11) > 8 || fabs(data->m22) > 8) { partially evaluated: fabs(data->m11) > 8 no Evaluation Count:0 | yes Evaluation Count:612 |
partially evaluated: fabs(data->m22) > 8 no Evaluation Count:0 | yes Evaluation Count:612 |
| 0-612 |
1303 | //if we are zooming more than 8 times, we use 8bit precision for the position. | - |
1304 | while (b < end) { | 0 |
1305 | int x1 = (fx >> 16); never executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1306 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1307 | int y1 = (fy >> 16); never executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1308 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1309 | | - |
1310 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); | - |
1311 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1312 | | - |
1313 | const uint *s1 = (const uint *)data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const uint *s1 = (const uint *)data->texture.scanLine(y1); | - |
1314 | const uint *s2 = (const uint *)data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const uint *s2 = (const uint *)data->texture.scanLine(y2); | - |
1315 | | - |
1316 | uint tl = s1[x1]; never executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1317 | uint tr = s1[x2]; never executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1318 | uint bl = s2[x1]; never executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1319 | uint br = s2[x2]; never executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1320 | | - |
1321 | int distx = (fx & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int distx = (fx & 0x0000ffff) >> 8; | - |
1322 | int disty = (fy & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1323 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1324 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1325 | | - |
1326 | uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); never executed (the execution status of this line is deduced): uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); | - |
1327 | uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); never executed (the execution status of this line is deduced): uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); | - |
1328 | *b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); never executed (the execution status of this line is deduced): *b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); | - |
1329 | | - |
1330 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1331 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
1332 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
1333 | } | 0 |
1334 | } else { | 0 |
1335 | //we are zooming less than 8x, use 4bit precision | - |
1336 | while (b < end) { evaluated: b < end yes Evaluation Count:66174 | yes Evaluation Count:612 |
| 612-66174 |
1337 | int x1 = (fx >> 16); executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1338 | int x2; executed (the execution status of this line is deduced): int x2; | - |
1339 | int y1 = (fy >> 16); executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1340 | int y2; executed (the execution status of this line is deduced): int y2; | - |
1341 | | - |
1342 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); | - |
1343 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1344 | | - |
1345 | const uint *s1 = (const uint *)data->texture.scanLine(y1); executed (the execution status of this line is deduced): const uint *s1 = (const uint *)data->texture.scanLine(y1); | - |
1346 | const uint *s2 = (const uint *)data->texture.scanLine(y2); executed (the execution status of this line is deduced): const uint *s2 = (const uint *)data->texture.scanLine(y2); | - |
1347 | | - |
1348 | uint tl = s1[x1]; executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1349 | uint tr = s1[x2]; executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1350 | uint bl = s2[x1]; executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1351 | uint br = s2[x2]; executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1352 | | - |
1353 | int distx = (fx & 0x0000ffff) >> 12; executed (the execution status of this line is deduced): int distx = (fx & 0x0000ffff) >> 12; | - |
1354 | int disty = (fy & 0x0000ffff) >> 12; executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 12; | - |
1355 | | - |
1356 | *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); executed (the execution status of this line is deduced): *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); | - |
1357 | | - |
1358 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1359 | fy += fdy; executed (the execution status of this line is deduced): fy += fdy; | - |
1360 | ++b; executed (the execution status of this line is deduced): ++b; | - |
1361 | } executed: } Execution Count:66174 | 66174 |
1362 | } executed: } Execution Count:612 | 612 |
1363 | } | - |
1364 | } else { | - |
1365 | const qreal fdx = data->m11; executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
1366 | const qreal fdy = data->m12; executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
1367 | const qreal fdw = data->m13; executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
1368 | | - |
1369 | qreal fx = data->m21 * cy + data->m11 * cx + data->dx; executed (the execution status of this line is deduced): qreal fx = data->m21 * cy + data->m11 * cx + data->dx; | - |
1370 | qreal fy = data->m22 * cy + data->m12 * cx + data->dy; executed (the execution status of this line is deduced): qreal fy = data->m22 * cy + data->m12 * cx + data->dy; | - |
1371 | qreal fw = data->m23 * cy + data->m13 * cx + data->m33; executed (the execution status of this line is deduced): qreal fw = data->m23 * cy + data->m13 * cx + data->m33; | - |
1372 | | - |
1373 | while (b < end) { evaluated: b < end yes Evaluation Count:72513 | yes Evaluation Count:583 |
| 583-72513 |
1374 | const qreal iw = fw == 0 ? 1 : 1 / fw; partially evaluated: fw == 0 no Evaluation Count:0 | yes Evaluation Count:72513 |
| 0-72513 |
1375 | const qreal px = fx * iw - qreal(0.5); executed (the execution status of this line is deduced): const qreal px = fx * iw - qreal(0.5); | - |
1376 | const qreal py = fy * iw - qreal(0.5); executed (the execution status of this line is deduced): const qreal py = fy * iw - qreal(0.5); | - |
1377 | | - |
1378 | int x1 = int(px) - (px < 0); executed (the execution status of this line is deduced): int x1 = int(px) - (px < 0); | - |
1379 | int x2; executed (the execution status of this line is deduced): int x2; | - |
1380 | int y1 = int(py) - (py < 0); executed (the execution status of this line is deduced): int y1 = int(py) - (py < 0); | - |
1381 | int y2; executed (the execution status of this line is deduced): int y2; | - |
1382 | | - |
1383 | int distx = int((px - x1) * 256); executed (the execution status of this line is deduced): int distx = int((px - x1) * 256); | - |
1384 | int disty = int((py - y1) * 256); executed (the execution status of this line is deduced): int disty = int((py - y1) * 256); | - |
1385 | int idistx = 256 - distx; executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1386 | int idisty = 256 - disty; executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1387 | | - |
1388 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); | - |
1389 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1390 | | - |
1391 | const uint *s1 = (const uint *)data->texture.scanLine(y1); executed (the execution status of this line is deduced): const uint *s1 = (const uint *)data->texture.scanLine(y1); | - |
1392 | const uint *s2 = (const uint *)data->texture.scanLine(y2); executed (the execution status of this line is deduced): const uint *s2 = (const uint *)data->texture.scanLine(y2); | - |
1393 | | - |
1394 | uint tl = s1[x1]; executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1395 | uint tr = s1[x2]; executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1396 | uint bl = s2[x1]; executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1397 | uint br = s2[x2]; executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1398 | | - |
1399 | uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); executed (the execution status of this line is deduced): uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); | - |
1400 | uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); executed (the execution status of this line is deduced): uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); | - |
1401 | *b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); executed (the execution status of this line is deduced): *b = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); | - |
1402 | | - |
1403 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1404 | fy += fdy; executed (the execution status of this line is deduced): fy += fdy; | - |
1405 | fw += fdw; executed (the execution status of this line is deduced): fw += fdw; | - |
1406 | //force increment to avoid /0 | - |
1407 | if (!fw) { partially evaluated: !fw no Evaluation Count:0 | yes Evaluation Count:72513 |
| 0-72513 |
1408 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
1409 | } | 0 |
1410 | ++b; executed (the execution status of this line is deduced): ++b; | - |
1411 | } executed: } Execution Count:72513 | 72513 |
1412 | } executed: } Execution Count:583 | 583 |
1413 | | - |
1414 | return buffer; executed: return buffer; Execution Count:2189 | 2189 |
1415 | } | - |
1416 | | - |
1417 | // blendType = BlendTransformedBilinear or BlendTransformedBilinearTiled | - |
1418 | template<TextureBlendType blendType> | - |
1419 | static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *, | - |
1420 | const QSpanData *data, int y, int x, int length) | - |
1421 | { | - |
1422 | const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; never executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; | - |
1423 | const QRgb *clut = data->texture.colorTable ? data->texture.colorTable->constData() : 0; never evaluated: data->texture.colorTable | 0 |
1424 | | - |
1425 | int image_width = data->texture.width; never executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
1426 | int image_height = data->texture.height; never executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
1427 | | - |
1428 | int image_x1 = data->texture.x1; never executed (the execution status of this line is deduced): int image_x1 = data->texture.x1; | - |
1429 | int image_y1 = data->texture.y1; never executed (the execution status of this line is deduced): int image_y1 = data->texture.y1; | - |
1430 | int image_x2 = data->texture.x2 - 1; never executed (the execution status of this line is deduced): int image_x2 = data->texture.x2 - 1; | - |
1431 | int image_y2 = data->texture.y2 - 1; never executed (the execution status of this line is deduced): int image_y2 = data->texture.y2 - 1; | - |
1432 | | - |
1433 | const qreal cx = x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = x + qreal(0.5); | - |
1434 | const qreal cy = y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = y + qreal(0.5); | - |
1435 | | - |
1436 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
1437 | // The increment pr x in the scanline | - |
1438 | int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
1439 | int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
1440 | | - |
1441 | int fx = int((data->m21 * cy + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): int fx = int((data->m21 * cy + data->m11 * cx + data->dx) * fixed_scale); | - |
1442 | int fy = int((data->m22 * cy + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): int fy = int((data->m22 * cy + data->m12 * cx + data->dy) * fixed_scale); | - |
1443 | | - |
1444 | fx -= half_point; never executed (the execution status of this line is deduced): fx -= half_point; | - |
1445 | fy -= half_point; never executed (the execution status of this line is deduced): fy -= half_point; | - |
1446 | | - |
1447 | if (fdy == 0) { //simple scale, no rotation never evaluated: fdy == 0 | 0 |
1448 | int y1 = (fy >> 16); never executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1449 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1450 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1451 | const uchar *s1 = data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const uchar *s1 = data->texture.scanLine(y1); | - |
1452 | const uchar *s2 = data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const uchar *s2 = data->texture.scanLine(y2); | - |
1453 | | - |
1454 | if (fdx <= fixed_scale && fdx > 0) { // scale up on X never evaluated: fdx <= fixed_scale never evaluated: fdx > 0 | 0 |
1455 | int disty = (fy & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1456 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1457 | int x = fx >> 16; never executed (the execution status of this line is deduced): int x = fx >> 16; | - |
1458 | | - |
1459 | // The idea is first to do the interpolation between the row s1 and the row s2 | - |
1460 | // into an intermediate buffer, then we interpolate between two pixel of this buffer. | - |
1461 | FetchPixelsFunc fetch = qFetchPixels[layout->bpp]; never executed (the execution status of this line is deduced): FetchPixelsFunc fetch = qFetchPixels[layout->bpp]; | - |
1462 | uint buf1[buffer_size + 2]; never executed (the execution status of this line is deduced): uint buf1[buffer_size + 2]; | - |
1463 | uint buf2[buffer_size + 2]; never executed (the execution status of this line is deduced): uint buf2[buffer_size + 2]; | - |
1464 | const uint *ptr1; never executed (the execution status of this line is deduced): const uint *ptr1; | - |
1465 | const uint *ptr2; never executed (the execution status of this line is deduced): const uint *ptr2; | - |
1466 | | - |
1467 | int count = qCeil(length * data->m11) + 2; //+1 for the last pixel to interpolate with, and +1 for rounding errors. never executed (the execution status of this line is deduced): int count = qCeil(length * data->m11) + 2; | - |
1468 | Q_ASSERT(count <= buffer_size + 2); //length is supposed to be <= buffer_size and data->m11 < 1 in this case never executed (the execution status of this line is deduced): qt_noop(); | - |
1469 | | - |
1470 | if (blendType == BlendTransformedBilinearTiled) { never evaluated: blendType == BlendTransformedBilinearTiled | 0 |
1471 | x %= image_width; never executed (the execution status of this line is deduced): x %= image_width; | - |
1472 | if (x < 0) | 0 |
1473 | x += image_width; never executed: x += image_width; | 0 |
1474 | int len1 = qMin(count, image_width - x); never executed (the execution status of this line is deduced): int len1 = qMin(count, image_width - x); | - |
1475 | int len2 = qMin(x, count - len1); never executed (the execution status of this line is deduced): int len2 = qMin(x, count - len1); | - |
1476 | | - |
1477 | ptr1 = fetch(buf1, s1, x, len1); never executed (the execution status of this line is deduced): ptr1 = fetch(buf1, s1, x, len1); | - |
1478 | ptr1 = layout->convertToARGB32PM(buf1, ptr1, len1, layout, clut); never executed (the execution status of this line is deduced): ptr1 = layout->convertToARGB32PM(buf1, ptr1, len1, layout, clut); | - |
1479 | ptr2 = fetch(buf2, s2, x, len1); never executed (the execution status of this line is deduced): ptr2 = fetch(buf2, s2, x, len1); | - |
1480 | ptr2 = layout->convertToARGB32PM(buf2, ptr2, len1, layout, clut); never executed (the execution status of this line is deduced): ptr2 = layout->convertToARGB32PM(buf2, ptr2, len1, layout, clut); | - |
1481 | for (int i = 0; i < len1; ++i) { never evaluated: i < len1 | 0 |
1482 | uint t = ptr1[i]; never executed (the execution status of this line is deduced): uint t = ptr1[i]; | - |
1483 | uint b = ptr2[i]; never executed (the execution status of this line is deduced): uint b = ptr2[i]; | - |
1484 | buf1[i] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; never executed (the execution status of this line is deduced): buf1[i] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1485 | buf2[i] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; never executed (the execution status of this line is deduced): buf2[i] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1486 | } | 0 |
1487 | | - |
1488 | if (len2) { | 0 |
1489 | ptr1 = fetch(buf1 + len1, s1, 0, len2); never executed (the execution status of this line is deduced): ptr1 = fetch(buf1 + len1, s1, 0, len2); | - |
1490 | ptr1 = layout->convertToARGB32PM(buf1 + len1, ptr1, len2, layout, clut); never executed (the execution status of this line is deduced): ptr1 = layout->convertToARGB32PM(buf1 + len1, ptr1, len2, layout, clut); | - |
1491 | ptr2 = fetch(buf2 + len1, s2, 0, len2); never executed (the execution status of this line is deduced): ptr2 = fetch(buf2 + len1, s2, 0, len2); | - |
1492 | ptr2 = layout->convertToARGB32PM(buf2 + len1, ptr2, len2, layout, clut); never executed (the execution status of this line is deduced): ptr2 = layout->convertToARGB32PM(buf2 + len1, ptr2, len2, layout, clut); | - |
1493 | for (int i = 0; i < len2; ++i) { never evaluated: i < len2 | 0 |
1494 | uint t = ptr1[i]; never executed (the execution status of this line is deduced): uint t = ptr1[i]; | - |
1495 | uint b = ptr2[i]; never executed (the execution status of this line is deduced): uint b = ptr2[i]; | - |
1496 | buf1[i + len1] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; never executed (the execution status of this line is deduced): buf1[i + len1] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1497 | buf2[i + len1] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; never executed (the execution status of this line is deduced): buf2[i + len1] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1498 | } | 0 |
1499 | } | 0 |
1500 | for (int i = image_width; i < count; ++i) { never evaluated: i < count | 0 |
1501 | buf1[i] = buf1[i - image_width]; never executed (the execution status of this line is deduced): buf1[i] = buf1[i - image_width]; | - |
1502 | buf2[i] = buf2[i - image_width]; never executed (the execution status of this line is deduced): buf2[i] = buf2[i - image_width]; | - |
1503 | } | 0 |
1504 | } else { | 0 |
1505 | int start = qMax(x, image_x1); never executed (the execution status of this line is deduced): int start = qMax(x, image_x1); | - |
1506 | int end = qMin(x + count, image_x2 + 1); never executed (the execution status of this line is deduced): int end = qMin(x + count, image_x2 + 1); | - |
1507 | int len = qMax(1, end - start); never executed (the execution status of this line is deduced): int len = qMax(1, end - start); | - |
1508 | int leading = start - x; never executed (the execution status of this line is deduced): int leading = start - x; | - |
1509 | | - |
1510 | ptr1 = fetch(buf1 + leading, s1, start, len); never executed (the execution status of this line is deduced): ptr1 = fetch(buf1 + leading, s1, start, len); | - |
1511 | ptr1 = layout->convertToARGB32PM(buf1 + leading, ptr1, len, layout, clut); never executed (the execution status of this line is deduced): ptr1 = layout->convertToARGB32PM(buf1 + leading, ptr1, len, layout, clut); | - |
1512 | ptr2 = fetch(buf2 + leading, s2, start, len); never executed (the execution status of this line is deduced): ptr2 = fetch(buf2 + leading, s2, start, len); | - |
1513 | ptr2 = layout->convertToARGB32PM(buf2 + leading, ptr2, len, layout, clut); never executed (the execution status of this line is deduced): ptr2 = layout->convertToARGB32PM(buf2 + leading, ptr2, len, layout, clut); | - |
1514 | | - |
1515 | for (int i = 0; i < len; ++i) { | 0 |
1516 | uint t = ptr1[i]; never executed (the execution status of this line is deduced): uint t = ptr1[i]; | - |
1517 | uint b = ptr2[i]; never executed (the execution status of this line is deduced): uint b = ptr2[i]; | - |
1518 | buf1[i + leading] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; never executed (the execution status of this line is deduced): buf1[i + leading] = (((t & 0xff00ff) * idisty + (b & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1519 | buf2[i + leading] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; never executed (the execution status of this line is deduced): buf2[i + leading] = ((((t >> 8) & 0xff00ff) * idisty + ((b >> 8) & 0xff00ff) * disty) >> 8) & 0xff00ff; | - |
1520 | } | 0 |
1521 | | - |
1522 | for (int i = 0; i < leading; ++i) { never evaluated: i < leading | 0 |
1523 | buf1[i] = buf1[leading]; never executed (the execution status of this line is deduced): buf1[i] = buf1[leading]; | - |
1524 | buf2[i] = buf2[leading]; never executed (the execution status of this line is deduced): buf2[i] = buf2[leading]; | - |
1525 | } | 0 |
1526 | for (int i = leading + len; i < count; ++i) { never evaluated: i < count | 0 |
1527 | buf1[i] = buf1[i - 1]; never executed (the execution status of this line is deduced): buf1[i] = buf1[i - 1]; | - |
1528 | buf2[i] = buf2[i - 1]; never executed (the execution status of this line is deduced): buf2[i] = buf2[i - 1]; | - |
1529 | } | 0 |
1530 | } | 0 |
1531 | | - |
1532 | // Now interpolate the values from the intermediate_buffer to get the final result. | - |
1533 | fx &= fixed_scale - 1; never executed (the execution status of this line is deduced): fx &= fixed_scale - 1; | - |
1534 | Q_ASSERT((fx >> 16) == 0); never executed (the execution status of this line is deduced): qt_noop(); | - |
1535 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
1536 | register int x1 = (fx >> 16); never executed (the execution status of this line is deduced): register int x1 = (fx >> 16); | - |
1537 | register int x2 = x1 + 1; never executed (the execution status of this line is deduced): register int x2 = x1 + 1; | - |
1538 | Q_ASSERT(x1 >= 0); never executed (the execution status of this line is deduced): qt_noop(); | - |
1539 | Q_ASSERT(x2 < count); never executed (the execution status of this line is deduced): qt_noop(); | - |
1540 | | - |
1541 | register int distx = (fx & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): register int distx = (fx & 0x0000ffff) >> 8; | - |
1542 | register int idistx = 256 - distx; never executed (the execution status of this line is deduced): register int idistx = 256 - distx; | - |
1543 | int rb = ((buf1[x1] * idistx + buf1[x2] * distx) >> 8) & 0xff00ff; never executed (the execution status of this line is deduced): int rb = ((buf1[x1] * idistx + buf1[x2] * distx) >> 8) & 0xff00ff; | - |
1544 | int ag = (buf2[x1] * idistx + buf2[x2] * distx) & 0xff00ff00; never executed (the execution status of this line is deduced): int ag = (buf2[x1] * idistx + buf2[x2] * distx) & 0xff00ff00; | - |
1545 | buffer[i] = rb | ag; never executed (the execution status of this line is deduced): buffer[i] = rb | ag; | - |
1546 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1547 | } | 0 |
1548 | } else { | 0 |
1549 | FetchPixelFunc fetch = qFetchPixel[layout->bpp]; never executed (the execution status of this line is deduced): FetchPixelFunc fetch = qFetchPixel[layout->bpp]; | - |
1550 | uint buf1[buffer_size]; never executed (the execution status of this line is deduced): uint buf1[buffer_size]; | - |
1551 | uint buf2[buffer_size]; never executed (the execution status of this line is deduced): uint buf2[buffer_size]; | - |
1552 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
1553 | while (length) { | 0 |
1554 | int len = qMin(length, buffer_size / 2); never executed (the execution status of this line is deduced): int len = qMin(length, buffer_size / 2); | - |
1555 | int fracX = fx; never executed (the execution status of this line is deduced): int fracX = fx; | - |
1556 | for (int i = 0; i < len; ++i) { | 0 |
1557 | int x1 = (fx >> 16); never executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1558 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1559 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); | - |
1560 | | - |
1561 | buf1[i * 2 + 0] = fetch(s1, x1); never executed (the execution status of this line is deduced): buf1[i * 2 + 0] = fetch(s1, x1); | - |
1562 | buf1[i * 2 + 1] = fetch(s1, x2); never executed (the execution status of this line is deduced): buf1[i * 2 + 1] = fetch(s1, x2); | - |
1563 | buf2[i * 2 + 0] = fetch(s2, x1); never executed (the execution status of this line is deduced): buf2[i * 2 + 0] = fetch(s2, x1); | - |
1564 | buf2[i * 2 + 1] = fetch(s2, x2); never executed (the execution status of this line is deduced): buf2[i * 2 + 1] = fetch(s2, x2); | - |
1565 | | - |
1566 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1567 | } | 0 |
1568 | layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); never executed (the execution status of this line is deduced): layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); | - |
1569 | layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); never executed (the execution status of this line is deduced): layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); | - |
1570 | | - |
1571 | if ((fdx < 0 && fdx > -(fixed_scale / 8)) || fabs(data->m22) < (1./8.)) { // scale up more than 8x never evaluated: fdx < 0 never evaluated: fdx > -(fixed_scale / 8) never evaluated: fabs(data->m22) < (1./8.) | 0 |
1572 | int disty = (fy & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1573 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1574 | for (int i = 0; i < len; ++i) { | 0 |
1575 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1576 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1577 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1578 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1579 | int distx = (fracX & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int distx = (fracX & 0x0000ffff) >> 8; | - |
1580 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1581 | uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); never executed (the execution status of this line is deduced): uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); | - |
1582 | uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); never executed (the execution status of this line is deduced): uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); | - |
1583 | b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); never executed (the execution status of this line is deduced): b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); | - |
1584 | fracX += fdx; never executed (the execution status of this line is deduced): fracX += fdx; | - |
1585 | } | 0 |
1586 | } else { //scale down | 0 |
1587 | int disty = (fy & 0x0000ffff) >> 12; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 12; | - |
1588 | for (int i = 0; i < len; ++i) { | 0 |
1589 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1590 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1591 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1592 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1593 | int distx = (fracX & 0x0000ffff) >> 12; never executed (the execution status of this line is deduced): int distx = (fracX & 0x0000ffff) >> 12; | - |
1594 | b[i] = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); never executed (the execution status of this line is deduced): b[i] = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); | - |
1595 | fracX += fdx; never executed (the execution status of this line is deduced): fracX += fdx; | - |
1596 | } | 0 |
1597 | } | 0 |
1598 | length -= len; never executed (the execution status of this line is deduced): length -= len; | - |
1599 | b += len; never executed (the execution status of this line is deduced): b += len; | - |
1600 | } | 0 |
1601 | } | 0 |
1602 | } else { //rotation | - |
1603 | FetchPixelFunc fetch = qFetchPixel[layout->bpp]; never executed (the execution status of this line is deduced): FetchPixelFunc fetch = qFetchPixel[layout->bpp]; | - |
1604 | uint buf1[buffer_size]; never executed (the execution status of this line is deduced): uint buf1[buffer_size]; | - |
1605 | uint buf2[buffer_size]; never executed (the execution status of this line is deduced): uint buf2[buffer_size]; | - |
1606 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
1607 | | - |
1608 | while (length) { | 0 |
1609 | int len = qMin(length, buffer_size / 2); never executed (the execution status of this line is deduced): int len = qMin(length, buffer_size / 2); | - |
1610 | int fracX = fx; never executed (the execution status of this line is deduced): int fracX = fx; | - |
1611 | int fracY = fy; never executed (the execution status of this line is deduced): int fracY = fy; | - |
1612 | for (int i = 0; i < len; ++i) { | 0 |
1613 | int x1 = (fx >> 16); never executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1614 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1615 | int y1 = (fy >> 16); never executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1616 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1617 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); | - |
1618 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1619 | | - |
1620 | const uchar *s1 = data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const uchar *s1 = data->texture.scanLine(y1); | - |
1621 | const uchar *s2 = data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const uchar *s2 = data->texture.scanLine(y2); | - |
1622 | | - |
1623 | buf1[i * 2 + 0] = fetch(s1, x1); never executed (the execution status of this line is deduced): buf1[i * 2 + 0] = fetch(s1, x1); | - |
1624 | buf1[i * 2 + 1] = fetch(s1, x2); never executed (the execution status of this line is deduced): buf1[i * 2 + 1] = fetch(s1, x2); | - |
1625 | buf2[i * 2 + 0] = fetch(s2, x1); never executed (the execution status of this line is deduced): buf2[i * 2 + 0] = fetch(s2, x1); | - |
1626 | buf2[i * 2 + 1] = fetch(s2, x2); never executed (the execution status of this line is deduced): buf2[i * 2 + 1] = fetch(s2, x2); | - |
1627 | | - |
1628 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1629 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
1630 | } | 0 |
1631 | layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); never executed (the execution status of this line is deduced): layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); | - |
1632 | layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); never executed (the execution status of this line is deduced): layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); | - |
1633 | | - |
1634 | if (fabs(data->m11) > 8 || fabs(data->m22) > 8) { never evaluated: fabs(data->m11) > 8 never evaluated: fabs(data->m22) > 8 | 0 |
1635 | //if we are zooming more than 8 times, we use 8bit precision for the position. | - |
1636 | for (int i = 0; i < len; ++i) { | 0 |
1637 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1638 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1639 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1640 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1641 | | - |
1642 | int distx = (fracX & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int distx = (fracX & 0x0000ffff) >> 8; | - |
1643 | int disty = (fracY & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fracY & 0x0000ffff) >> 8; | - |
1644 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1645 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1646 | | - |
1647 | uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); never executed (the execution status of this line is deduced): uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); | - |
1648 | uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); never executed (the execution status of this line is deduced): uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); | - |
1649 | b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); never executed (the execution status of this line is deduced): b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); | - |
1650 | fracX += fdx; never executed (the execution status of this line is deduced): fracX += fdx; | - |
1651 | fracY += fdy; never executed (the execution status of this line is deduced): fracY += fdy; | - |
1652 | } | 0 |
1653 | } else { | 0 |
1654 | //we are zooming less than 8x, use 4bit precision | - |
1655 | for (int i = 0; i < len; ++i) { | 0 |
1656 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1657 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1658 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1659 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1660 | | - |
1661 | int distx = (fracX & 0x0000ffff) >> 12; never executed (the execution status of this line is deduced): int distx = (fracX & 0x0000ffff) >> 12; | - |
1662 | int disty = (fracY & 0x0000ffff) >> 12; never executed (the execution status of this line is deduced): int disty = (fracY & 0x0000ffff) >> 12; | - |
1663 | | - |
1664 | b[i] = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); never executed (the execution status of this line is deduced): b[i] = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); | - |
1665 | fracX += fdx; never executed (the execution status of this line is deduced): fracX += fdx; | - |
1666 | fracY += fdy; never executed (the execution status of this line is deduced): fracY += fdy; | - |
1667 | } | 0 |
1668 | } | 0 |
1669 | | - |
1670 | length -= len; never executed (the execution status of this line is deduced): length -= len; | - |
1671 | b += len; never executed (the execution status of this line is deduced): b += len; | - |
1672 | } | 0 |
1673 | } | 0 |
1674 | } else { | - |
1675 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
1676 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
1677 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
1678 | | - |
1679 | qreal fx = data->m21 * cy + data->m11 * cx + data->dx; never executed (the execution status of this line is deduced): qreal fx = data->m21 * cy + data->m11 * cx + data->dx; | - |
1680 | qreal fy = data->m22 * cy + data->m12 * cx + data->dy; never executed (the execution status of this line is deduced): qreal fy = data->m22 * cy + data->m12 * cx + data->dy; | - |
1681 | qreal fw = data->m23 * cy + data->m13 * cx + data->m33; never executed (the execution status of this line is deduced): qreal fw = data->m23 * cy + data->m13 * cx + data->m33; | - |
1682 | | - |
1683 | FetchPixelFunc fetch = qFetchPixel[layout->bpp]; never executed (the execution status of this line is deduced): FetchPixelFunc fetch = qFetchPixel[layout->bpp]; | - |
1684 | uint buf1[buffer_size]; never executed (the execution status of this line is deduced): uint buf1[buffer_size]; | - |
1685 | uint buf2[buffer_size]; never executed (the execution status of this line is deduced): uint buf2[buffer_size]; | - |
1686 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
1687 | | - |
1688 | int distxs[buffer_size / 2]; never executed (the execution status of this line is deduced): int distxs[buffer_size / 2]; | - |
1689 | int distys[buffer_size / 2]; never executed (the execution status of this line is deduced): int distys[buffer_size / 2]; | - |
1690 | | - |
1691 | while (length) { | 0 |
1692 | int len = qMin(length, buffer_size / 2); never executed (the execution status of this line is deduced): int len = qMin(length, buffer_size / 2); | - |
1693 | for (int i = 0; i < len; ++i) { | 0 |
1694 | const qreal iw = fw == 0 ? 1 : 1 / fw; | 0 |
1695 | const qreal px = fx * iw - qreal(0.5); never executed (the execution status of this line is deduced): const qreal px = fx * iw - qreal(0.5); | - |
1696 | const qreal py = fy * iw - qreal(0.5); never executed (the execution status of this line is deduced): const qreal py = fy * iw - qreal(0.5); | - |
1697 | | - |
1698 | int x1 = int(px) - (px < 0); never executed (the execution status of this line is deduced): int x1 = int(px) - (px < 0); | - |
1699 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1700 | int y1 = int(py) - (py < 0); never executed (the execution status of this line is deduced): int y1 = int(py) - (py < 0); | - |
1701 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1702 | | - |
1703 | distxs[i] = int((px - x1) * 256); never executed (the execution status of this line is deduced): distxs[i] = int((px - x1) * 256); | - |
1704 | distys[i] = int((py - y1) * 256); never executed (the execution status of this line is deduced): distys[i] = int((py - y1) * 256); | - |
1705 | | - |
1706 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); | - |
1707 | fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2); | - |
1708 | | - |
1709 | const uchar *s1 = data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const uchar *s1 = data->texture.scanLine(y1); | - |
1710 | const uchar *s2 = data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const uchar *s2 = data->texture.scanLine(y2); | - |
1711 | | - |
1712 | buf1[i * 2 + 0] = fetch(s1, x1); never executed (the execution status of this line is deduced): buf1[i * 2 + 0] = fetch(s1, x1); | - |
1713 | buf1[i * 2 + 1] = fetch(s1, x2); never executed (the execution status of this line is deduced): buf1[i * 2 + 1] = fetch(s1, x2); | - |
1714 | buf2[i * 2 + 0] = fetch(s2, x1); never executed (the execution status of this line is deduced): buf2[i * 2 + 0] = fetch(s2, x1); | - |
1715 | buf2[i * 2 + 1] = fetch(s2, x2); never executed (the execution status of this line is deduced): buf2[i * 2 + 1] = fetch(s2, x2); | - |
1716 | | - |
1717 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1718 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
1719 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
1720 | //force increment to avoid /0 | - |
1721 | if (!fw) | 0 |
1722 | fw += fdw; never executed: fw += fdw; | 0 |
1723 | } | 0 |
1724 | | - |
1725 | layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); never executed (the execution status of this line is deduced): layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut); | - |
1726 | layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); never executed (the execution status of this line is deduced): layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut); | - |
1727 | | - |
1728 | for (int i = 0; i < len; ++i) { | 0 |
1729 | int distx = distxs[i]; never executed (the execution status of this line is deduced): int distx = distxs[i]; | - |
1730 | int disty = distys[i]; never executed (the execution status of this line is deduced): int disty = distys[i]; | - |
1731 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1732 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1733 | | - |
1734 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1735 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1736 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1737 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1738 | | - |
1739 | uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); never executed (the execution status of this line is deduced): uint xtop = INTERPOLATE_PIXEL_256(tl, idistx, tr, distx); | - |
1740 | uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); never executed (the execution status of this line is deduced): uint xbot = INTERPOLATE_PIXEL_256(bl, idistx, br, distx); | - |
1741 | b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); never executed (the execution status of this line is deduced): b[i] = INTERPOLATE_PIXEL_256(xtop, idisty, xbot, disty); | - |
1742 | } | 0 |
1743 | length -= len; never executed (the execution status of this line is deduced): length -= len; | - |
1744 | b += len; never executed (the execution status of this line is deduced): b += len; | - |
1745 | } | 0 |
1746 | } | 0 |
1747 | | - |
1748 | return buffer; never executed: return buffer; | 0 |
1749 | } | - |
1750 | | - |
1751 | static const SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = { | - |
1752 | // Untransformed | - |
1753 | { | - |
1754 | 0, // Invalid | - |
1755 | fetchUntransformed, // Mono | - |
1756 | fetchUntransformed, // MonoLsb | - |
1757 | fetchUntransformed, // Indexed8 | - |
1758 | fetchUntransformedARGB32PM, // RGB32 | - |
1759 | fetchUntransformed, // ARGB32 | - |
1760 | fetchUntransformedARGB32PM, // ARGB32_Premultiplied | - |
1761 | fetchUntransformedRGB16, // RGB16 | - |
1762 | fetchUntransformed, // ARGB8565_Premultiplied | - |
1763 | fetchUntransformed, // RGB666 | - |
1764 | fetchUntransformed, // ARGB6666_Premultiplied | - |
1765 | fetchUntransformed, // RGB555 | - |
1766 | fetchUntransformed, // ARGB8555_Premultiplied | - |
1767 | fetchUntransformed, // RGB888 | - |
1768 | fetchUntransformed, // RGB444 | - |
1769 | fetchUntransformed // ARGB4444_Premultiplied | - |
1770 | }, | - |
1771 | // Tiled | - |
1772 | { | - |
1773 | 0, // Invalid | - |
1774 | fetchUntransformed, // Mono | - |
1775 | fetchUntransformed, // MonoLsb | - |
1776 | fetchUntransformed, // Indexed8 | - |
1777 | fetchUntransformedARGB32PM, // RGB32 | - |
1778 | fetchUntransformed, // ARGB32 | - |
1779 | fetchUntransformedARGB32PM, // ARGB32_Premultiplied | - |
1780 | fetchUntransformedRGB16, // RGB16 | - |
1781 | fetchUntransformed, // ARGB8565_Premultiplied | - |
1782 | fetchUntransformed, // RGB666 | - |
1783 | fetchUntransformed, // ARGB6666_Premultiplied | - |
1784 | fetchUntransformed, // RGB555 | - |
1785 | fetchUntransformed, // ARGB8555_Premultiplied | - |
1786 | fetchUntransformed, // RGB888 | - |
1787 | fetchUntransformed, // RGB444 | - |
1788 | fetchUntransformed // ARGB4444_Premultiplied | - |
1789 | }, | - |
1790 | // Transformed | - |
1791 | { | - |
1792 | 0, // Invalid | - |
1793 | fetchTransformed<BlendTransformed>, // Mono | - |
1794 | fetchTransformed<BlendTransformed>, // MonoLsb | - |
1795 | fetchTransformed<BlendTransformed>, // Indexed8 | - |
1796 | fetchTransformedARGB32PM<BlendTransformed>, // RGB32 | - |
1797 | fetchTransformed<BlendTransformed>, // ARGB32 | - |
1798 | fetchTransformedARGB32PM<BlendTransformed>, // ARGB32_Premultiplied | - |
1799 | fetchTransformed<BlendTransformed>, // RGB16 | - |
1800 | fetchTransformed<BlendTransformed>, // ARGB8565_Premultiplied | - |
1801 | fetchTransformed<BlendTransformed>, // RGB666 | - |
1802 | fetchTransformed<BlendTransformed>, // ARGB6666_Premultiplied | - |
1803 | fetchTransformed<BlendTransformed>, // RGB555 | - |
1804 | fetchTransformed<BlendTransformed>, // ARGB8555_Premultiplied | - |
1805 | fetchTransformed<BlendTransformed>, // RGB888 | - |
1806 | fetchTransformed<BlendTransformed>, // RGB444 | - |
1807 | fetchTransformed<BlendTransformed>, // ARGB4444_Premultiplied | - |
1808 | }, | - |
1809 | { | - |
1810 | 0, // TransformedTiled | - |
1811 | fetchTransformed<BlendTransformedTiled>, // Mono | - |
1812 | fetchTransformed<BlendTransformedTiled>, // MonoLsb | - |
1813 | fetchTransformed<BlendTransformedTiled>, // Indexed8 | - |
1814 | fetchTransformedARGB32PM<BlendTransformedTiled>, // RGB32 | - |
1815 | fetchTransformed<BlendTransformedTiled>, // ARGB32 | - |
1816 | fetchTransformedARGB32PM<BlendTransformedTiled>, // ARGB32_Premultiplied | - |
1817 | fetchTransformed<BlendTransformedTiled>, // RGB16 | - |
1818 | fetchTransformed<BlendTransformedTiled>, // ARGB8565_Premultiplied | - |
1819 | fetchTransformed<BlendTransformedTiled>, // RGB666 | - |
1820 | fetchTransformed<BlendTransformedTiled>, // ARGB6666_Premultiplied | - |
1821 | fetchTransformed<BlendTransformedTiled>, // RGB555 | - |
1822 | fetchTransformed<BlendTransformedTiled>, // ARGB8555_Premultiplied | - |
1823 | fetchTransformed<BlendTransformedTiled>, // RGB888 | - |
1824 | fetchTransformed<BlendTransformedTiled>, // RGB444 | - |
1825 | fetchTransformed<BlendTransformedTiled>, // ARGB4444_Premultiplied | - |
1826 | }, | - |
1827 | { | - |
1828 | 0, // Bilinear | - |
1829 | fetchTransformedBilinear<BlendTransformedBilinear>, // Mono | - |
1830 | fetchTransformedBilinear<BlendTransformedBilinear>, // MonoLsb | - |
1831 | fetchTransformedBilinear<BlendTransformedBilinear>, // Indexed8 | - |
1832 | fetchTransformedBilinearARGB32PM<BlendTransformedBilinear>, // RGB32 | - |
1833 | fetchTransformedBilinear<BlendTransformedBilinear>, // ARGB32 | - |
1834 | fetchTransformedBilinearARGB32PM<BlendTransformedBilinear>, // ARGB32_Premultiplied | - |
1835 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB16 | - |
1836 | fetchTransformedBilinear<BlendTransformedBilinear>, // ARGB8565_Premultiplied | - |
1837 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB666 | - |
1838 | fetchTransformedBilinear<BlendTransformedBilinear>, // ARGB6666_Premultiplied | - |
1839 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB555 | - |
1840 | fetchTransformedBilinear<BlendTransformedBilinear>, // ARGB8555_Premultiplied | - |
1841 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB888 | - |
1842 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB444 | - |
1843 | fetchTransformedBilinear<BlendTransformedBilinear> // ARGB4444_Premultiplied | - |
1844 | }, | - |
1845 | { | - |
1846 | 0, // BilinearTiled | - |
1847 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // Mono | - |
1848 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // MonoLsb | - |
1849 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // Indexed8 | - |
1850 | fetchTransformedBilinearARGB32PM<BlendTransformedBilinearTiled>, // RGB32 | - |
1851 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // ARGB32 | - |
1852 | fetchTransformedBilinearARGB32PM<BlendTransformedBilinearTiled>, // ARGB32_Premultiplied | - |
1853 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB16 | - |
1854 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // ARGB8565_Premultiplied | - |
1855 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB666 | - |
1856 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // ARGB6666_Premultiplied | - |
1857 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB555 | - |
1858 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // ARGB8555_Premultiplied | - |
1859 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB888 | - |
1860 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB444 | - |
1861 | fetchTransformedBilinear<BlendTransformedBilinearTiled> // ARGB4444_Premultiplied | - |
1862 | }, | - |
1863 | }; | - |
1864 | | - |
1865 | #define FIXPT_BITS 8 | - |
1866 | #define FIXPT_SIZE (1<<FIXPT_BITS) | - |
1867 | | - |
1868 | static uint qt_gradient_pixel_fixed(const QGradientData *data, int fixed_pos) | - |
1869 | { | - |
1870 | int ipos = (fixed_pos + (FIXPT_SIZE / 2)) >> FIXPT_BITS; executed (the execution status of this line is deduced): int ipos = (fixed_pos + ((1<<8) / 2)) >> 8; | - |
1871 | return data->colorTable[qt_gradient_clamp(data, ipos)]; executed: return data->colorTable[qt_gradient_clamp(data, ipos)]; Execution Count:701430 | 701430 |
1872 | } | - |
1873 | | - |
1874 | static void QT_FASTCALL getLinearGradientValues(LinearGradientValues *v, const QSpanData *data) | - |
1875 | { | - |
1876 | v->dx = data->gradient.linear.end.x - data->gradient.linear.origin.x; executed (the execution status of this line is deduced): v->dx = data->gradient.linear.end.x - data->gradient.linear.origin.x; | - |
1877 | v->dy = data->gradient.linear.end.y - data->gradient.linear.origin.y; executed (the execution status of this line is deduced): v->dy = data->gradient.linear.end.y - data->gradient.linear.origin.y; | - |
1878 | v->l = v->dx * v->dx + v->dy * v->dy; executed (the execution status of this line is deduced): v->l = v->dx * v->dx + v->dy * v->dy; | - |
1879 | v->off = 0; executed (the execution status of this line is deduced): v->off = 0; | - |
1880 | if (v->l != 0) { partially evaluated: v->l != 0 yes Evaluation Count:17046 | no Evaluation Count:0 |
| 0-17046 |
1881 | v->dx /= v->l; executed (the execution status of this line is deduced): v->dx /= v->l; | - |
1882 | v->dy /= v->l; executed (the execution status of this line is deduced): v->dy /= v->l; | - |
1883 | v->off = -v->dx * data->gradient.linear.origin.x - v->dy * data->gradient.linear.origin.y; executed (the execution status of this line is deduced): v->off = -v->dx * data->gradient.linear.origin.x - v->dy * data->gradient.linear.origin.y; | - |
1884 | } executed: } Execution Count:17044 | 17044 |
1885 | } executed: } Execution Count:17049 | 17049 |
1886 | | - |
1887 | static const uint * QT_FASTCALL qt_fetch_linear_gradient(uint *buffer, const Operator *op, const QSpanData *data, | - |
1888 | int y, int x, int length) | - |
1889 | { | - |
1890 | const uint *b = buffer; executed (the execution status of this line is deduced): const uint *b = buffer; | - |
1891 | qreal t, inc; executed (the execution status of this line is deduced): qreal t, inc; | - |
1892 | | - |
1893 | bool affine = true; executed (the execution status of this line is deduced): bool affine = true; | - |
1894 | qreal rx=0, ry=0; executed (the execution status of this line is deduced): qreal rx=0, ry=0; | - |
1895 | if (op->linear.l == 0) { partially evaluated: op->linear.l == 0 no Evaluation Count:0 | yes Evaluation Count:43596 |
| 0-43596 |
1896 | t = inc = 0; never executed (the execution status of this line is deduced): t = inc = 0; | - |
1897 | } else { | 0 |
1898 | rx = data->m21 * (y + qreal(0.5)) + data->m11 * (x + qreal(0.5)) + data->dx; executed (the execution status of this line is deduced): rx = data->m21 * (y + qreal(0.5)) + data->m11 * (x + qreal(0.5)) + data->dx; | - |
1899 | ry = data->m22 * (y + qreal(0.5)) + data->m12 * (x + qreal(0.5)) + data->dy; executed (the execution status of this line is deduced): ry = data->m22 * (y + qreal(0.5)) + data->m12 * (x + qreal(0.5)) + data->dy; | - |
1900 | t = op->linear.dx*rx + op->linear.dy*ry + op->linear.off; executed (the execution status of this line is deduced): t = op->linear.dx*rx + op->linear.dy*ry + op->linear.off; | - |
1901 | inc = op->linear.dx * data->m11 + op->linear.dy * data->m12; executed (the execution status of this line is deduced): inc = op->linear.dx * data->m11 + op->linear.dy * data->m12; | - |
1902 | affine = !data->m13 && !data->m23; partially evaluated: !data->m13 yes Evaluation Count:43597 | no Evaluation Count:0 |
partially evaluated: !data->m23 yes Evaluation Count:43601 | no Evaluation Count:0 |
| 0-43601 |
1903 | | - |
1904 | if (affine) { partially evaluated: affine yes Evaluation Count:43601 | no Evaluation Count:0 |
| 0-43601 |
1905 | t *= (GRADIENT_STOPTABLE_SIZE - 1); executed (the execution status of this line is deduced): t *= (1024 - 1); | - |
1906 | inc *= (GRADIENT_STOPTABLE_SIZE - 1); executed (the execution status of this line is deduced): inc *= (1024 - 1); | - |
1907 | } executed: } Execution Count:43601 | 43601 |
1908 | } executed: } Execution Count:43603 | 43603 |
1909 | | - |
1910 | const uint *end = buffer + length; executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
1911 | if (affine) { partially evaluated: affine yes Evaluation Count:43600 | no Evaluation Count:0 |
| 0-43600 |
1912 | if (inc > qreal(-1e-5) && inc < qreal(1e-5)) { partially evaluated: inc > qreal(-1e-5) yes Evaluation Count:43601 | no Evaluation Count:0 |
partially evaluated: inc < qreal(1e-5) no Evaluation Count:0 | yes Evaluation Count:43607 |
| 0-43607 |
1913 | QT_MEMFILL_UINT(buffer, length, qt_gradient_pixel_fixed(&data->gradient, int(t * FIXPT_SIZE))); never executed (the execution status of this line is deduced): qt_memfill<quint32>(buffer, qt_gradient_pixel_fixed(&data->gradient, int(t * (1<<8))), length);; | - |
1914 | } else { | 0 |
1915 | if (t+inc*length < qreal(INT_MAX >> (FIXPT_BITS + 1)) && partially evaluated: t+inc*length < qreal(2147483647 >> (8 + 1)) yes Evaluation Count:43607 | no Evaluation Count:0 |
| 0-43607 |
1916 | t+inc*length > qreal(INT_MIN >> (FIXPT_BITS + 1))) { partially evaluated: t+inc*length > qreal((-2147483647 - 1) >> (8 + 1)) yes Evaluation Count:43608 | no Evaluation Count:0 |
| 0-43608 |
1917 | // we can use fixed point math | - |
1918 | int t_fixed = int(t * FIXPT_SIZE); executed (the execution status of this line is deduced): int t_fixed = int(t * (1<<8)); | - |
1919 | int inc_fixed = int(inc * FIXPT_SIZE); executed (the execution status of this line is deduced): int inc_fixed = int(inc * (1<<8)); | - |
1920 | while (buffer < end) { evaluated: buffer < end yes Evaluation Count:692097 | yes Evaluation Count:43597 |
| 43597-692097 |
1921 | *buffer = qt_gradient_pixel_fixed(&data->gradient, t_fixed); executed (the execution status of this line is deduced): *buffer = qt_gradient_pixel_fixed(&data->gradient, t_fixed); | - |
1922 | t_fixed += inc_fixed; executed (the execution status of this line is deduced): t_fixed += inc_fixed; | - |
1923 | ++buffer; executed (the execution status of this line is deduced): ++buffer; | - |
1924 | } executed: } Execution Count:692089 | 692089 |
1925 | } else { executed: } Execution Count:43601 | 43601 |
1926 | // we have to fall back to float math | - |
1927 | while (buffer < end) { never evaluated: buffer < end | 0 |
1928 | *buffer = qt_gradient_pixel(&data->gradient, t/GRADIENT_STOPTABLE_SIZE); never executed (the execution status of this line is deduced): *buffer = qt_gradient_pixel(&data->gradient, t/1024); | - |
1929 | t += inc; never executed (the execution status of this line is deduced): t += inc; | - |
1930 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
1931 | } | 0 |
1932 | } | 0 |
1933 | } | - |
1934 | } else { // fall back to float math here as well | - |
1935 | qreal rw = data->m23 * (y + qreal(0.5)) + data->m13 * (x + qreal(0.5)) + data->m33; never executed (the execution status of this line is deduced): qreal rw = data->m23 * (y + qreal(0.5)) + data->m13 * (x + qreal(0.5)) + data->m33; | - |
1936 | while (buffer < end) { never evaluated: buffer < end | 0 |
1937 | qreal x = rx/rw; never executed (the execution status of this line is deduced): qreal x = rx/rw; | - |
1938 | qreal y = ry/rw; never executed (the execution status of this line is deduced): qreal y = ry/rw; | - |
1939 | t = (op->linear.dx*x + op->linear.dy *y) + op->linear.off; never executed (the execution status of this line is deduced): t = (op->linear.dx*x + op->linear.dy *y) + op->linear.off; | - |
1940 | | - |
1941 | *buffer = qt_gradient_pixel(&data->gradient, t); never executed (the execution status of this line is deduced): *buffer = qt_gradient_pixel(&data->gradient, t); | - |
1942 | rx += data->m11; never executed (the execution status of this line is deduced): rx += data->m11; | - |
1943 | ry += data->m12; never executed (the execution status of this line is deduced): ry += data->m12; | - |
1944 | rw += data->m13; never executed (the execution status of this line is deduced): rw += data->m13; | - |
1945 | if (!rw) { | 0 |
1946 | rw += data->m13; never executed (the execution status of this line is deduced): rw += data->m13; | - |
1947 | } | 0 |
1948 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
1949 | } | 0 |
1950 | } | 0 |
1951 | | - |
1952 | return b; executed: return b; Execution Count:43601 | 43601 |
1953 | } | - |
1954 | | - |
1955 | static void QT_FASTCALL getRadialGradientValues(RadialGradientValues *v, const QSpanData *data) | - |
1956 | { | - |
1957 | v->dx = data->gradient.radial.center.x - data->gradient.radial.focal.x; executed (the execution status of this line is deduced): v->dx = data->gradient.radial.center.x - data->gradient.radial.focal.x; | - |
1958 | v->dy = data->gradient.radial.center.y - data->gradient.radial.focal.y; executed (the execution status of this line is deduced): v->dy = data->gradient.radial.center.y - data->gradient.radial.focal.y; | - |
1959 | | - |
1960 | v->dr = data->gradient.radial.center.radius - data->gradient.radial.focal.radius; executed (the execution status of this line is deduced): v->dr = data->gradient.radial.center.radius - data->gradient.radial.focal.radius; | - |
1961 | v->sqrfr = data->gradient.radial.focal.radius * data->gradient.radial.focal.radius; executed (the execution status of this line is deduced): v->sqrfr = data->gradient.radial.focal.radius * data->gradient.radial.focal.radius; | - |
1962 | | - |
1963 | v->a = v->dr * v->dr - v->dx*v->dx - v->dy*v->dy; executed (the execution status of this line is deduced): v->a = v->dr * v->dr - v->dx*v->dx - v->dy*v->dy; | - |
1964 | v->inv2a = 1 / (2 * v->a); executed (the execution status of this line is deduced): v->inv2a = 1 / (2 * v->a); | - |
1965 | | - |
1966 | v->extended = !qFuzzyIsNull(data->gradient.radial.focal.radius) || v->a <= 0; partially evaluated: !qFuzzyIsNull(data->gradient.radial.focal.radius) no Evaluation Count:0 | yes Evaluation Count:519 |
partially evaluated: v->a <= 0 no Evaluation Count:0 | yes Evaluation Count:519 |
| 0-519 |
1967 | } executed: } Execution Count:519 | 519 |
1968 | | - |
1969 | class RadialFetchPlain | - |
1970 | { | - |
1971 | public: | - |
1972 | static inline void fetch(uint *buffer, uint *end, const Operator *op, const QSpanData *data, qreal det, | - |
1973 | qreal delta_det, qreal delta_delta_det, qreal b, qreal delta_b) | - |
1974 | { | - |
1975 | if (op->radial.extended) { never evaluated: op->radial.extended | 0 |
1976 | while (buffer < end) { never evaluated: buffer < end | 0 |
1977 | quint32 result = 0; never executed (the execution status of this line is deduced): quint32 result = 0; | - |
1978 | if (det >= 0) { never evaluated: det >= 0 | 0 |
1979 | qreal w = qSqrt(det) - b; never executed (the execution status of this line is deduced): qreal w = qSqrt(det) - b; | - |
1980 | if (data->gradient.radial.focal.radius + op->radial.dr * w >= 0) never evaluated: data->gradient.radial.focal.radius + op->radial.dr * w >= 0 | 0 |
1981 | result = qt_gradient_pixel(&data->gradient, w); never executed: result = qt_gradient_pixel(&data->gradient, w); | 0 |
1982 | } | 0 |
1983 | | - |
1984 | *buffer = result; never executed (the execution status of this line is deduced): *buffer = result; | - |
1985 | | - |
1986 | det += delta_det; never executed (the execution status of this line is deduced): det += delta_det; | - |
1987 | delta_det += delta_delta_det; never executed (the execution status of this line is deduced): delta_det += delta_delta_det; | - |
1988 | b += delta_b; never executed (the execution status of this line is deduced): b += delta_b; | - |
1989 | | - |
1990 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
1991 | } | 0 |
1992 | } else { | 0 |
1993 | while (buffer < end) { never evaluated: buffer < end | 0 |
1994 | *buffer++ = qt_gradient_pixel(&data->gradient, qSqrt(det) - b); never executed (the execution status of this line is deduced): *buffer++ = qt_gradient_pixel(&data->gradient, qSqrt(det) - b); | - |
1995 | | - |
1996 | det += delta_det; never executed (the execution status of this line is deduced): det += delta_det; | - |
1997 | delta_det += delta_delta_det; never executed (the execution status of this line is deduced): delta_det += delta_delta_det; | - |
1998 | b += delta_b; never executed (the execution status of this line is deduced): b += delta_b; | - |
1999 | } | 0 |
2000 | } | 0 |
2001 | } | - |
2002 | }; | - |
2003 | | - |
2004 | const uint * QT_FASTCALL qt_fetch_radial_gradient_plain(uint *buffer, const Operator *op, const QSpanData *data, | - |
2005 | int y, int x, int length) | - |
2006 | { | - |
2007 | return qt_fetch_radial_gradient_template<RadialFetchPlain>(buffer, op, data, y, x, length); never executed: return qt_fetch_radial_gradient_template<RadialFetchPlain>(buffer, op, data, y, x, length); | 0 |
2008 | } | - |
2009 | | - |
2010 | static SourceFetchProc qt_fetch_radial_gradient = qt_fetch_radial_gradient_plain; | - |
2011 | | - |
2012 | static const uint * QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Operator *, const QSpanData *data, | - |
2013 | int y, int x, int length) | - |
2014 | { | - |
2015 | const uint *b = buffer; never executed (the execution status of this line is deduced): const uint *b = buffer; | - |
2016 | qreal rx = data->m21 * (y + qreal(0.5)) never executed (the execution status of this line is deduced): qreal rx = data->m21 * (y + qreal(0.5)) | - |
2017 | + data->dx + data->m11 * (x + qreal(0.5)); never executed (the execution status of this line is deduced): + data->dx + data->m11 * (x + qreal(0.5)); | - |
2018 | qreal ry = data->m22 * (y + qreal(0.5)) never executed (the execution status of this line is deduced): qreal ry = data->m22 * (y + qreal(0.5)) | - |
2019 | + data->dy + data->m12 * (x + qreal(0.5)); never executed (the execution status of this line is deduced): + data->dy + data->m12 * (x + qreal(0.5)); | - |
2020 | bool affine = !data->m13 && !data->m23; never evaluated: !data->m13 never evaluated: !data->m23 | 0 |
2021 | | - |
2022 | const uint *end = buffer + length; never executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
2023 | if (affine) { | 0 |
2024 | rx -= data->gradient.conical.center.x; never executed (the execution status of this line is deduced): rx -= data->gradient.conical.center.x; | - |
2025 | ry -= data->gradient.conical.center.y; never executed (the execution status of this line is deduced): ry -= data->gradient.conical.center.y; | - |
2026 | while (buffer < end) { never evaluated: buffer < end | 0 |
2027 | qreal angle = qAtan2(ry, rx) + data->gradient.conical.angle; never executed (the execution status of this line is deduced): qreal angle = qAtan2(ry, rx) + data->gradient.conical.angle; | - |
2028 | | - |
2029 | *buffer = qt_gradient_pixel(&data->gradient, 1 - angle / (2*Q_PI)); never executed (the execution status of this line is deduced): *buffer = qt_gradient_pixel(&data->gradient, 1 - angle / (2*Q_PI)); | - |
2030 | | - |
2031 | rx += data->m11; never executed (the execution status of this line is deduced): rx += data->m11; | - |
2032 | ry += data->m12; never executed (the execution status of this line is deduced): ry += data->m12; | - |
2033 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
2034 | } | 0 |
2035 | } else { | 0 |
2036 | qreal rw = data->m23 * (y + qreal(0.5)) never executed (the execution status of this line is deduced): qreal rw = data->m23 * (y + qreal(0.5)) | - |
2037 | + data->m33 + data->m13 * (x + qreal(0.5)); never executed (the execution status of this line is deduced): + data->m33 + data->m13 * (x + qreal(0.5)); | - |
2038 | if (!rw) | 0 |
2039 | rw = 1; | 0 |
2040 | while (buffer < end) { never evaluated: buffer < end | 0 |
2041 | qreal angle = qAtan2(ry/rw - data->gradient.conical.center.x, never executed (the execution status of this line is deduced): qreal angle = qAtan2(ry/rw - data->gradient.conical.center.x, | - |
2042 | rx/rw - data->gradient.conical.center.y) never executed (the execution status of this line is deduced): rx/rw - data->gradient.conical.center.y) | - |
2043 | + data->gradient.conical.angle; never executed (the execution status of this line is deduced): + data->gradient.conical.angle; | - |
2044 | | - |
2045 | *buffer = qt_gradient_pixel(&data->gradient, 1. - angle / (2*Q_PI)); never executed (the execution status of this line is deduced): *buffer = qt_gradient_pixel(&data->gradient, 1. - angle / (2*Q_PI)); | - |
2046 | | - |
2047 | rx += data->m11; never executed (the execution status of this line is deduced): rx += data->m11; | - |
2048 | ry += data->m12; never executed (the execution status of this line is deduced): ry += data->m12; | - |
2049 | rw += data->m13; never executed (the execution status of this line is deduced): rw += data->m13; | - |
2050 | if (!rw) { | 0 |
2051 | rw += data->m13; never executed (the execution status of this line is deduced): rw += data->m13; | - |
2052 | } | 0 |
2053 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
2054 | } | 0 |
2055 | } | 0 |
2056 | return b; never executed: return b; | 0 |
2057 | } | - |
2058 | | - |
2059 | #if defined(Q_CC_RVCT) | - |
2060 | // Force ARM code generation for comp_func_* -methods | - |
2061 | # pragma push | - |
2062 | # pragma arm | - |
2063 | # if defined(Q_PROCESSOR_ARM_V6) | - |
2064 | static __forceinline void preload(const uint *start) | - |
2065 | { | - |
2066 | asm( "pld [start]" ); | - |
2067 | } | - |
2068 | static const uint L2CacheLineLength = 32; | - |
2069 | static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint); | - |
2070 | # define PRELOAD_INIT(x) preload(x); | - |
2071 | # define PRELOAD_INIT2(x,y) PRELOAD_INIT(x) PRELOAD_INIT(y) | - |
2072 | # define PRELOAD_COND(x) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); | - |
2073 | // Two consecutive preloads stall, so space them out a bit by using different modulus. | - |
2074 | # define PRELOAD_COND2(x,y) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); \ | - |
2075 | if (((uint)&y[i])%L2CacheLineLength == 16) preload(&y[i] + L2CacheLineLengthInInts); | - |
2076 | # endif // Q_PROCESSOR_ARM_V6 | - |
2077 | #endif // Q_CC_RVCT | - |
2078 | | - |
2079 | #if !defined(Q_CC_RVCT) || !defined(Q_PROCESSOR_ARM_V6) | - |
2080 | # define PRELOAD_INIT(x) | - |
2081 | # define PRELOAD_INIT2(x,y) | - |
2082 | # define PRELOAD_COND(x) | - |
2083 | # define PRELOAD_COND2(x,y) | - |
2084 | #endif | - |
2085 | | - |
2086 | /* The constant alpha factor describes an alpha factor that gets applied | - |
2087 | to the result of the composition operation combining it with the destination. | - |
2088 | | - |
2089 | The intent is that if const_alpha == 0. we get back dest, and if const_alpha == 1. | - |
2090 | we get the unmodified operation | - |
2091 | | - |
2092 | result = src op dest | - |
2093 | dest = result * const_alpha + dest * (1. - const_alpha) | - |
2094 | | - |
2095 | This means that in the comments below, the first line is the const_alpha==255 case, the | - |
2096 | second line the general one. | - |
2097 | | - |
2098 | In the lines below: | - |
2099 | s == src, sa == alpha(src), sia = 1 - alpha(src) | - |
2100 | d == dest, da == alpha(dest), dia = 1 - alpha(dest) | - |
2101 | ca = const_alpha, cia = 1 - const_alpha | - |
2102 | | - |
2103 | The methods exist in two variants. One where we have a constant source, the other | - |
2104 | where the source is an array of pixels. | - |
2105 | */ | - |
2106 | | - |
2107 | /* | - |
2108 | result = 0 | - |
2109 | d = d * cia | - |
2110 | */ | - |
2111 | #define comp_func_Clear_impl(dest, length, const_alpha)\ | - |
2112 | {\ | - |
2113 | if (const_alpha == 255) {\ | - |
2114 | QT_MEMFILL_UINT(dest, length, 0);\ | - |
2115 | } else {\ | - |
2116 | int ialpha = 255 - const_alpha;\ | - |
2117 | PRELOAD_INIT(dest)\ | - |
2118 | for (int i = 0; i < length; ++i) {\ | - |
2119 | PRELOAD_COND(dest)\ | - |
2120 | dest[i] = BYTE_MUL(dest[i], ialpha);\ | - |
2121 | }\ | - |
2122 | }\ | - |
2123 | } | - |
2124 | | - |
2125 | void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha) | - |
2126 | { | - |
2127 | comp_func_Clear_impl(dest, length, const_alpha); never executed: } never executed: } never executed: } never evaluated: const_alpha == 255 never evaluated: i < length | 0 |
2128 | } | - |
2129 | | - |
2130 | void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha) | - |
2131 | { | - |
2132 | comp_func_Clear_impl(dest, length, const_alpha); never executed: } never executed: } never executed: } never evaluated: const_alpha == 255 never evaluated: i < length | 0 |
2133 | } | - |
2134 | | - |
2135 | /* | - |
2136 | result = s | - |
2137 | dest = s * ca + d * cia | - |
2138 | */ | - |
2139 | void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha) | - |
2140 | { | - |
2141 | if (const_alpha == 255) { evaluated: const_alpha == 255 yes Evaluation Count:161536 | yes Evaluation Count:65302 |
| 65302-161536 |
2142 | QT_MEMFILL_UINT(dest, length, color); executed (the execution status of this line is deduced): qt_memfill<quint32>(dest, color, length);; | - |
2143 | } else { executed: } Execution Count:161536 | 161536 |
2144 | int ialpha = 255 - const_alpha; executed (the execution status of this line is deduced): int ialpha = 255 - const_alpha; | - |
2145 | color = BYTE_MUL(color, const_alpha); executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2146 | PRELOAD_INIT(dest) | - |
2147 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:65302 | yes Evaluation Count:65302 |
| 65302 |
2148 | PRELOAD_COND(dest) | - |
2149 | dest[i] = color + BYTE_MUL(dest[i], ialpha); executed (the execution status of this line is deduced): dest[i] = color + BYTE_MUL(dest[i], ialpha); | - |
2150 | } executed: } Execution Count:65302 | 65302 |
2151 | } executed: } Execution Count:65302 | 65302 |
2152 | } | - |
2153 | | - |
2154 | void QT_FASTCALL comp_func_Source(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2155 | { | - |
2156 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2157 | ::memcpy(dest, src, length * sizeof(uint)); never executed (the execution status of this line is deduced): ::memcpy(dest, src, length * sizeof(uint)); | - |
2158 | } else { | 0 |
2159 | int ialpha = 255 - const_alpha; never executed (the execution status of this line is deduced): int ialpha = 255 - const_alpha; | - |
2160 | PRELOAD_INIT2(dest, src) | - |
2161 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2162 | PRELOAD_COND2(dest, src) | - |
2163 | dest[i] = INTERPOLATE_PIXEL_255(src[i], const_alpha, dest[i], ialpha); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(src[i], const_alpha, dest[i], ialpha); | - |
2164 | } | 0 |
2165 | } | 0 |
2166 | } | - |
2167 | | - |
2168 | void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint) | - |
2169 | { | - |
2170 | } | - |
2171 | | - |
2172 | void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint) | - |
2173 | { | - |
2174 | } | - |
2175 | | - |
2176 | /* | - |
2177 | result = s + d * sia | - |
2178 | dest = (s + d * sia) * ca + d * cia | - |
2179 | = s * ca + d * (sia * ca + cia) | - |
2180 | = s * ca + d * (1 - sa*ca) | - |
2181 | */ | - |
2182 | void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha) | - |
2183 | { | - |
2184 | if ((const_alpha & qAlpha(color)) == 255) { never evaluated: (const_alpha & qAlpha(color)) == 255 | 0 |
2185 | QT_MEMFILL_UINT(dest, length, color); never executed (the execution status of this line is deduced): qt_memfill<quint32>(dest, color, length);; | - |
2186 | } else { | 0 |
2187 | if (const_alpha != 255) never evaluated: const_alpha != 255 | 0 |
2188 | color = BYTE_MUL(color, const_alpha); never executed: color = BYTE_MUL(color, const_alpha); | 0 |
2189 | PRELOAD_INIT(dest) | - |
2190 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2191 | PRELOAD_COND(dest) | - |
2192 | dest[i] = color + BYTE_MUL(dest[i], qAlpha(~color)); never executed (the execution status of this line is deduced): dest[i] = color + BYTE_MUL(dest[i], qAlpha(~color)); | - |
2193 | } | 0 |
2194 | } | 0 |
2195 | } | - |
2196 | | - |
2197 | void QT_FASTCALL comp_func_SourceOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2198 | { | - |
2199 | PRELOAD_INIT2(dest, src) | - |
2200 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2201 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2202 | PRELOAD_COND2(dest, src) | - |
2203 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2204 | if (s >= 0xff000000) never evaluated: s >= 0xff000000 | 0 |
2205 | dest[i] = s; never executed: dest[i] = s; | 0 |
2206 | else if (s != 0) | 0 |
2207 | dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s)); never executed: dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s)); | 0 |
2208 | } | - |
2209 | } else { | 0 |
2210 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2211 | PRELOAD_COND2(dest, src) | - |
2212 | uint s = BYTE_MUL(src[i], const_alpha); never executed (the execution status of this line is deduced): uint s = BYTE_MUL(src[i], const_alpha); | - |
2213 | dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s)); never executed (the execution status of this line is deduced): dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s)); | - |
2214 | } | 0 |
2215 | } | 0 |
2216 | } | - |
2217 | | - |
2218 | /* | - |
2219 | result = d + s * dia | - |
2220 | dest = (d + s * dia) * ca + d * cia | - |
2221 | = d + s * dia * ca | - |
2222 | */ | - |
2223 | void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha) | - |
2224 | { | - |
2225 | if (const_alpha != 255) never evaluated: const_alpha != 255 | 0 |
2226 | color = BYTE_MUL(color, const_alpha); never executed: color = BYTE_MUL(color, const_alpha); | 0 |
2227 | PRELOAD_INIT(dest) | - |
2228 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2229 | PRELOAD_COND(dest) | - |
2230 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2231 | dest[i] = d + BYTE_MUL(color, qAlpha(~d)); never executed (the execution status of this line is deduced): dest[i] = d + BYTE_MUL(color, qAlpha(~d)); | - |
2232 | } | 0 |
2233 | } | 0 |
2234 | | - |
2235 | void QT_FASTCALL comp_func_DestinationOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2236 | { | - |
2237 | PRELOAD_INIT2(dest, src) | - |
2238 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2239 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2240 | PRELOAD_COND2(dest, src) | - |
2241 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2242 | dest[i] = d + BYTE_MUL(src[i], qAlpha(~d)); never executed (the execution status of this line is deduced): dest[i] = d + BYTE_MUL(src[i], qAlpha(~d)); | - |
2243 | } | 0 |
2244 | } else { | 0 |
2245 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2246 | PRELOAD_COND2(dest, src) | - |
2247 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2248 | uint s = BYTE_MUL(src[i], const_alpha); never executed (the execution status of this line is deduced): uint s = BYTE_MUL(src[i], const_alpha); | - |
2249 | dest[i] = d + BYTE_MUL(s, qAlpha(~d)); never executed (the execution status of this line is deduced): dest[i] = d + BYTE_MUL(s, qAlpha(~d)); | - |
2250 | } | 0 |
2251 | } | 0 |
2252 | } | - |
2253 | | - |
2254 | /* | - |
2255 | result = s * da | - |
2256 | dest = s * da * ca + d * cia | - |
2257 | */ | - |
2258 | void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha) | - |
2259 | { | - |
2260 | PRELOAD_INIT(dest) | - |
2261 | if (const_alpha == 255) { partially evaluated: const_alpha == 255 yes Evaluation Count:2663 | no Evaluation Count:0 |
| 0-2663 |
2262 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:441657 | yes Evaluation Count:2663 |
| 2663-441657 |
2263 | PRELOAD_COND(dest) | - |
2264 | dest[i] = BYTE_MUL(color, qAlpha(dest[i])); executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(color, qAlpha(dest[i])); | - |
2265 | } executed: } Execution Count:441657 | 441657 |
2266 | } else { executed: } Execution Count:2663 | 2663 |
2267 | color = BYTE_MUL(color, const_alpha); never executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2268 | uint cia = 255 - const_alpha; never executed (the execution status of this line is deduced): uint cia = 255 - const_alpha; | - |
2269 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2270 | PRELOAD_COND(dest) | - |
2271 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2272 | dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(d), d, cia); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(d), d, cia); | - |
2273 | } | 0 |
2274 | } | 0 |
2275 | } | - |
2276 | | - |
2277 | void QT_FASTCALL comp_func_SourceIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2278 | { | - |
2279 | PRELOAD_INIT2(dest, src) | - |
2280 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2281 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2282 | PRELOAD_COND2(dest, src) | - |
2283 | dest[i] = BYTE_MUL(src[i], qAlpha(dest[i])); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(src[i], qAlpha(dest[i])); | - |
2284 | } | 0 |
2285 | } else { | 0 |
2286 | uint cia = 255 - const_alpha; never executed (the execution status of this line is deduced): uint cia = 255 - const_alpha; | - |
2287 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2288 | PRELOAD_COND2(dest, src) | - |
2289 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2290 | uint s = BYTE_MUL(src[i], const_alpha); never executed (the execution status of this line is deduced): uint s = BYTE_MUL(src[i], const_alpha); | - |
2291 | dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, cia); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, cia); | - |
2292 | } | 0 |
2293 | } | 0 |
2294 | } | - |
2295 | | - |
2296 | /* | - |
2297 | result = d * sa | - |
2298 | dest = d * sa * ca + d * cia | - |
2299 | = d * (sa * ca + cia) | - |
2300 | */ | - |
2301 | void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha) | - |
2302 | { | - |
2303 | uint a = qAlpha(color); never executed (the execution status of this line is deduced): uint a = qAlpha(color); | - |
2304 | if (const_alpha != 255) { never evaluated: const_alpha != 255 | 0 |
2305 | a = BYTE_MUL(a, const_alpha) + 255 - const_alpha; never executed (the execution status of this line is deduced): a = BYTE_MUL(a, const_alpha) + 255 - const_alpha; | - |
2306 | } | 0 |
2307 | PRELOAD_INIT(dest) | - |
2308 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2309 | PRELOAD_COND(dest) | - |
2310 | dest[i] = BYTE_MUL(dest[i], a); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], a); | - |
2311 | } | 0 |
2312 | } | 0 |
2313 | | - |
2314 | void QT_FASTCALL comp_func_DestinationIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2315 | { | - |
2316 | PRELOAD_INIT2(dest, src) | - |
2317 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2318 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2319 | PRELOAD_COND2(dest, src) | - |
2320 | dest[i] = BYTE_MUL(dest[i], qAlpha(src[i])); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], qAlpha(src[i])); | - |
2321 | } | 0 |
2322 | } else { | 0 |
2323 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2324 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2325 | PRELOAD_COND2(dest, src) | - |
2326 | uint a = BYTE_MUL(qAlpha(src[i]), const_alpha) + cia; never executed (the execution status of this line is deduced): uint a = BYTE_MUL(qAlpha(src[i]), const_alpha) + cia; | - |
2327 | dest[i] = BYTE_MUL(dest[i], a); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], a); | - |
2328 | } | 0 |
2329 | } | 0 |
2330 | } | - |
2331 | | - |
2332 | /* | - |
2333 | result = s * dia | - |
2334 | dest = s * dia * ca + d * cia | - |
2335 | */ | - |
2336 | | - |
2337 | void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha) | - |
2338 | { | - |
2339 | PRELOAD_INIT(dest) | - |
2340 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2341 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2342 | PRELOAD_COND(dest) | - |
2343 | dest[i] = BYTE_MUL(color, qAlpha(~dest[i])); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(color, qAlpha(~dest[i])); | - |
2344 | } | 0 |
2345 | } else { | 0 |
2346 | color = BYTE_MUL(color, const_alpha); never executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2347 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2348 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2349 | PRELOAD_COND(dest) | - |
2350 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2351 | dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(~d), d, cia); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(~d), d, cia); | - |
2352 | } | 0 |
2353 | } | 0 |
2354 | } | - |
2355 | | - |
2356 | void QT_FASTCALL comp_func_SourceOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2357 | { | - |
2358 | PRELOAD_INIT2(dest, src) | - |
2359 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2360 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2361 | PRELOAD_COND2(dest, src) | - |
2362 | dest[i] = BYTE_MUL(src[i], qAlpha(~dest[i])); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(src[i], qAlpha(~dest[i])); | - |
2363 | } | 0 |
2364 | } else { | 0 |
2365 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2366 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2367 | PRELOAD_COND2(dest, src) | - |
2368 | uint s = BYTE_MUL(src[i], const_alpha); never executed (the execution status of this line is deduced): uint s = BYTE_MUL(src[i], const_alpha); | - |
2369 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2370 | dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, cia); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, cia); | - |
2371 | } | 0 |
2372 | } | 0 |
2373 | } | - |
2374 | | - |
2375 | /* | - |
2376 | result = d * sia | - |
2377 | dest = d * sia * ca + d * cia | - |
2378 | = d * (sia * ca + cia) | - |
2379 | */ | - |
2380 | void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha) | - |
2381 | { | - |
2382 | uint a = qAlpha(~color); never executed (the execution status of this line is deduced): uint a = qAlpha(~color); | - |
2383 | if (const_alpha != 255) never evaluated: const_alpha != 255 | 0 |
2384 | a = BYTE_MUL(a, const_alpha) + 255 - const_alpha; never executed: a = BYTE_MUL(a, const_alpha) + 255 - const_alpha; | 0 |
2385 | PRELOAD_INIT(dest) | - |
2386 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2387 | PRELOAD_COND(dest) | - |
2388 | dest[i] = BYTE_MUL(dest[i], a); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], a); | - |
2389 | } | 0 |
2390 | } | 0 |
2391 | | - |
2392 | void QT_FASTCALL comp_func_DestinationOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2393 | { | - |
2394 | PRELOAD_INIT2(dest, src) | - |
2395 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2396 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2397 | PRELOAD_COND2(dest, src) | - |
2398 | dest[i] = BYTE_MUL(dest[i], qAlpha(~src[i])); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], qAlpha(~src[i])); | - |
2399 | } | 0 |
2400 | } else { | 0 |
2401 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2402 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2403 | PRELOAD_COND2(dest, src) | - |
2404 | uint sia = BYTE_MUL(qAlpha(~src[i]), const_alpha) + cia; never executed (the execution status of this line is deduced): uint sia = BYTE_MUL(qAlpha(~src[i]), const_alpha) + cia; | - |
2405 | dest[i] = BYTE_MUL(dest[i], sia); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], sia); | - |
2406 | } | 0 |
2407 | } | 0 |
2408 | } | - |
2409 | | - |
2410 | /* | - |
2411 | result = s*da + d*sia | - |
2412 | dest = s*da*ca + d*sia*ca + d *cia | - |
2413 | = s*ca * da + d * (sia*ca + cia) | - |
2414 | = s*ca * da + d * (1 - sa*ca) | - |
2415 | */ | - |
2416 | void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha) | - |
2417 | { | - |
2418 | if (const_alpha != 255) { partially evaluated: const_alpha != 255 no Evaluation Count:0 | yes Evaluation Count:243 |
| 0-243 |
2419 | color = BYTE_MUL(color, const_alpha); never executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2420 | } | 0 |
2421 | uint sia = qAlpha(~color); executed (the execution status of this line is deduced): uint sia = qAlpha(~color); | - |
2422 | PRELOAD_INIT(dest) | - |
2423 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:4859 | yes Evaluation Count:243 |
| 243-4859 |
2424 | PRELOAD_COND(dest) | - |
2425 | dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(dest[i]), dest[i], sia); executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(dest[i]), dest[i], sia); | - |
2426 | } executed: } Execution Count:4859 | 4859 |
2427 | } executed: } Execution Count:243 | 243 |
2428 | | - |
2429 | void QT_FASTCALL comp_func_SourceAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2430 | { | - |
2431 | PRELOAD_INIT2(dest, src) | - |
2432 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2433 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2434 | PRELOAD_COND2(dest, src) | - |
2435 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2436 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2437 | dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, qAlpha(~s)); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, qAlpha(~s)); | - |
2438 | } | 0 |
2439 | } else { | 0 |
2440 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2441 | PRELOAD_COND2(dest, src) | - |
2442 | uint s = BYTE_MUL(src[i], const_alpha); never executed (the execution status of this line is deduced): uint s = BYTE_MUL(src[i], const_alpha); | - |
2443 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2444 | dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, qAlpha(~s)); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(d), d, qAlpha(~s)); | - |
2445 | } | 0 |
2446 | } | 0 |
2447 | } | - |
2448 | | - |
2449 | /* | - |
2450 | result = d*sa + s*dia | - |
2451 | dest = d*sa*ca + s*dia*ca + d *cia | - |
2452 | = s*ca * dia + d * (sa*ca + cia) | - |
2453 | */ | - |
2454 | void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha) | - |
2455 | { | - |
2456 | uint a = qAlpha(color); never executed (the execution status of this line is deduced): uint a = qAlpha(color); | - |
2457 | if (const_alpha != 255) { never evaluated: const_alpha != 255 | 0 |
2458 | color = BYTE_MUL(color, const_alpha); never executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2459 | a = qAlpha(color) + 255 - const_alpha; never executed (the execution status of this line is deduced): a = qAlpha(color) + 255 - const_alpha; | - |
2460 | } | 0 |
2461 | PRELOAD_INIT(dest) | - |
2462 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2463 | PRELOAD_COND(dest) | - |
2464 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2465 | dest[i] = INTERPOLATE_PIXEL_255(d, a, color, qAlpha(~d)); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(d, a, color, qAlpha(~d)); | - |
2466 | } | 0 |
2467 | } | 0 |
2468 | | - |
2469 | void QT_FASTCALL comp_func_DestinationAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2470 | { | - |
2471 | PRELOAD_INIT2(dest, src) | - |
2472 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2473 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2474 | PRELOAD_COND2(dest, src) | - |
2475 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2476 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2477 | dest[i] = INTERPOLATE_PIXEL_255(d, qAlpha(s), s, qAlpha(~d)); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(d, qAlpha(s), s, qAlpha(~d)); | - |
2478 | } | 0 |
2479 | } else { | 0 |
2480 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2481 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2482 | PRELOAD_COND2(dest, src) | - |
2483 | uint s = BYTE_MUL(src[i], const_alpha); never executed (the execution status of this line is deduced): uint s = BYTE_MUL(src[i], const_alpha); | - |
2484 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2485 | uint a = qAlpha(s) + cia; never executed (the execution status of this line is deduced): uint a = qAlpha(s) + cia; | - |
2486 | dest[i] = INTERPOLATE_PIXEL_255(d, a, s, qAlpha(~d)); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(d, a, s, qAlpha(~d)); | - |
2487 | } | 0 |
2488 | } | 0 |
2489 | } | - |
2490 | | - |
2491 | /* | - |
2492 | result = d*sia + s*dia | - |
2493 | dest = d*sia*ca + s*dia*ca + d *cia | - |
2494 | = s*ca * dia + d * (sia*ca + cia) | - |
2495 | = s*ca * dia + d * (1 - sa*ca) | - |
2496 | */ | - |
2497 | void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha) | - |
2498 | { | - |
2499 | if (const_alpha != 255) never evaluated: const_alpha != 255 | 0 |
2500 | color = BYTE_MUL(color, const_alpha); never executed: color = BYTE_MUL(color, const_alpha); | 0 |
2501 | uint sia = qAlpha(~color); never executed (the execution status of this line is deduced): uint sia = qAlpha(~color); | - |
2502 | | - |
2503 | PRELOAD_INIT(dest) | - |
2504 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2505 | PRELOAD_COND(dest) | - |
2506 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2507 | dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(~d), d, sia); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(color, qAlpha(~d), d, sia); | - |
2508 | } | 0 |
2509 | } | 0 |
2510 | | - |
2511 | void QT_FASTCALL comp_func_XOR(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2512 | { | - |
2513 | PRELOAD_INIT2(dest, src) | - |
2514 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2515 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2516 | PRELOAD_COND2(dest, src) | - |
2517 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2518 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2519 | dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, qAlpha(~s)); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, qAlpha(~s)); | - |
2520 | } | 0 |
2521 | } else { | 0 |
2522 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2523 | PRELOAD_COND2(dest, src) | - |
2524 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2525 | uint s = BYTE_MUL(src[i], const_alpha); never executed (the execution status of this line is deduced): uint s = BYTE_MUL(src[i], const_alpha); | - |
2526 | dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, qAlpha(~s)); never executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(s, qAlpha(~d), d, qAlpha(~s)); | - |
2527 | } | 0 |
2528 | } | 0 |
2529 | } | - |
2530 | | - |
2531 | struct QFullCoverage { | - |
2532 | inline void store(uint *dest, const uint src) const | - |
2533 | { | - |
2534 | *dest = src; executed (the execution status of this line is deduced): *dest = src; | - |
2535 | } executed: } Execution Count:871472 | 871472 |
2536 | }; | - |
2537 | | - |
2538 | struct QPartialCoverage { | - |
2539 | inline QPartialCoverage(uint const_alpha) | - |
2540 | : ca(const_alpha) | - |
2541 | , ica(255 - const_alpha) | - |
2542 | { | - |
2543 | } | 0 |
2544 | | - |
2545 | inline void store(uint *dest, const uint src) const | - |
2546 | { | - |
2547 | *dest = INTERPOLATE_PIXEL_255(src, ca, *dest, ica); never executed (the execution status of this line is deduced): *dest = INTERPOLATE_PIXEL_255(src, ca, *dest, ica); | - |
2548 | } | 0 |
2549 | | - |
2550 | private: | - |
2551 | const uint ca; | - |
2552 | const uint ica; | - |
2553 | }; | - |
2554 | | - |
2555 | static inline int mix_alpha(int da, int sa) | - |
2556 | { | - |
2557 | return 255 - ((255 - sa) * (255 - da) >> 8); executed: return 255 - ((255 - sa) * (255 - da) >> 8); Execution Count:701472 | 701472 |
2558 | } | - |
2559 | | - |
2560 | /* | - |
2561 | Dca' = Sca.Da + Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2562 | = Sca + Dca | - |
2563 | */ | - |
2564 | template <typename T> | - |
2565 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Plus_impl(uint *dest, int length, uint color, const T &coverage) | - |
2566 | { | - |
2567 | uint s = color; executed (the execution status of this line is deduced): uint s = color; | - |
2568 | | - |
2569 | PRELOAD_INIT(dest) | - |
2570 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:170000 | yes Evaluation Count:1700 |
| 1700-170000 |
2571 | PRELOAD_COND(dest) | - |
2572 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2573 | d = comp_func_Plus_one_pixel(d, s); executed (the execution status of this line is deduced): d = comp_func_Plus_one_pixel(d, s); | - |
2574 | coverage.store(&dest[i], d); executed (the execution status of this line is deduced): coverage.store(&dest[i], d); | - |
2575 | } executed: } Execution Count:170000 | 170000 |
2576 | } executed: } Execution Count:1700 | 1700 |
2577 | | - |
2578 | void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha) | - |
2579 | { | - |
2580 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:1700 | no Evaluation Count:0 |
| 0-1700 |
2581 | comp_func_solid_Plus_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Plus_impl(dest, length, color, QFullCoverage()); Execution Count:1700 | 1700 |
2582 | else | - |
2583 | comp_func_solid_Plus_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_Plus_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
2584 | } | - |
2585 | | - |
2586 | template <typename T> | - |
2587 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Plus_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
2588 | { | - |
2589 | PRELOAD_INIT2(dest, src) | - |
2590 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2591 | PRELOAD_COND2(dest, src) | - |
2592 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2593 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2594 | | - |
2595 | d = comp_func_Plus_one_pixel(d, s); never executed (the execution status of this line is deduced): d = comp_func_Plus_one_pixel(d, s); | - |
2596 | | - |
2597 | coverage.store(&dest[i], d); never executed (the execution status of this line is deduced): coverage.store(&dest[i], d); | - |
2598 | } | 0 |
2599 | } | 0 |
2600 | | - |
2601 | void QT_FASTCALL comp_func_Plus(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2602 | { | - |
2603 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2604 | comp_func_Plus_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Plus_impl(dest, src, length, QFullCoverage()); | 0 |
2605 | else | - |
2606 | comp_func_Plus_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Plus_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2607 | } | - |
2608 | | - |
2609 | /* | - |
2610 | Dca' = Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2611 | */ | - |
2612 | static inline int multiply_op(int dst, int src, int da, int sa) | - |
2613 | { | - |
2614 | return qt_div_255(src * dst + src * (255 - da) + dst * (255 - sa)); executed: return qt_div_255(src * dst + src * (255 - da) + dst * (255 - sa)); Execution Count:210000 | 210000 |
2615 | } | - |
2616 | | - |
2617 | template <typename T> | - |
2618 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Multiply_impl(uint *dest, int length, uint color, const T &coverage) | - |
2619 | { | - |
2620 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2621 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2622 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2623 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2624 | | - |
2625 | PRELOAD_INIT(dest) | - |
2626 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
2627 | PRELOAD_COND(dest) | - |
2628 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2629 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2630 | | - |
2631 | #define OP(a, b) multiply_op(a, b, da, sa) | - |
2632 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = multiply_op(qRed(d), sr, da, sa); | - |
2633 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = multiply_op(qBlue(d), sb, da, sa); | - |
2634 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = multiply_op(qGreen(d), sg, da, sa); | - |
2635 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2636 | #undef OP | - |
2637 | | - |
2638 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2639 | } executed: } Execution Count:70000 | 70000 |
2640 | } executed: } Execution Count:700 | 700 |
2641 | | - |
2642 | void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha) | - |
2643 | { | - |
2644 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
2645 | comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
2646 | else | - |
2647 | comp_func_solid_Multiply_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_Multiply_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
2648 | } | - |
2649 | | - |
2650 | template <typename T> | - |
2651 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Multiply_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
2652 | { | - |
2653 | PRELOAD_INIT2(dest, src) | - |
2654 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2655 | PRELOAD_COND2(dest, src) | - |
2656 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2657 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2658 | | - |
2659 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2660 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2661 | | - |
2662 | #define OP(a, b) multiply_op(a, b, da, sa) | - |
2663 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = multiply_op(qRed(d), qRed(s), da, sa); | - |
2664 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = multiply_op(qBlue(d), qBlue(s), da, sa); | - |
2665 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = multiply_op(qGreen(d), qGreen(s), da, sa); | - |
2666 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2667 | #undef OP | - |
2668 | | - |
2669 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2670 | } | 0 |
2671 | } | 0 |
2672 | | - |
2673 | void QT_FASTCALL comp_func_Multiply(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2674 | { | - |
2675 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2676 | comp_func_Multiply_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Multiply_impl(dest, src, length, QFullCoverage()); | 0 |
2677 | else | - |
2678 | comp_func_Multiply_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Multiply_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2679 | } | - |
2680 | | - |
2681 | /* | - |
2682 | Dca' = (Sca.Da + Dca.Sa - Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2683 | = Sca + Dca - Sca.Dca | - |
2684 | */ | - |
2685 | template <typename T> | - |
2686 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Screen_impl(uint *dest, int length, uint color, const T &coverage) | - |
2687 | { | - |
2688 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2689 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2690 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2691 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2692 | | - |
2693 | PRELOAD_INIT(dest) | - |
2694 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:111472 | yes Evaluation Count:988 |
| 988-111472 |
2695 | PRELOAD_COND(dest) | - |
2696 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2697 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2698 | | - |
2699 | #define OP(a, b) 255 - qt_div_255((255-a) * (255-b)) | - |
2700 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = 255 - qt_div_255((255-qRed(d)) * (255-sr)); | - |
2701 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = 255 - qt_div_255((255-qBlue(d)) * (255-sb)); | - |
2702 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = 255 - qt_div_255((255-qGreen(d)) * (255-sg)); | - |
2703 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2704 | #undef OP | - |
2705 | | - |
2706 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2707 | } executed: } Execution Count:111472 | 111472 |
2708 | } executed: } Execution Count:988 | 988 |
2709 | | - |
2710 | void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha) | - |
2711 | { | - |
2712 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:988 | no Evaluation Count:0 |
| 0-988 |
2713 | comp_func_solid_Screen_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Screen_impl(dest, length, color, QFullCoverage()); Execution Count:988 | 988 |
2714 | else | - |
2715 | comp_func_solid_Screen_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_Screen_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
2716 | } | - |
2717 | | - |
2718 | template <typename T> | - |
2719 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Screen_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
2720 | { | - |
2721 | PRELOAD_INIT2(dest, src) | - |
2722 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2723 | PRELOAD_COND2(dest, src) | - |
2724 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2725 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2726 | | - |
2727 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2728 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2729 | | - |
2730 | #define OP(a, b) 255 - (((255-a) * (255-b)) >> 8) | - |
2731 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = 255 - (((255-qRed(d)) * (255-qRed(s))) >> 8); | - |
2732 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = 255 - (((255-qBlue(d)) * (255-qBlue(s))) >> 8); | - |
2733 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = 255 - (((255-qGreen(d)) * (255-qGreen(s))) >> 8); | - |
2734 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2735 | #undef OP | - |
2736 | | - |
2737 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2738 | } | 0 |
2739 | } | 0 |
2740 | | - |
2741 | void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha) | - |
2742 | { | - |
2743 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2744 | comp_func_Screen_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Screen_impl(dest, src, length, QFullCoverage()); | 0 |
2745 | else | - |
2746 | comp_func_Screen_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Screen_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2747 | } | - |
2748 | | - |
2749 | /* | - |
2750 | if 2.Dca < Da | - |
2751 | Dca' = 2.Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2752 | otherwise | - |
2753 | Dca' = Sa.Da - 2.(Da - Dca).(Sa - Sca) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2754 | */ | - |
2755 | static inline int overlay_op(int dst, int src, int da, int sa) | - |
2756 | { | - |
2757 | const int temp = src * (255 - da) + dst * (255 - sa); executed (the execution status of this line is deduced): const int temp = src * (255 - da) + dst * (255 - sa); | - |
2758 | if (2 * dst < da) evaluated: 2 * dst < da yes Evaluation Count:60000 | yes Evaluation Count:60000 |
| 60000 |
2759 | return qt_div_255(2 * src * dst + temp); executed: return qt_div_255(2 * src * dst + temp); Execution Count:60000 | 60000 |
2760 | else | - |
2761 | return qt_div_255(sa * da - 2 * (da - dst) * (sa - src) + temp); executed: return qt_div_255(sa * da - 2 * (da - dst) * (sa - src) + temp); Execution Count:60000 | 60000 |
2762 | } | - |
2763 | | - |
2764 | template <typename T> | - |
2765 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Overlay_impl(uint *dest, int length, uint color, const T &coverage) | - |
2766 | { | - |
2767 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2768 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2769 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2770 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2771 | | - |
2772 | PRELOAD_INIT(dest) | - |
2773 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:40000 | yes Evaluation Count:400 |
| 400-40000 |
2774 | PRELOAD_COND(dest) | - |
2775 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2776 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2777 | | - |
2778 | #define OP(a, b) overlay_op(a, b, da, sa) | - |
2779 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = overlay_op(qRed(d), sr, da, sa); | - |
2780 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = overlay_op(qBlue(d), sb, da, sa); | - |
2781 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = overlay_op(qGreen(d), sg, da, sa); | - |
2782 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2783 | #undef OP | - |
2784 | | - |
2785 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2786 | } executed: } Execution Count:40000 | 40000 |
2787 | } executed: } Execution Count:400 | 400 |
2788 | | - |
2789 | void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha) | - |
2790 | { | - |
2791 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:400 | no Evaluation Count:0 |
| 0-400 |
2792 | comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage()); Execution Count:400 | 400 |
2793 | else | - |
2794 | comp_func_solid_Overlay_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_Overlay_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
2795 | } | - |
2796 | | - |
2797 | template <typename T> | - |
2798 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Overlay_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
2799 | { | - |
2800 | PRELOAD_INIT2(dest, src) | - |
2801 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2802 | PRELOAD_COND2(dest, src) | - |
2803 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2804 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2805 | | - |
2806 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2807 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2808 | | - |
2809 | #define OP(a, b) overlay_op(a, b, da, sa) | - |
2810 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = overlay_op(qRed(d), qRed(s), da, sa); | - |
2811 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = overlay_op(qBlue(d), qBlue(s), da, sa); | - |
2812 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = overlay_op(qGreen(d), qGreen(s), da, sa); | - |
2813 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2814 | #undef OP | - |
2815 | | - |
2816 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2817 | } | 0 |
2818 | } | 0 |
2819 | | - |
2820 | void QT_FASTCALL comp_func_Overlay(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2821 | { | - |
2822 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2823 | comp_func_Overlay_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Overlay_impl(dest, src, length, QFullCoverage()); | 0 |
2824 | else | - |
2825 | comp_func_Overlay_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Overlay_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2826 | } | - |
2827 | | - |
2828 | /* | - |
2829 | Dca' = min(Sca.Da, Dca.Sa) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2830 | Da' = Sa + Da - Sa.Da | - |
2831 | */ | - |
2832 | static inline int darken_op(int dst, int src, int da, int sa) | - |
2833 | { | - |
2834 | return qt_div_255(qMin(src * da, dst * sa) + src * (255 - da) + dst * (255 - sa)); executed: return qt_div_255(qMin(src * da, dst * sa) + src * (255 - da) + dst * (255 - sa)); Execution Count:210000 | 210000 |
2835 | } | - |
2836 | | - |
2837 | template <typename T> | - |
2838 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Darken_impl(uint *dest, int length, uint color, const T &coverage) | - |
2839 | { | - |
2840 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2841 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2842 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2843 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2844 | | - |
2845 | PRELOAD_INIT(dest) | - |
2846 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
2847 | PRELOAD_COND(dest) | - |
2848 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2849 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2850 | | - |
2851 | #define OP(a, b) darken_op(a, b, da, sa) | - |
2852 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = darken_op(qRed(d), sr, da, sa); | - |
2853 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = darken_op(qBlue(d), sb, da, sa); | - |
2854 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = darken_op(qGreen(d), sg, da, sa); | - |
2855 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2856 | #undef OP | - |
2857 | | - |
2858 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2859 | } executed: } Execution Count:70000 | 70000 |
2860 | } executed: } Execution Count:700 | 700 |
2861 | | - |
2862 | void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha) | - |
2863 | { | - |
2864 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
2865 | comp_func_solid_Darken_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Darken_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
2866 | else | - |
2867 | comp_func_solid_Darken_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_Darken_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
2868 | } | - |
2869 | | - |
2870 | template <typename T> | - |
2871 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Darken_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
2872 | { | - |
2873 | PRELOAD_INIT2(dest, src) | - |
2874 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2875 | PRELOAD_COND2(dest, src) | - |
2876 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2877 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2878 | | - |
2879 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2880 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2881 | | - |
2882 | #define OP(a, b) darken_op(a, b, da, sa) | - |
2883 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = darken_op(qRed(d), qRed(s), da, sa); | - |
2884 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = darken_op(qBlue(d), qBlue(s), da, sa); | - |
2885 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = darken_op(qGreen(d), qGreen(s), da, sa); | - |
2886 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2887 | #undef OP | - |
2888 | | - |
2889 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2890 | } | 0 |
2891 | } | 0 |
2892 | | - |
2893 | void QT_FASTCALL comp_func_Darken(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2894 | { | - |
2895 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2896 | comp_func_Darken_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Darken_impl(dest, src, length, QFullCoverage()); | 0 |
2897 | else | - |
2898 | comp_func_Darken_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Darken_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2899 | } | - |
2900 | | - |
2901 | /* | - |
2902 | Dca' = max(Sca.Da, Dca.Sa) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2903 | Da' = Sa + Da - Sa.Da | - |
2904 | */ | - |
2905 | static inline int lighten_op(int dst, int src, int da, int sa) | - |
2906 | { | - |
2907 | return qt_div_255(qMax(src * da, dst * sa) + src * (255 - da) + dst * (255 - sa)); executed: return qt_div_255(qMax(src * da, dst * sa) + src * (255 - da) + dst * (255 - sa)); Execution Count:210000 | 210000 |
2908 | } | - |
2909 | | - |
2910 | template <typename T> | - |
2911 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Lighten_impl(uint *dest, int length, uint color, const T &coverage) | - |
2912 | { | - |
2913 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2914 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2915 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2916 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2917 | | - |
2918 | PRELOAD_INIT(dest) | - |
2919 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
2920 | PRELOAD_COND(dest) | - |
2921 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2922 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2923 | | - |
2924 | #define OP(a, b) lighten_op(a, b, da, sa) | - |
2925 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = lighten_op(qRed(d), sr, da, sa); | - |
2926 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = lighten_op(qBlue(d), sb, da, sa); | - |
2927 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = lighten_op(qGreen(d), sg, da, sa); | - |
2928 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2929 | #undef OP | - |
2930 | | - |
2931 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2932 | } executed: } Execution Count:70000 | 70000 |
2933 | } executed: } Execution Count:700 | 700 |
2934 | | - |
2935 | void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha) | - |
2936 | { | - |
2937 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
2938 | comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
2939 | else | - |
2940 | comp_func_solid_Lighten_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_Lighten_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
2941 | } | - |
2942 | | - |
2943 | template <typename T> | - |
2944 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Lighten_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
2945 | { | - |
2946 | PRELOAD_INIT2(dest, src) | - |
2947 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2948 | PRELOAD_COND2(dest, src) | - |
2949 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2950 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2951 | | - |
2952 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2953 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2954 | | - |
2955 | #define OP(a, b) lighten_op(a, b, da, sa) | - |
2956 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = lighten_op(qRed(d), qRed(s), da, sa); | - |
2957 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = lighten_op(qBlue(d), qBlue(s), da, sa); | - |
2958 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = lighten_op(qGreen(d), qGreen(s), da, sa); | - |
2959 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2960 | #undef OP | - |
2961 | | - |
2962 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
2963 | } | 0 |
2964 | } | 0 |
2965 | | - |
2966 | void QT_FASTCALL comp_func_Lighten(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2967 | { | - |
2968 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2969 | comp_func_Lighten_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Lighten_impl(dest, src, length, QFullCoverage()); | 0 |
2970 | else | - |
2971 | comp_func_Lighten_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Lighten_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2972 | } | - |
2973 | | - |
2974 | /* | - |
2975 | if Sca.Da + Dca.Sa >= Sa.Da | - |
2976 | Dca' = Sa.Da + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2977 | otherwise | - |
2978 | Dca' = Dca.Sa/(1-Sca/Sa) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2979 | */ | - |
2980 | static inline int color_dodge_op(int dst, int src, int da, int sa) | - |
2981 | { | - |
2982 | const int sa_da = sa * da; executed (the execution status of this line is deduced): const int sa_da = sa * da; | - |
2983 | const int dst_sa = dst * sa; executed (the execution status of this line is deduced): const int dst_sa = dst * sa; | - |
2984 | const int src_da = src * da; executed (the execution status of this line is deduced): const int src_da = src * da; | - |
2985 | | - |
2986 | const int temp = src * (255 - da) + dst * (255 - sa); executed (the execution status of this line is deduced): const int temp = src * (255 - da) + dst * (255 - sa); | - |
2987 | if (src_da + dst_sa >= sa_da) evaluated: src_da + dst_sa >= sa_da yes Evaluation Count:90000 | yes Evaluation Count:60000 |
| 60000-90000 |
2988 | return qt_div_255(sa_da + temp); executed: return qt_div_255(sa_da + temp); Execution Count:90000 | 90000 |
2989 | else | - |
2990 | return qt_div_255(255 * dst_sa / (255 - 255 * src / sa) + temp); executed: return qt_div_255(255 * dst_sa / (255 - 255 * src / sa) + temp); Execution Count:60000 | 60000 |
2991 | } | - |
2992 | | - |
2993 | template <typename T> | - |
2994 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorDodge_impl(uint *dest, int length, uint color, const T &coverage) | - |
2995 | { | - |
2996 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2997 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2998 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2999 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3000 | | - |
3001 | PRELOAD_INIT(dest) | - |
3002 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:50000 | yes Evaluation Count:500 |
| 500-50000 |
3003 | PRELOAD_COND(dest) | - |
3004 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3005 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3006 | | - |
3007 | #define OP(a,b) color_dodge_op(a, b, da, sa) | - |
3008 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = color_dodge_op(qRed(d), sr, da, sa); | - |
3009 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = color_dodge_op(qBlue(d), sb, da, sa); | - |
3010 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = color_dodge_op(qGreen(d), sg, da, sa); | - |
3011 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3012 | #undef OP | - |
3013 | | - |
3014 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3015 | } executed: } Execution Count:50000 | 50000 |
3016 | } executed: } Execution Count:500 | 500 |
3017 | | - |
3018 | void QT_FASTCALL comp_func_solid_ColorDodge(uint *dest, int length, uint color, uint const_alpha) | - |
3019 | { | - |
3020 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:500 | no Evaluation Count:0 |
| 0-500 |
3021 | comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage()); Execution Count:500 | 500 |
3022 | else | - |
3023 | comp_func_solid_ColorDodge_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_ColorDodge_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
3024 | } | - |
3025 | | - |
3026 | template <typename T> | - |
3027 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorDodge_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
3028 | { | - |
3029 | PRELOAD_INIT2(dest, src) | - |
3030 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3031 | PRELOAD_COND2(dest, src) | - |
3032 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3033 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3034 | | - |
3035 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3036 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3037 | | - |
3038 | #define OP(a, b) color_dodge_op(a, b, da, sa) | - |
3039 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = color_dodge_op(qRed(d), qRed(s), da, sa); | - |
3040 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = color_dodge_op(qBlue(d), qBlue(s), da, sa); | - |
3041 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = color_dodge_op(qGreen(d), qGreen(s), da, sa); | - |
3042 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3043 | #undef OP | - |
3044 | | - |
3045 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3046 | } | 0 |
3047 | } | 0 |
3048 | | - |
3049 | void QT_FASTCALL comp_func_ColorDodge(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3050 | { | - |
3051 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3052 | comp_func_ColorDodge_impl(dest, src, length, QFullCoverage()); never executed: comp_func_ColorDodge_impl(dest, src, length, QFullCoverage()); | 0 |
3053 | else | - |
3054 | comp_func_ColorDodge_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_ColorDodge_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3055 | } | - |
3056 | | - |
3057 | /* | - |
3058 | if Sca.Da + Dca.Sa <= Sa.Da | - |
3059 | Dca' = Sca.(1 - Da) + Dca.(1 - Sa) | - |
3060 | otherwise | - |
3061 | Dca' = Sa.(Sca.Da + Dca.Sa - Sa.Da)/Sca + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3062 | */ | - |
3063 | static inline int color_burn_op(int dst, int src, int da, int sa) | - |
3064 | { | - |
3065 | const int src_da = src * da; executed (the execution status of this line is deduced): const int src_da = src * da; | - |
3066 | const int dst_sa = dst * sa; executed (the execution status of this line is deduced): const int dst_sa = dst * sa; | - |
3067 | const int sa_da = sa * da; executed (the execution status of this line is deduced): const int sa_da = sa * da; | - |
3068 | | - |
3069 | const int temp = src * (255 - da) + dst * (255 - sa); executed (the execution status of this line is deduced): const int temp = src * (255 - da) + dst * (255 - sa); | - |
3070 | | - |
3071 | if (src == 0 || src_da + dst_sa <= sa_da) evaluated: src == 0 yes Evaluation Count:30000 | yes Evaluation Count:120000 |
evaluated: src_da + dst_sa <= sa_da yes Evaluation Count:30000 | yes Evaluation Count:90000 |
| 30000-120000 |
3072 | return qt_div_255(temp); executed: return qt_div_255(temp); Execution Count:60000 | 60000 |
3073 | return qt_div_255(sa * (src_da + dst_sa - sa_da) / src + temp); executed: return qt_div_255(sa * (src_da + dst_sa - sa_da) / src + temp); Execution Count:90000 | 90000 |
3074 | } | - |
3075 | | - |
3076 | template <typename T> | - |
3077 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorBurn_impl(uint *dest, int length, uint color, const T &coverage) | - |
3078 | { | - |
3079 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3080 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3081 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3082 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3083 | | - |
3084 | PRELOAD_INIT(dest) | - |
3085 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:50000 | yes Evaluation Count:500 |
| 500-50000 |
3086 | PRELOAD_COND(dest) | - |
3087 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3088 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3089 | | - |
3090 | #define OP(a, b) color_burn_op(a, b, da, sa) | - |
3091 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = color_burn_op(qRed(d), sr, da, sa); | - |
3092 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = color_burn_op(qBlue(d), sb, da, sa); | - |
3093 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = color_burn_op(qGreen(d), sg, da, sa); | - |
3094 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3095 | #undef OP | - |
3096 | | - |
3097 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3098 | } executed: } Execution Count:50000 | 50000 |
3099 | } executed: } Execution Count:500 | 500 |
3100 | | - |
3101 | void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha) | - |
3102 | { | - |
3103 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:500 | no Evaluation Count:0 |
| 0-500 |
3104 | comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage()); Execution Count:500 | 500 |
3105 | else | - |
3106 | comp_func_solid_ColorBurn_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_ColorBurn_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
3107 | } | - |
3108 | | - |
3109 | template <typename T> | - |
3110 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorBurn_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
3111 | { | - |
3112 | PRELOAD_INIT2(dest, src) | - |
3113 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3114 | PRELOAD_COND2(dest, src) | - |
3115 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3116 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3117 | | - |
3118 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3119 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3120 | | - |
3121 | #define OP(a, b) color_burn_op(a, b, da, sa) | - |
3122 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = color_burn_op(qRed(d), qRed(s), da, sa); | - |
3123 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = color_burn_op(qBlue(d), qBlue(s), da, sa); | - |
3124 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = color_burn_op(qGreen(d), qGreen(s), da, sa); | - |
3125 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3126 | #undef OP | - |
3127 | | - |
3128 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3129 | } | 0 |
3130 | } | 0 |
3131 | | - |
3132 | void QT_FASTCALL comp_func_ColorBurn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3133 | { | - |
3134 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3135 | comp_func_ColorBurn_impl(dest, src, length, QFullCoverage()); never executed: comp_func_ColorBurn_impl(dest, src, length, QFullCoverage()); | 0 |
3136 | else | - |
3137 | comp_func_ColorBurn_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_ColorBurn_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3138 | } | - |
3139 | | - |
3140 | /* | - |
3141 | if 2.Sca < Sa | - |
3142 | Dca' = 2.Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3143 | otherwise | - |
3144 | Dca' = Sa.Da - 2.(Da - Dca).(Sa - Sca) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3145 | */ | - |
3146 | static inline uint hardlight_op(int dst, int src, int da, int sa) | - |
3147 | { | - |
3148 | const uint temp = src * (255 - da) + dst * (255 - sa); executed (the execution status of this line is deduced): const uint temp = src * (255 - da) + dst * (255 - sa); | - |
3149 | | - |
3150 | if (2 * src < sa) evaluated: 2 * src < sa yes Evaluation Count:120000 | yes Evaluation Count:30000 |
| 30000-120000 |
3151 | return qt_div_255(2 * src * dst + temp); executed: return qt_div_255(2 * src * dst + temp); Execution Count:120000 | 120000 |
3152 | else | - |
3153 | return qt_div_255(sa * da - 2 * (da - dst) * (sa - src) + temp); executed: return qt_div_255(sa * da - 2 * (da - dst) * (sa - src) + temp); Execution Count:30000 | 30000 |
3154 | } | - |
3155 | | - |
3156 | template <typename T> | - |
3157 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_HardLight_impl(uint *dest, int length, uint color, const T &coverage) | - |
3158 | { | - |
3159 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3160 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3161 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3162 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3163 | | - |
3164 | PRELOAD_INIT(dest) | - |
3165 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:50000 | yes Evaluation Count:500 |
| 500-50000 |
3166 | PRELOAD_COND(dest) | - |
3167 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3168 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3169 | | - |
3170 | #define OP(a, b) hardlight_op(a, b, da, sa) | - |
3171 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = hardlight_op(qRed(d), sr, da, sa); | - |
3172 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = hardlight_op(qBlue(d), sb, da, sa); | - |
3173 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = hardlight_op(qGreen(d), sg, da, sa); | - |
3174 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3175 | #undef OP | - |
3176 | | - |
3177 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3178 | } executed: } Execution Count:50000 | 50000 |
3179 | } executed: } Execution Count:500 | 500 |
3180 | | - |
3181 | void QT_FASTCALL comp_func_solid_HardLight(uint *dest, int length, uint color, uint const_alpha) | - |
3182 | { | - |
3183 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:500 | no Evaluation Count:0 |
| 0-500 |
3184 | comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage()); Execution Count:500 | 500 |
3185 | else | - |
3186 | comp_func_solid_HardLight_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_HardLight_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
3187 | } | - |
3188 | | - |
3189 | template <typename T> | - |
3190 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_HardLight_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
3191 | { | - |
3192 | PRELOAD_INIT2(dest, src) | - |
3193 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3194 | PRELOAD_COND2(dest, src) | - |
3195 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3196 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3197 | | - |
3198 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3199 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3200 | | - |
3201 | #define OP(a, b) hardlight_op(a, b, da, sa) | - |
3202 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = hardlight_op(qRed(d), qRed(s), da, sa); | - |
3203 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = hardlight_op(qBlue(d), qBlue(s), da, sa); | - |
3204 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = hardlight_op(qGreen(d), qGreen(s), da, sa); | - |
3205 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3206 | #undef OP | - |
3207 | | - |
3208 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3209 | } | 0 |
3210 | } | 0 |
3211 | | - |
3212 | void QT_FASTCALL comp_func_HardLight(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3213 | { | - |
3214 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3215 | comp_func_HardLight_impl(dest, src, length, QFullCoverage()); never executed: comp_func_HardLight_impl(dest, src, length, QFullCoverage()); | 0 |
3216 | else | - |
3217 | comp_func_HardLight_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_HardLight_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3218 | } | - |
3219 | | - |
3220 | /* | - |
3221 | if 2.Sca <= Sa | - |
3222 | Dca' = Dca.(Sa + (2.Sca - Sa).(1 - Dca/Da)) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3223 | otherwise if 2.Sca > Sa and 4.Dca <= Da | - |
3224 | 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) | - |
3225 | otherwise if 2.Sca > Sa and 4.Dca > Da | - |
3226 | Dca' = Dca.Sa + Da.(2.Sca - Sa).((Dca/Da)^0.5 - Dca/Da) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3227 | */ | - |
3228 | static inline int soft_light_op(int dst, int src, int da, int sa) | - |
3229 | { | - |
3230 | const int src2 = src << 1; executed (the execution status of this line is deduced): const int src2 = src << 1; | - |
3231 | const int dst_np = da != 0 ? (255 * dst) / da : 0; partially evaluated: da != 0 yes Evaluation Count:150000 | no Evaluation Count:0 |
| 0-150000 |
3232 | const int temp = (src * (255 - da) + dst * (255 - sa)) * 255; executed (the execution status of this line is deduced): const int temp = (src * (255 - da) + dst * (255 - sa)) * 255; | - |
3233 | | - |
3234 | if (src2 < sa) evaluated: src2 < sa yes Evaluation Count:120000 | yes Evaluation Count:30000 |
| 30000-120000 |
3235 | return (dst * (sa * 255 + (src2 - sa) * (255 - dst_np)) + temp) / 65025; executed: return (dst * (sa * 255 + (src2 - sa) * (255 - dst_np)) + temp) / 65025; Execution Count:120000 | 120000 |
3236 | else if (4 * dst <= da) partially evaluated: 4 * dst <= da no Evaluation Count:0 | yes Evaluation Count:30000 |
| 0-30000 |
3237 | return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025; never executed: return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025; | 0 |
3238 | else { | - |
3239 | # ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 | - |
3240 | return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025; | - |
3241 | # else | - |
3242 | return (dst * sa * 255 + da * (src2 - sa) * (int(qSqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025; executed: return (dst * sa * 255 + da * (src2 - sa) * (int(qSqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025; Execution Count:30000 | 30000 |
3243 | # endif | - |
3244 | } | - |
3245 | } | - |
3246 | | - |
3247 | template <typename T> | - |
3248 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_SoftLight_impl(uint *dest, int length, uint color, const T &coverage) | - |
3249 | { | - |
3250 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3251 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3252 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3253 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3254 | | - |
3255 | PRELOAD_INIT(dest) | - |
3256 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:50000 | yes Evaluation Count:500 |
| 500-50000 |
3257 | PRELOAD_COND(dest) | - |
3258 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3259 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3260 | | - |
3261 | #define OP(a, b) soft_light_op(a, b, da, sa) | - |
3262 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = soft_light_op(qRed(d), sr, da, sa); | - |
3263 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = soft_light_op(qBlue(d), sb, da, sa); | - |
3264 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = soft_light_op(qGreen(d), sg, da, sa); | - |
3265 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3266 | #undef OP | - |
3267 | | - |
3268 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3269 | } executed: } Execution Count:50000 | 50000 |
3270 | } executed: } Execution Count:500 | 500 |
3271 | | - |
3272 | void QT_FASTCALL comp_func_solid_SoftLight(uint *dest, int length, uint color, uint const_alpha) | - |
3273 | { | - |
3274 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:500 | no Evaluation Count:0 |
| 0-500 |
3275 | comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage()); Execution Count:500 | 500 |
3276 | else | - |
3277 | comp_func_solid_SoftLight_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_SoftLight_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
3278 | } | - |
3279 | | - |
3280 | template <typename T> | - |
3281 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_SoftLight_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
3282 | { | - |
3283 | PRELOAD_INIT2(dest, src) | - |
3284 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3285 | PRELOAD_COND2(dest, src) | - |
3286 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3287 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3288 | | - |
3289 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3290 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3291 | | - |
3292 | #define OP(a, b) soft_light_op(a, b, da, sa) | - |
3293 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = soft_light_op(qRed(d), qRed(s), da, sa); | - |
3294 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = soft_light_op(qBlue(d), qBlue(s), da, sa); | - |
3295 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = soft_light_op(qGreen(d), qGreen(s), da, sa); | - |
3296 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3297 | #undef OP | - |
3298 | | - |
3299 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3300 | } | 0 |
3301 | } | 0 |
3302 | | - |
3303 | void QT_FASTCALL comp_func_SoftLight(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3304 | { | - |
3305 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3306 | comp_func_SoftLight_impl(dest, src, length, QFullCoverage()); never executed: comp_func_SoftLight_impl(dest, src, length, QFullCoverage()); | 0 |
3307 | else | - |
3308 | comp_func_SoftLight_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_SoftLight_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3309 | } | - |
3310 | | - |
3311 | /* | - |
3312 | Dca' = abs(Dca.Sa - Sca.Da) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3313 | = Sca + Dca - 2.min(Sca.Da, Dca.Sa) | - |
3314 | */ | - |
3315 | static inline int difference_op(int dst, int src, int da, int sa) | - |
3316 | { | - |
3317 | return src + dst - qt_div_255(2 * qMin(src * da, dst * sa)); executed: return src + dst - qt_div_255(2 * qMin(src * da, dst * sa)); Execution Count:210000 | 210000 |
3318 | } | - |
3319 | | - |
3320 | template <typename T> | - |
3321 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Difference_impl(uint *dest, int length, uint color, const T &coverage) | - |
3322 | { | - |
3323 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3324 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3325 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3326 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3327 | | - |
3328 | PRELOAD_INIT(dest) | - |
3329 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
3330 | PRELOAD_COND(dest) | - |
3331 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3332 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3333 | | - |
3334 | #define OP(a, b) difference_op(a, b, da, sa) | - |
3335 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = difference_op(qRed(d), sr, da, sa); | - |
3336 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = difference_op(qBlue(d), sb, da, sa); | - |
3337 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = difference_op(qGreen(d), sg, da, sa); | - |
3338 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3339 | #undef OP | - |
3340 | | - |
3341 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3342 | } executed: } Execution Count:70000 | 70000 |
3343 | } executed: } Execution Count:700 | 700 |
3344 | | - |
3345 | void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha) | - |
3346 | { | - |
3347 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
3348 | comp_func_solid_Difference_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Difference_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
3349 | else | - |
3350 | comp_func_solid_Difference_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_Difference_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
3351 | } | - |
3352 | | - |
3353 | template <typename T> | - |
3354 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Difference_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
3355 | { | - |
3356 | PRELOAD_INIT2(dest, src) | - |
3357 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3358 | PRELOAD_COND2(dest, src) | - |
3359 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3360 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3361 | | - |
3362 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3363 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3364 | | - |
3365 | #define OP(a, b) difference_op(a, b, da, sa) | - |
3366 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = difference_op(qRed(d), qRed(s), da, sa); | - |
3367 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = difference_op(qBlue(d), qBlue(s), da, sa); | - |
3368 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = difference_op(qGreen(d), qGreen(s), da, sa); | - |
3369 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3370 | #undef OP | - |
3371 | | - |
3372 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3373 | } | 0 |
3374 | } | 0 |
3375 | | - |
3376 | void QT_FASTCALL comp_func_Difference(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3377 | { | - |
3378 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3379 | comp_func_Difference_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Difference_impl(dest, src, length, QFullCoverage()); | 0 |
3380 | else | - |
3381 | comp_func_Difference_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Difference_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3382 | } | - |
3383 | | - |
3384 | /* | - |
3385 | Dca' = (Sca.Da + Dca.Sa - 2.Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3386 | */ | - |
3387 | template <typename T> | - |
3388 | Q_STATIC_TEMPLATE_FUNCTION inline void QT_FASTCALL comp_func_solid_Exclusion_impl(uint *dest, int length, uint color, const T &coverage) | - |
3389 | { | - |
3390 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3391 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3392 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3393 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3394 | | - |
3395 | PRELOAD_INIT(dest) | - |
3396 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
3397 | PRELOAD_COND(dest) | - |
3398 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3399 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3400 | | - |
3401 | #define OP(a, b) (a + b - qt_div_255(2*(a*b))) | - |
3402 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = (qRed(d) + sr - qt_div_255(2*(qRed(d)*sr))); | - |
3403 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = (qBlue(d) + sb - qt_div_255(2*(qBlue(d)*sb))); | - |
3404 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = (qGreen(d) + sg - qt_div_255(2*(qGreen(d)*sg))); | - |
3405 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3406 | #undef OP | - |
3407 | | - |
3408 | coverage.store(&dest[i], qRgba(r, g, b, a)); executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3409 | } executed: } Execution Count:70000 | 70000 |
3410 | } executed: } Execution Count:700 | 700 |
3411 | | - |
3412 | void QT_FASTCALL comp_func_solid_Exclusion(uint *dest, int length, uint color, uint const_alpha) | - |
3413 | { | - |
3414 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
3415 | comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
3416 | else | - |
3417 | comp_func_solid_Exclusion_impl(dest, length, color, QPartialCoverage(const_alpha)); never executed: comp_func_solid_Exclusion_impl(dest, length, color, QPartialCoverage(const_alpha)); | 0 |
3418 | } | - |
3419 | | - |
3420 | template <typename T> | - |
3421 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Exclusion_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage) | - |
3422 | { | - |
3423 | PRELOAD_INIT2(dest, src) | - |
3424 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3425 | PRELOAD_COND2(dest, src) | - |
3426 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3427 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3428 | | - |
3429 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3430 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3431 | | - |
3432 | #define OP(a, b) (a + b - ((a*b) >> 7)) | - |
3433 | int r = OP( qRed(d), qRed(s)); never executed (the execution status of this line is deduced): int r = (qRed(d) + qRed(s) - ((qRed(d)*qRed(s)) >> 7)); | - |
3434 | int b = OP( qBlue(d), qBlue(s)); never executed (the execution status of this line is deduced): int b = (qBlue(d) + qBlue(s) - ((qBlue(d)*qBlue(s)) >> 7)); | - |
3435 | int g = OP(qGreen(d), qGreen(s)); never executed (the execution status of this line is deduced): int g = (qGreen(d) + qGreen(s) - ((qGreen(d)*qGreen(s)) >> 7)); | - |
3436 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3437 | #undef OP | - |
3438 | | - |
3439 | coverage.store(&dest[i], qRgba(r, g, b, a)); never executed (the execution status of this line is deduced): coverage.store(&dest[i], qRgba(r, g, b, a)); | - |
3440 | } | 0 |
3441 | } | 0 |
3442 | | - |
3443 | void QT_FASTCALL comp_func_Exclusion(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3444 | { | - |
3445 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3446 | comp_func_Exclusion_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Exclusion_impl(dest, src, length, QFullCoverage()); | 0 |
3447 | else | - |
3448 | comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3449 | } | - |
3450 | | - |
3451 | #if defined(Q_CC_RVCT) | - |
3452 | // Restore pragma state from previous #pragma arm | - |
3453 | # pragma pop | - |
3454 | #endif | - |
3455 | | - |
3456 | void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, | - |
3457 | int length, | - |
3458 | uint color, | - |
3459 | uint const_alpha) | - |
3460 | { | - |
3461 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3462 | while (length--) never evaluated: length-- | 0 |
3463 | *dest++ |= color; never executed: *dest++ |= color; | 0 |
3464 | } | 0 |
3465 | | - |
3466 | void QT_FASTCALL rasterop_SourceOrDestination(uint *Q_DECL_RESTRICT dest, | - |
3467 | const uint *Q_DECL_RESTRICT src, | - |
3468 | int length, | - |
3469 | uint const_alpha) | - |
3470 | { | - |
3471 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3472 | while (length--) never evaluated: length-- | 0 |
3473 | *dest++ |= *src++; never executed: *dest++ |= *src++; | 0 |
3474 | } | 0 |
3475 | | - |
3476 | void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest, | - |
3477 | int length, | - |
3478 | uint color, | - |
3479 | uint const_alpha) | - |
3480 | { | - |
3481 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3482 | color |= 0xff000000; never executed (the execution status of this line is deduced): color |= 0xff000000; | - |
3483 | while (length--) never evaluated: length-- | 0 |
3484 | *dest++ &= color; never executed: *dest++ &= color; | 0 |
3485 | } | 0 |
3486 | | - |
3487 | void QT_FASTCALL rasterop_SourceAndDestination(uint *Q_DECL_RESTRICT dest, | - |
3488 | const uint *Q_DECL_RESTRICT src, | - |
3489 | int length, | - |
3490 | uint const_alpha) | - |
3491 | { | - |
3492 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3493 | while (length--) { never evaluated: length-- | 0 |
3494 | *dest = (*src & *dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (*src & *dest) | 0xff000000; | - |
3495 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3496 | } | 0 |
3497 | } | 0 |
3498 | | - |
3499 | void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, | - |
3500 | int length, | - |
3501 | uint color, | - |
3502 | uint const_alpha) | - |
3503 | { | - |
3504 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3505 | color &= 0x00ffffff; never executed (the execution status of this line is deduced): color &= 0x00ffffff; | - |
3506 | while (length--) never evaluated: length-- | 0 |
3507 | *dest++ ^= color; never executed: *dest++ ^= color; | 0 |
3508 | } | 0 |
3509 | | - |
3510 | void QT_FASTCALL rasterop_SourceXorDestination(uint *Q_DECL_RESTRICT dest, | - |
3511 | const uint *Q_DECL_RESTRICT src, | - |
3512 | int length, | - |
3513 | uint const_alpha) | - |
3514 | { | - |
3515 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3516 | while (length--) { never evaluated: length-- | 0 |
3517 | *dest = (*src ^ *dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (*src ^ *dest) | 0xff000000; | - |
3518 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3519 | } | 0 |
3520 | } | 0 |
3521 | | - |
3522 | void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest, | - |
3523 | int length, | - |
3524 | uint color, | - |
3525 | uint const_alpha) | - |
3526 | { | - |
3527 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3528 | color = ~color; never executed (the execution status of this line is deduced): color = ~color; | - |
3529 | while (length--) { never evaluated: length-- | 0 |
3530 | *dest = (color & ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (color & ~(*dest)) | 0xff000000; | - |
3531 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3532 | } | 0 |
3533 | } | 0 |
3534 | | - |
3535 | void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3536 | const uint *Q_DECL_RESTRICT src, | - |
3537 | int length, | - |
3538 | uint const_alpha) | - |
3539 | { | - |
3540 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3541 | while (length--) { never evaluated: length-- | 0 |
3542 | *dest = (~(*src) & ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (~(*src) & ~(*dest)) | 0xff000000; | - |
3543 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3544 | } | 0 |
3545 | } | 0 |
3546 | | - |
3547 | void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, | - |
3548 | int length, | - |
3549 | uint color, | - |
3550 | uint const_alpha) | - |
3551 | { | - |
3552 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3553 | color = ~color | 0xff000000; never executed (the execution status of this line is deduced): color = ~color | 0xff000000; | - |
3554 | while (length--) { never evaluated: length-- | 0 |
3555 | *dest = color | ~(*dest); never executed (the execution status of this line is deduced): *dest = color | ~(*dest); | - |
3556 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3557 | } | 0 |
3558 | } | 0 |
3559 | | - |
3560 | void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3561 | const uint *Q_DECL_RESTRICT src, | - |
3562 | int length, | - |
3563 | uint const_alpha) | - |
3564 | { | - |
3565 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3566 | while (length--) { never evaluated: length-- | 0 |
3567 | *dest = ~(*src) | ~(*dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = ~(*src) | ~(*dest) | 0xff000000; | - |
3568 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3569 | } | 0 |
3570 | } | 0 |
3571 | | - |
3572 | void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, | - |
3573 | int length, | - |
3574 | uint color, | - |
3575 | uint const_alpha) | - |
3576 | { | - |
3577 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3578 | color = ~color & 0x00ffffff; never executed (the execution status of this line is deduced): color = ~color & 0x00ffffff; | - |
3579 | while (length--) { never evaluated: length-- | 0 |
3580 | *dest = color ^ (*dest); never executed (the execution status of this line is deduced): *dest = color ^ (*dest); | - |
3581 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3582 | } | 0 |
3583 | } | 0 |
3584 | | - |
3585 | void QT_FASTCALL rasterop_NotSourceXorDestination(uint *Q_DECL_RESTRICT dest, | - |
3586 | const uint *Q_DECL_RESTRICT src, | - |
3587 | int length, | - |
3588 | uint const_alpha) | - |
3589 | { | - |
3590 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3591 | while (length--) { never evaluated: length-- | 0 |
3592 | *dest = ((~(*src)) ^ (*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = ((~(*src)) ^ (*dest)) | 0xff000000; | - |
3593 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3594 | } | 0 |
3595 | } | 0 |
3596 | | - |
3597 | void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, | - |
3598 | uint color, uint const_alpha) | - |
3599 | { | - |
3600 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3601 | qt_memfill(dest, ~color | 0xff000000, length); never executed (the execution status of this line is deduced): qt_memfill(dest, ~color | 0xff000000, length); | - |
3602 | } | 0 |
3603 | | - |
3604 | void QT_FASTCALL rasterop_NotSource(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, | - |
3605 | int length, uint const_alpha) | - |
3606 | { | - |
3607 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3608 | while (length--) never evaluated: length-- | 0 |
3609 | *dest++ = ~(*src++) | 0xff000000; never executed: *dest++ = ~(*src++) | 0xff000000; | 0 |
3610 | } | 0 |
3611 | | - |
3612 | void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, | - |
3613 | int length, | - |
3614 | uint color, | - |
3615 | uint const_alpha) | - |
3616 | { | - |
3617 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3618 | color = ~color | 0xff000000; never executed (the execution status of this line is deduced): color = ~color | 0xff000000; | - |
3619 | while (length--) { never evaluated: length-- | 0 |
3620 | *dest = color & *dest; never executed (the execution status of this line is deduced): *dest = color & *dest; | - |
3621 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3622 | } | 0 |
3623 | } | 0 |
3624 | | - |
3625 | void QT_FASTCALL rasterop_NotSourceAndDestination(uint *Q_DECL_RESTRICT dest, | - |
3626 | const uint *Q_DECL_RESTRICT src, | - |
3627 | int length, | - |
3628 | uint const_alpha) | - |
3629 | { | - |
3630 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3631 | while (length--) { never evaluated: length-- | 0 |
3632 | *dest = (~(*src) & *dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (~(*src) & *dest) | 0xff000000; | - |
3633 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3634 | } | 0 |
3635 | } | 0 |
3636 | | - |
3637 | void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, | - |
3638 | int length, | - |
3639 | uint color, | - |
3640 | uint const_alpha) | - |
3641 | { | - |
3642 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3643 | while (length--) { never evaluated: length-- | 0 |
3644 | *dest = (color & ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (color & ~(*dest)) | 0xff000000; | - |
3645 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3646 | } | 0 |
3647 | } | 0 |
3648 | | - |
3649 | void QT_FASTCALL rasterop_SourceAndNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3650 | const uint *Q_DECL_RESTRICT src, | - |
3651 | int length, | - |
3652 | uint const_alpha) | - |
3653 | { | - |
3654 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3655 | while (length--) { never evaluated: length-- | 0 |
3656 | *dest = (*src & ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (*src & ~(*dest)) | 0xff000000; | - |
3657 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3658 | } | 0 |
3659 | } | 0 |
3660 | | - |
3661 | void QT_FASTCALL rasterop_NotSourceOrDestination(uint *Q_DECL_RESTRICT dest, | - |
3662 | const uint *Q_DECL_RESTRICT src, | - |
3663 | int length, | - |
3664 | uint const_alpha) | - |
3665 | { | - |
3666 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3667 | while (length--) { never evaluated: length-- | 0 |
3668 | *dest = (~(*src) | *dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (~(*src) | *dest) | 0xff000000; | - |
3669 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3670 | } | 0 |
3671 | } | 0 |
3672 | | - |
3673 | void QT_FASTCALL rasterop_solid_NotSourceOrDestination(uint *Q_DECL_RESTRICT dest, | - |
3674 | int length, | - |
3675 | uint color, | - |
3676 | uint const_alpha) | - |
3677 | { | - |
3678 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3679 | color = ~color | 0xff000000; never executed (the execution status of this line is deduced): color = ~color | 0xff000000; | - |
3680 | while (length--) never evaluated: length-- | 0 |
3681 | *dest++ |= color; never executed: *dest++ |= color; | 0 |
3682 | } | 0 |
3683 | | - |
3684 | void QT_FASTCALL rasterop_SourceOrNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3685 | const uint *Q_DECL_RESTRICT src, | - |
3686 | int length, | - |
3687 | uint const_alpha) | - |
3688 | { | - |
3689 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3690 | while (length--) { never evaluated: length-- | 0 |
3691 | *dest = (*src | ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (*src | ~(*dest)) | 0xff000000; | - |
3692 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3693 | } | 0 |
3694 | } | 0 |
3695 | | - |
3696 | void QT_FASTCALL rasterop_solid_SourceOrNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3697 | int length, | - |
3698 | uint color, | - |
3699 | uint const_alpha) | - |
3700 | { | - |
3701 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3702 | while (length--) { never evaluated: length-- | 0 |
3703 | *dest = (color | ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (color | ~(*dest)) | 0xff000000; | - |
3704 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3705 | } | 0 |
3706 | } | 0 |
3707 | | - |
3708 | void QT_FASTCALL rasterop_ClearDestination(uint *Q_DECL_RESTRICT dest, | - |
3709 | const uint *Q_DECL_RESTRICT src, | - |
3710 | int length, | - |
3711 | uint const_alpha) | - |
3712 | { | - |
3713 | Q_UNUSED(src); never executed (the execution status of this line is deduced): (void)src;; | - |
3714 | comp_func_solid_SourceOver (dest, length, 0xff000000, const_alpha); never executed (the execution status of this line is deduced): comp_func_solid_SourceOver (dest, length, 0xff000000, const_alpha); | - |
3715 | } | 0 |
3716 | | - |
3717 | void QT_FASTCALL rasterop_solid_ClearDestination(uint *Q_DECL_RESTRICT dest, | - |
3718 | int length, | - |
3719 | uint color, | - |
3720 | uint const_alpha) | - |
3721 | { | - |
3722 | Q_UNUSED(color); never executed (the execution status of this line is deduced): (void)color;; | - |
3723 | comp_func_solid_SourceOver (dest, length, 0xff000000, const_alpha); never executed (the execution status of this line is deduced): comp_func_solid_SourceOver (dest, length, 0xff000000, const_alpha); | - |
3724 | } | 0 |
3725 | | - |
3726 | void QT_FASTCALL rasterop_SetDestination(uint *Q_DECL_RESTRICT dest, | - |
3727 | const uint *Q_DECL_RESTRICT src, | - |
3728 | int length, | - |
3729 | uint const_alpha) | - |
3730 | { | - |
3731 | Q_UNUSED(src); never executed (the execution status of this line is deduced): (void)src;; | - |
3732 | comp_func_solid_SourceOver (dest, length, 0xffffffff, const_alpha); never executed (the execution status of this line is deduced): comp_func_solid_SourceOver (dest, length, 0xffffffff, const_alpha); | - |
3733 | } | 0 |
3734 | | - |
3735 | void QT_FASTCALL rasterop_solid_SetDestination(uint *Q_DECL_RESTRICT dest, | - |
3736 | int length, | - |
3737 | uint color, | - |
3738 | uint const_alpha) | - |
3739 | { | - |
3740 | Q_UNUSED(color); never executed (the execution status of this line is deduced): (void)color;; | - |
3741 | comp_func_solid_SourceOver (dest, length, 0xffffffff, const_alpha); never executed (the execution status of this line is deduced): comp_func_solid_SourceOver (dest, length, 0xffffffff, const_alpha); | - |
3742 | } | 0 |
3743 | | - |
3744 | void QT_FASTCALL rasterop_NotDestination(uint *Q_DECL_RESTRICT dest, | - |
3745 | const uint *Q_DECL_RESTRICT src, | - |
3746 | int length, | - |
3747 | uint const_alpha) | - |
3748 | { | - |
3749 | Q_UNUSED(src); never executed (the execution status of this line is deduced): (void)src;; | - |
3750 | rasterop_solid_SourceXorDestination (dest, length, 0x00ffffff, const_alpha); never executed (the execution status of this line is deduced): rasterop_solid_SourceXorDestination (dest, length, 0x00ffffff, const_alpha); | - |
3751 | } | 0 |
3752 | | - |
3753 | void QT_FASTCALL rasterop_solid_NotDestination(uint *Q_DECL_RESTRICT dest, | - |
3754 | int length, | - |
3755 | uint color, | - |
3756 | uint const_alpha) | - |
3757 | { | - |
3758 | Q_UNUSED(color); never executed (the execution status of this line is deduced): (void)color;; | - |
3759 | rasterop_solid_SourceXorDestination (dest, length, 0x00ffffff, const_alpha); never executed (the execution status of this line is deduced): rasterop_solid_SourceXorDestination (dest, length, 0x00ffffff, const_alpha); | - |
3760 | } | 0 |
3761 | | - |
3762 | static CompositionFunctionSolid functionForModeSolid_C[] = { | - |
3763 | comp_func_solid_SourceOver, | - |
3764 | comp_func_solid_DestinationOver, | - |
3765 | comp_func_solid_Clear, | - |
3766 | comp_func_solid_Source, | - |
3767 | comp_func_solid_Destination, | - |
3768 | comp_func_solid_SourceIn, | - |
3769 | comp_func_solid_DestinationIn, | - |
3770 | comp_func_solid_SourceOut, | - |
3771 | comp_func_solid_DestinationOut, | - |
3772 | comp_func_solid_SourceAtop, | - |
3773 | comp_func_solid_DestinationAtop, | - |
3774 | comp_func_solid_XOR, | - |
3775 | comp_func_solid_Plus, | - |
3776 | comp_func_solid_Multiply, | - |
3777 | comp_func_solid_Screen, | - |
3778 | comp_func_solid_Overlay, | - |
3779 | comp_func_solid_Darken, | - |
3780 | comp_func_solid_Lighten, | - |
3781 | comp_func_solid_ColorDodge, | - |
3782 | comp_func_solid_ColorBurn, | - |
3783 | comp_func_solid_HardLight, | - |
3784 | comp_func_solid_SoftLight, | - |
3785 | comp_func_solid_Difference, | - |
3786 | comp_func_solid_Exclusion, | - |
3787 | rasterop_solid_SourceOrDestination, | - |
3788 | rasterop_solid_SourceAndDestination, | - |
3789 | rasterop_solid_SourceXorDestination, | - |
3790 | rasterop_solid_NotSourceAndNotDestination, | - |
3791 | rasterop_solid_NotSourceOrNotDestination, | - |
3792 | rasterop_solid_NotSourceXorDestination, | - |
3793 | rasterop_solid_NotSource, | - |
3794 | rasterop_solid_NotSourceAndDestination, | - |
3795 | rasterop_solid_SourceAndNotDestination, | - |
3796 | rasterop_solid_SourceAndNotDestination, | - |
3797 | rasterop_solid_NotSourceOrDestination, | - |
3798 | rasterop_solid_SourceOrNotDestination, | - |
3799 | rasterop_solid_ClearDestination, | - |
3800 | rasterop_solid_SetDestination, | - |
3801 | rasterop_solid_NotDestination | - |
3802 | }; | - |
3803 | | - |
3804 | static const CompositionFunctionSolid *functionForModeSolid = functionForModeSolid_C; | - |
3805 | | - |
3806 | static CompositionFunction functionForMode_C[] = { | - |
3807 | comp_func_SourceOver, | - |
3808 | comp_func_DestinationOver, | - |
3809 | comp_func_Clear, | - |
3810 | comp_func_Source, | - |
3811 | comp_func_Destination, | - |
3812 | comp_func_SourceIn, | - |
3813 | comp_func_DestinationIn, | - |
3814 | comp_func_SourceOut, | - |
3815 | comp_func_DestinationOut, | - |
3816 | comp_func_SourceAtop, | - |
3817 | comp_func_DestinationAtop, | - |
3818 | comp_func_XOR, | - |
3819 | comp_func_Plus, | - |
3820 | comp_func_Multiply, | - |
3821 | comp_func_Screen, | - |
3822 | comp_func_Overlay, | - |
3823 | comp_func_Darken, | - |
3824 | comp_func_Lighten, | - |
3825 | comp_func_ColorDodge, | - |
3826 | comp_func_ColorBurn, | - |
3827 | comp_func_HardLight, | - |
3828 | comp_func_SoftLight, | - |
3829 | comp_func_Difference, | - |
3830 | comp_func_Exclusion, | - |
3831 | rasterop_SourceOrDestination, | - |
3832 | rasterop_SourceAndDestination, | - |
3833 | rasterop_SourceXorDestination, | - |
3834 | rasterop_NotSourceAndNotDestination, | - |
3835 | rasterop_NotSourceOrNotDestination, | - |
3836 | rasterop_NotSourceXorDestination, | - |
3837 | rasterop_NotSource, | - |
3838 | rasterop_NotSourceAndDestination, | - |
3839 | rasterop_SourceAndNotDestination, | - |
3840 | rasterop_SourceAndNotDestination, | - |
3841 | rasterop_NotSourceOrDestination, | - |
3842 | rasterop_SourceOrNotDestination, | - |
3843 | rasterop_ClearDestination, | - |
3844 | rasterop_SetDestination, | - |
3845 | rasterop_NotDestination | - |
3846 | }; | - |
3847 | | - |
3848 | static const CompositionFunction *functionForMode = functionForMode_C; | - |
3849 | | - |
3850 | static TextureBlendType getBlendType(const QSpanData *data) | - |
3851 | { | - |
3852 | TextureBlendType ft; executed (the execution status of this line is deduced): TextureBlendType ft; | - |
3853 | if (data->txop <= QTransform::TxTranslate) evaluated: data->txop <= QTransform::TxTranslate yes Evaluation Count:37660 | yes Evaluation Count:62 |
| 62-37660 |
3854 | if (data->texture.type == QTextureData::Tiled) evaluated: data->texture.type == QTextureData::Tiled yes Evaluation Count:35174 | yes Evaluation Count:2486 |
| 2486-35174 |
3855 | ft = BlendTiled; executed: ft = BlendTiled; Execution Count:35174 | 35174 |
3856 | else | - |
3857 | ft = BlendUntransformed; executed: ft = BlendUntransformed; Execution Count:2486 | 2486 |
3858 | else if (data->bilinear) evaluated: data->bilinear yes Evaluation Count:54 | yes Evaluation Count:8 |
| 8-54 |
3859 | if (data->texture.type == QTextureData::Tiled) evaluated: data->texture.type == QTextureData::Tiled yes Evaluation Count:4 | yes Evaluation Count:50 |
| 4-50 |
3860 | ft = BlendTransformedBilinearTiled; executed: ft = BlendTransformedBilinearTiled; Execution Count:4 | 4 |
3861 | else | - |
3862 | ft = BlendTransformedBilinear; executed: ft = BlendTransformedBilinear; Execution Count:50 | 50 |
3863 | else | - |
3864 | if (data->texture.type == QTextureData::Tiled) evaluated: data->texture.type == QTextureData::Tiled yes Evaluation Count:2 | yes Evaluation Count:6 |
| 2-6 |
3865 | ft = BlendTransformedTiled; executed: ft = BlendTransformedTiled; Execution Count:2 | 2 |
3866 | else | - |
3867 | ft = BlendTransformed; executed: ft = BlendTransformed; Execution Count:6 | 6 |
3868 | return ft; executed: return ft; Execution Count:37722 | 37722 |
3869 | } | - |
3870 | | - |
3871 | static inline Operator getOperator(const QSpanData *data, const QSpan *spans, int spanCount) | - |
3872 | { | - |
3873 | Operator op; executed (the execution status of this line is deduced): Operator op; | - |
3874 | bool solidSource = false; executed (the execution status of this line is deduced): bool solidSource = false; | - |
3875 | | - |
3876 | switch(data->type) { | - |
3877 | case QSpanData::Solid: | - |
3878 | solidSource = (qAlpha(data->solid.color) == 255); executed (the execution status of this line is deduced): solidSource = (qAlpha(data->solid.color) == 255); | - |
3879 | break; executed: break; Execution Count:210123 | 210123 |
3880 | case QSpanData::LinearGradient: | - |
3881 | solidSource = !data->gradient.alphaColor; executed (the execution status of this line is deduced): solidSource = !data->gradient.alphaColor; | - |
3882 | getLinearGradientValues(&op.linear, data); executed (the execution status of this line is deduced): getLinearGradientValues(&op.linear, data); | - |
3883 | op.src_fetch = qt_fetch_linear_gradient; executed (the execution status of this line is deduced): op.src_fetch = qt_fetch_linear_gradient; | - |
3884 | break; executed: break; Execution Count:16548 | 16548 |
3885 | case QSpanData::RadialGradient: | - |
3886 | solidSource = !data->gradient.alphaColor; executed (the execution status of this line is deduced): solidSource = !data->gradient.alphaColor; | - |
3887 | getRadialGradientValues(&op.radial, data); executed (the execution status of this line is deduced): getRadialGradientValues(&op.radial, data); | - |
3888 | op.src_fetch = qt_fetch_radial_gradient; executed (the execution status of this line is deduced): op.src_fetch = qt_fetch_radial_gradient; | - |
3889 | break; executed: break; Execution Count:519 | 519 |
3890 | case QSpanData::ConicalGradient: | - |
3891 | solidSource = !data->gradient.alphaColor; never executed (the execution status of this line is deduced): solidSource = !data->gradient.alphaColor; | - |
3892 | op.src_fetch = qt_fetch_conical_gradient; never executed (the execution status of this line is deduced): op.src_fetch = qt_fetch_conical_gradient; | - |
3893 | break; | 0 |
3894 | case QSpanData::Texture: | - |
3895 | op.src_fetch = sourceFetch[getBlendType(data)][data->texture.format]; executed (the execution status of this line is deduced): op.src_fetch = sourceFetch[getBlendType(data)][data->texture.format]; | - |
3896 | solidSource = !data->texture.hasAlpha; executed (the execution status of this line is deduced): solidSource = !data->texture.hasAlpha; | - |
3897 | default: | - |
3898 | break; executed: break; Execution Count:18856 | 18856 |
3899 | } | - |
3900 | | - |
3901 | op.mode = data->rasterBuffer->compositionMode; executed (the execution status of this line is deduced): op.mode = data->rasterBuffer->compositionMode; | - |
3902 | if (op.mode == QPainter::CompositionMode_SourceOver && solidSource) evaluated: op.mode == QPainter::CompositionMode_SourceOver yes Evaluation Count:145114 | yes Evaluation Count:100932 |
evaluated: solidSource yes Evaluation Count:120468 | yes Evaluation Count:24646 |
| 24646-145114 |
3903 | op.mode = QPainter::CompositionMode_Source; executed: op.mode = QPainter::CompositionMode_Source; Execution Count:120468 | 120468 |
3904 | | - |
3905 | op.dest_fetch = destFetchProc[data->rasterBuffer->format]; executed (the execution status of this line is deduced): op.dest_fetch = destFetchProc[data->rasterBuffer->format]; | - |
3906 | if (op.mode == QPainter::CompositionMode_Source) { evaluated: op.mode == QPainter::CompositionMode_Source yes Evaluation Count:121384 | yes Evaluation Count:124662 |
| 121384-124662 |
3907 | switch (data->rasterBuffer->format) { | - |
3908 | case QImage::Format_RGB32: | - |
3909 | case QImage::Format_ARGB32_Premultiplied: | - |
3910 | // don't clear dest_fetch as it sets up the pointer correctly to save one copy | - |
3911 | break; executed: break; Execution Count:118069 | 118069 |
3912 | default: { | - |
3913 | if (data->type == QSpanData::Texture && data->texture.const_alpha != 256) evaluated: data->type == QSpanData::Texture yes Evaluation Count:451 | yes Evaluation Count:2862 |
partially evaluated: data->texture.const_alpha != 256 no Evaluation Count:0 | yes Evaluation Count:451 |
| 0-2862 |
3914 | break; | 0 |
3915 | const QSpan *lastSpan = spans + spanCount; executed (the execution status of this line is deduced): const QSpan *lastSpan = spans + spanCount; | - |
3916 | bool alphaSpans = false; executed (the execution status of this line is deduced): bool alphaSpans = false; | - |
3917 | while (spans < lastSpan) { evaluated: spans < lastSpan yes Evaluation Count:166262 | yes Evaluation Count:2930 |
| 2930-166262 |
3918 | if (spans->coverage != 255) { evaluated: spans->coverage != 255 yes Evaluation Count:383 | yes Evaluation Count:165879 |
| 383-165879 |
3919 | alphaSpans = true; executed (the execution status of this line is deduced): alphaSpans = true; | - |
3920 | break; executed: break; Execution Count:383 | 383 |
3921 | } | - |
3922 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
3923 | } executed: } Execution Count:165879 | 165879 |
3924 | if (!alphaSpans) evaluated: !alphaSpans yes Evaluation Count:2930 | yes Evaluation Count:383 |
| 383-2930 |
3925 | op.dest_fetch = 0; executed: op.dest_fetch = 0; Execution Count:2930 | 2930 |
3926 | } | - |
3927 | } executed: } Execution Count:3313 | 3313 |
3928 | } executed: } Execution Count:121381 | 121381 |
3929 | | - |
3930 | op.dest_store = destStoreProc[data->rasterBuffer->format]; executed (the execution status of this line is deduced): op.dest_store = destStoreProc[data->rasterBuffer->format]; | - |
3931 | | - |
3932 | op.funcSolid = functionForModeSolid[op.mode]; executed (the execution status of this line is deduced): op.funcSolid = functionForModeSolid[op.mode]; | - |
3933 | op.func = functionForMode[op.mode]; executed (the execution status of this line is deduced): op.func = functionForMode[op.mode]; | - |
3934 | | - |
3935 | return op; executed: return op; Execution Count:246044 | 246044 |
3936 | } | - |
3937 | | - |
3938 | | - |
3939 | | - |
3940 | // -------------------- blend methods --------------------- | - |
3941 | | - |
3942 | #if !defined(Q_CC_SUN) | - |
3943 | static | - |
3944 | #endif | - |
3945 | void blend_color_generic(int count, const QSpan *spans, void *userData) | - |
3946 | { | - |
3947 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
3948 | uint buffer[buffer_size]; executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
3949 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
3950 | | - |
3951 | while (count--) { evaluated: count-- yes Evaluation Count:226886 | yes Evaluation Count:2367 |
| 2367-226886 |
3952 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
3953 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
3954 | while (length) { evaluated: length yes Evaluation Count:226886 | yes Evaluation Count:226886 |
| 226886 |
3955 | int l = qMin(buffer_size, length); executed (the execution status of this line is deduced): int l = qMin(buffer_size, length); | - |
3956 | uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; evaluated: op.dest_fetch yes Evaluation Count:98089 | yes Evaluation Count:128797 |
| 98089-128797 |
3957 | op.funcSolid(dest, l, data->solid.color, spans->coverage); executed (the execution status of this line is deduced): op.funcSolid(dest, l, data->solid.color, spans->coverage); | - |
3958 | if (op.dest_store) partially evaluated: op.dest_store yes Evaluation Count:226886 | no Evaluation Count:0 |
| 0-226886 |
3959 | op.dest_store(data->rasterBuffer, x, spans->y, dest, l); executed: op.dest_store(data->rasterBuffer, x, spans->y, dest, l); Execution Count:226886 | 226886 |
3960 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
3961 | x += l; executed (the execution status of this line is deduced): x += l; | - |
3962 | } executed: } Execution Count:226886 | 226886 |
3963 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
3964 | } executed: } Execution Count:226886 | 226886 |
3965 | } executed: } Execution Count:2367 | 2367 |
3966 | | - |
3967 | static void blend_color_argb(int count, const QSpan *spans, void *userData) | - |
3968 | { | - |
3969 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
3970 | | - |
3971 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
3972 | | - |
3973 | if (op.mode == QPainter::CompositionMode_Source) { evaluated: op.mode == QPainter::CompositionMode_Source yes Evaluation Count:101907 | yes Evaluation Count:105849 |
| 101907-105849 |
3974 | // inline for performance | - |
3975 | while (count--) { evaluated: count-- yes Evaluation Count:627915 | yes Evaluation Count:101907 |
| 101907-627915 |
3976 | uint *target = ((uint *)data->rasterBuffer->scanLine(spans->y)) + spans->x; executed (the execution status of this line is deduced): uint *target = ((uint *)data->rasterBuffer->scanLine(spans->y)) + spans->x; | - |
3977 | if (spans->coverage == 255) { evaluated: spans->coverage == 255 yes Evaluation Count:606370 | yes Evaluation Count:21545 |
| 21545-606370 |
3978 | QT_MEMFILL_UINT(target, spans->len, data->solid.color); executed (the execution status of this line is deduced): qt_memfill<quint32>(target, data->solid.color, spans->len);; | - |
3979 | } else { executed: } Execution Count:606370 | 606370 |
3980 | uint c = BYTE_MUL(data->solid.color, spans->coverage); executed (the execution status of this line is deduced): uint c = BYTE_MUL(data->solid.color, spans->coverage); | - |
3981 | int ialpha = 255 - spans->coverage; executed (the execution status of this line is deduced): int ialpha = 255 - spans->coverage; | - |
3982 | for (int i = 0; i < spans->len; ++i) evaluated: i < spans->len yes Evaluation Count:22533 | yes Evaluation Count:21545 |
| 21545-22533 |
3983 | target[i] = c + BYTE_MUL(target[i], ialpha); executed: target[i] = c + BYTE_MUL(target[i], ialpha); Execution Count:22533 | 22533 |
3984 | } executed: } Execution Count:21545 | 21545 |
3985 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
3986 | } executed: } Execution Count:627915 | 627915 |
3987 | return; executed: return; Execution Count:101907 | 101907 |
3988 | } | - |
3989 | | - |
3990 | while (count--) { evaluated: count-- yes Evaluation Count:2597941 | yes Evaluation Count:105849 |
| 105849-2597941 |
3991 | uint *target = ((uint *)data->rasterBuffer->scanLine(spans->y)) + spans->x; executed (the execution status of this line is deduced): uint *target = ((uint *)data->rasterBuffer->scanLine(spans->y)) + spans->x; | - |
3992 | op.funcSolid(target, spans->len, data->solid.color, spans->coverage); executed (the execution status of this line is deduced): op.funcSolid(target, spans->len, data->solid.color, spans->coverage); | - |
3993 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
3994 | } executed: } Execution Count:2597941 | 2597941 |
3995 | } executed: } Execution Count:105849 | 105849 |
3996 | | - |
3997 | static void blend_color_rgb16(int count, const QSpan *spans, void *userData) | - |
3998 | { | - |
3999 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4000 | | - |
4001 | /* | - |
4002 | We duplicate a little logic from getOperator() and calculate the | - |
4003 | composition mode directly. This allows blend_color_rgb16 to be used | - |
4004 | from qt_gradient_quint16 with minimal overhead. | - |
4005 | */ | - |
4006 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4007 | if (mode == QPainter::CompositionMode_SourceOver && evaluated: mode == QPainter::CompositionMode_SourceOver yes Evaluation Count:163504 | yes Evaluation Count:4 |
| 4-163504 |
4008 | qAlpha(data->solid.color) == 255) evaluated: qAlpha(data->solid.color) == 255 yes Evaluation Count:160161 | yes Evaluation Count:3343 |
| 3343-160161 |
4009 | mode = QPainter::CompositionMode_Source; executed: mode = QPainter::CompositionMode_Source; Execution Count:160161 | 160161 |
4010 | | - |
4011 | if (mode == QPainter::CompositionMode_Source) { evaluated: mode == QPainter::CompositionMode_Source yes Evaluation Count:160165 | yes Evaluation Count:3343 |
| 3343-160165 |
4012 | // inline for performance | - |
4013 | ushort c = qConvertRgb32To16(data->solid.color); executed (the execution status of this line is deduced): ushort c = qConvertRgb32To16(data->solid.color); | - |
4014 | while (count--) { evaluated: count-- yes Evaluation Count:6836175 | yes Evaluation Count:160165 |
| 160165-6836175 |
4015 | ushort *target = ((ushort *)data->rasterBuffer->scanLine(spans->y)) + spans->x; executed (the execution status of this line is deduced): ushort *target = ((ushort *)data->rasterBuffer->scanLine(spans->y)) + spans->x; | - |
4016 | if (spans->coverage == 255) { evaluated: spans->coverage == 255 yes Evaluation Count:6646451 | yes Evaluation Count:189724 |
| 189724-6646451 |
4017 | QT_MEMFILL_USHORT(target, spans->len, c); executed (the execution status of this line is deduced): qt_memfill<quint16>(target, c, spans->len);; | - |
4018 | } else { executed: } Execution Count:6646451 | 6646451 |
4019 | ushort color = BYTE_MUL_RGB16(c, spans->coverage); executed (the execution status of this line is deduced): ushort color = BYTE_MUL_RGB16(c, spans->coverage); | - |
4020 | int ialpha = 255 - spans->coverage; executed (the execution status of this line is deduced): int ialpha = 255 - spans->coverage; | - |
4021 | const ushort *end = target + spans->len; executed (the execution status of this line is deduced): const ushort *end = target + spans->len; | - |
4022 | while (target < end) { evaluated: target < end yes Evaluation Count:221344 | yes Evaluation Count:189724 |
| 189724-221344 |
4023 | *target = color + BYTE_MUL_RGB16(*target, ialpha); executed (the execution status of this line is deduced): *target = color + BYTE_MUL_RGB16(*target, ialpha); | - |
4024 | ++target; executed (the execution status of this line is deduced): ++target; | - |
4025 | } executed: } Execution Count:221344 | 221344 |
4026 | } executed: } Execution Count:189724 | 189724 |
4027 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4028 | } executed: } Execution Count:6836175 | 6836175 |
4029 | return; executed: return; Execution Count:160165 | 160165 |
4030 | } | - |
4031 | | - |
4032 | if (mode == QPainter::CompositionMode_SourceOver) { partially evaluated: mode == QPainter::CompositionMode_SourceOver yes Evaluation Count:3343 | no Evaluation Count:0 |
| 0-3343 |
4033 | while (count--) { evaluated: count-- yes Evaluation Count:108761 | yes Evaluation Count:3343 |
| 3343-108761 |
4034 | uint color = BYTE_MUL(data->solid.color, spans->coverage); executed (the execution status of this line is deduced): uint color = BYTE_MUL(data->solid.color, spans->coverage); | - |
4035 | int ialpha = qAlpha(~color); executed (the execution status of this line is deduced): int ialpha = qAlpha(~color); | - |
4036 | ushort c = qConvertRgb32To16(color); executed (the execution status of this line is deduced): ushort c = qConvertRgb32To16(color); | - |
4037 | ushort *target = ((ushort *)data->rasterBuffer->scanLine(spans->y)) + spans->x; executed (the execution status of this line is deduced): ushort *target = ((ushort *)data->rasterBuffer->scanLine(spans->y)) + spans->x; | - |
4038 | int len = spans->len; executed (the execution status of this line is deduced): int len = spans->len; | - |
4039 | bool pre = (((quintptr)target) & 0x3) != 0; executed (the execution status of this line is deduced): bool pre = (((quintptr)target) & 0x3) != 0; | - |
4040 | bool post = false; executed (the execution status of this line is deduced): bool post = false; | - |
4041 | if (pre) { evaluated: pre yes Evaluation Count:54523 | yes Evaluation Count:54238 |
| 54238-54523 |
4042 | // skip to word boundary | - |
4043 | *target = c + BYTE_MUL_RGB16(*target, ialpha); executed (the execution status of this line is deduced): *target = c + BYTE_MUL_RGB16(*target, ialpha); | - |
4044 | ++target; executed (the execution status of this line is deduced): ++target; | - |
4045 | --len; executed (the execution status of this line is deduced): --len; | - |
4046 | } executed: } Execution Count:54523 | 54523 |
4047 | if (len & 0x1) { evaluated: len & 0x1 yes Evaluation Count:54363 | yes Evaluation Count:54398 |
| 54363-54398 |
4048 | post = true; executed (the execution status of this line is deduced): post = true; | - |
4049 | --len; executed (the execution status of this line is deduced): --len; | - |
4050 | } executed: } Execution Count:54363 | 54363 |
4051 | uint *target32 = (uint*)target; executed (the execution status of this line is deduced): uint *target32 = (uint*)target; | - |
4052 | uint c32 = c | (c<<16); executed (the execution status of this line is deduced): uint c32 = c | (c<<16); | - |
4053 | len >>= 1; executed (the execution status of this line is deduced): len >>= 1; | - |
4054 | uint salpha = (ialpha+1) >> 3; // calculate here rather than in loop executed (the execution status of this line is deduced): uint salpha = (ialpha+1) >> 3; | - |
4055 | while (len--) { evaluated: len-- yes Evaluation Count:84942 | yes Evaluation Count:108761 |
| 84942-108761 |
4056 | // blend full words | - |
4057 | *target32 = c32 + BYTE_MUL_RGB16_32(*target32, salpha); executed (the execution status of this line is deduced): *target32 = c32 + BYTE_MUL_RGB16_32(*target32, salpha); | - |
4058 | ++target32; executed (the execution status of this line is deduced): ++target32; | - |
4059 | target += 2; executed (the execution status of this line is deduced): target += 2; | - |
4060 | } executed: } Execution Count:84942 | 84942 |
4061 | if (post) { evaluated: post yes Evaluation Count:54363 | yes Evaluation Count:54398 |
| 54363-54398 |
4062 | // one last pixel beyond a full word | - |
4063 | *target = c + BYTE_MUL_RGB16(*target, ialpha); executed (the execution status of this line is deduced): *target = c + BYTE_MUL_RGB16(*target, ialpha); | - |
4064 | } executed: } Execution Count:54363 | 54363 |
4065 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4066 | } executed: } Execution Count:108761 | 108761 |
4067 | return; executed: return; Execution Count:3343 | 3343 |
4068 | } | - |
4069 | | - |
4070 | blend_color_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_color_generic(count, spans, userData); | - |
4071 | } | 0 |
4072 | | - |
4073 | template <typename T> | - |
4074 | void handleSpans(int count, const QSpan *spans, const QSpanData *data, T &handler) | - |
4075 | { | - |
4076 | uint const_alpha = 256; executed (the execution status of this line is deduced): uint const_alpha = 256; | - |
4077 | if (data->type == QSpanData::Texture) evaluated: data->type == QSpanData::Texture yes Evaluation Count:30 | yes Evaluation Count:17051 |
| 30-17051 |
4078 | const_alpha = data->texture.const_alpha; executed: const_alpha = data->texture.const_alpha; Execution Count:30 | 30 |
4079 | | - |
4080 | int coverage = 0; executed (the execution status of this line is deduced): int coverage = 0; | - |
4081 | while (count) { evaluated: count yes Evaluation Count:74634 | yes Evaluation Count:17091 |
| 17091-74634 |
4082 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4083 | const int y = spans->y; executed (the execution status of this line is deduced): const int y = spans->y; | - |
4084 | int right = x + spans->len; executed (the execution status of this line is deduced): int right = x + spans->len; | - |
4085 | | - |
4086 | // compute length of adjacent spans | - |
4087 | for (int i = 1; i < count && spans[i].y == y && spans[i].x == right; ++i) evaluated: i < count yes Evaluation Count:64582 | yes Evaluation Count:17089 |
evaluated: spans[i].y == y yes Evaluation Count:7037 | yes Evaluation Count:57545 |
partially evaluated: spans[i].x == right yes Evaluation Count:7037 | no Evaluation Count:0 |
| 0-64582 |
4088 | right += spans[i].len; executed: right += spans[i].len; Execution Count:7037 | 7037 |
4089 | int length = right - x; executed (the execution status of this line is deduced): int length = right - x; | - |
4090 | | - |
4091 | while (length) { evaluated: length yes Evaluation Count:74634 | yes Evaluation Count:74632 |
| 74632-74634 |
4092 | int l = qMin(buffer_size, length); executed (the execution status of this line is deduced): int l = qMin(buffer_size, length); | - |
4093 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4094 | | - |
4095 | int process_length = l; executed (the execution status of this line is deduced): int process_length = l; | - |
4096 | int process_x = x; executed (the execution status of this line is deduced): int process_x = x; | - |
4097 | | - |
4098 | const uint *src = handler.fetch(process_x, y, process_length); executed (the execution status of this line is deduced): const uint *src = handler.fetch(process_x, y, process_length); | - |
4099 | int offset = 0; executed (the execution status of this line is deduced): int offset = 0; | - |
4100 | while (l > 0) { evaluated: l > 0 yes Evaluation Count:81670 | yes Evaluation Count:74633 |
| 74633-81670 |
4101 | if (x == spans->x) // new span? partially evaluated: x == spans->x yes Evaluation Count:81670 | no Evaluation Count:0 |
| 0-81670 |
4102 | coverage = (spans->coverage * const_alpha) >> 8; executed: coverage = (spans->coverage * const_alpha) >> 8; Execution Count:81670 | 81670 |
4103 | | - |
4104 | int right = spans->x + spans->len; executed (the execution status of this line is deduced): int right = spans->x + spans->len; | - |
4105 | int len = qMin(l, right - x); executed (the execution status of this line is deduced): int len = qMin(l, right - x); | - |
4106 | | - |
4107 | handler.process(x, y, len, coverage, src, offset); executed (the execution status of this line is deduced): handler.process(x, y, len, coverage, src, offset); | - |
4108 | | - |
4109 | l -= len; executed (the execution status of this line is deduced): l -= len; | - |
4110 | x += len; executed (the execution status of this line is deduced): x += len; | - |
4111 | offset += len; executed (the execution status of this line is deduced): offset += len; | - |
4112 | | - |
4113 | if (x == right) { // done with current span? partially evaluated: x == right yes Evaluation Count:81667 | no Evaluation Count:0 |
| 0-81667 |
4114 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4115 | --count; executed (the execution status of this line is deduced): --count; | - |
4116 | } executed: } Execution Count:81670 | 81670 |
4117 | } executed: } Execution Count:81670 | 81670 |
4118 | handler.store(process_x, y, process_length); executed (the execution status of this line is deduced): handler.store(process_x, y, process_length); | - |
4119 | } executed: } Execution Count:74631 | 74631 |
4120 | } executed: } Execution Count:74636 | 74636 |
4121 | } executed: } Execution Count:17092 | 17092 |
4122 | | - |
4123 | struct QBlendBase | - |
4124 | { | - |
4125 | QBlendBase(QSpanData *d, Operator o) | - |
4126 | : data(d) | - |
4127 | , op(o) | - |
4128 | , dest(0) | - |
4129 | { | - |
4130 | } executed: } Execution Count:17076 | 17076 |
4131 | | - |
4132 | QSpanData *data; | - |
4133 | Operator op; | - |
4134 | | - |
4135 | uint *dest; | - |
4136 | | - |
4137 | uint buffer[buffer_size]; | - |
4138 | uint src_buffer[buffer_size]; | - |
4139 | }; | - |
4140 | | - |
4141 | class BlendSrcGeneric : public QBlendBase | - |
4142 | { | - |
4143 | public: | - |
4144 | BlendSrcGeneric(QSpanData *d, Operator o) | - |
4145 | : QBlendBase(d, o) | - |
4146 | { | - |
4147 | } executed: } Execution Count:17075 | 17075 |
4148 | | - |
4149 | const uint *fetch(int x, int y, int len) | - |
4150 | { | - |
4151 | dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, y, len) : buffer; evaluated: op.dest_fetch yes Evaluation Count:49451 | yes Evaluation Count:25187 |
| 25187-49451 |
4152 | return op.src_fetch(src_buffer, &op, data, y, x, len); executed: return op.src_fetch(src_buffer, &op, data, y, x, len); Execution Count:74637 | 74637 |
4153 | } | - |
4154 | | - |
4155 | void process(int, int, int len, int coverage, const uint *src, int offset) | - |
4156 | { | - |
4157 | op.func(dest + offset, src + offset, len, coverage); executed (the execution status of this line is deduced): op.func(dest + offset, src + offset, len, coverage); | - |
4158 | } executed: } Execution Count:81668 | 81668 |
4159 | | - |
4160 | void store(int x, int y, int len) | - |
4161 | { | - |
4162 | if (op.dest_store) evaluated: op.dest_store yes Evaluation Count:52927 | yes Evaluation Count:21706 |
| 21706-52927 |
4163 | op.dest_store(data->rasterBuffer, x, y, dest, len); executed: op.dest_store(data->rasterBuffer, x, y, dest, len); Execution Count:52927 | 52927 |
4164 | } executed: } Execution Count:74632 | 74632 |
4165 | }; | - |
4166 | | - |
4167 | static void blend_src_generic(int count, const QSpan *spans, void *userData) | - |
4168 | { | - |
4169 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4170 | BlendSrcGeneric blend(data, getOperator(data, spans, count)); executed (the execution status of this line is deduced): BlendSrcGeneric blend(data, getOperator(data, spans, count)); | - |
4171 | handleSpans(count, spans, data, blend); executed (the execution status of this line is deduced): handleSpans(count, spans, data, blend); | - |
4172 | } executed: } Execution Count:17092 | 17092 |
4173 | | - |
4174 | static void blend_untransformed_generic(int count, const QSpan *spans, void *userData) | - |
4175 | { | - |
4176 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4177 | | - |
4178 | uint buffer[buffer_size]; executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
4179 | uint src_buffer[buffer_size]; executed (the execution status of this line is deduced): uint src_buffer[buffer_size]; | - |
4180 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
4181 | | - |
4182 | const int image_width = data->texture.width; executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4183 | const int image_height = data->texture.height; executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4184 | int xoff = -qRound(-data->dx); executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx); | - |
4185 | int yoff = -qRound(-data->dy); executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy); | - |
4186 | | - |
4187 | while (count--) { evaluated: count-- yes Evaluation Count:39944 | yes Evaluation Count:1216 |
| 1216-39944 |
4188 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4189 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4190 | int sx = xoff + x; executed (the execution status of this line is deduced): int sx = xoff + x; | - |
4191 | int sy = yoff + spans->y; executed (the execution status of this line is deduced): int sy = yoff + spans->y; | - |
4192 | if (sy >= 0 && sy < image_height && sx < image_width) { partially evaluated: sy >= 0 yes Evaluation Count:39944 | no Evaluation Count:0 |
partially evaluated: sy < image_height yes Evaluation Count:39944 | no Evaluation Count:0 |
partially evaluated: sx < image_width yes Evaluation Count:39944 | no Evaluation Count:0 |
| 0-39944 |
4193 | if (sx < 0) { partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:39944 |
| 0-39944 |
4194 | x -= sx; never executed (the execution status of this line is deduced): x -= sx; | - |
4195 | length += sx; never executed (the execution status of this line is deduced): length += sx; | - |
4196 | sx = 0; never executed (the execution status of this line is deduced): sx = 0; | - |
4197 | } | 0 |
4198 | if (sx + length > image_width) partially evaluated: sx + length > image_width no Evaluation Count:0 | yes Evaluation Count:39944 |
| 0-39944 |
4199 | length = image_width - sx; never executed: length = image_width - sx; | 0 |
4200 | if (length > 0) { partially evaluated: length > 0 yes Evaluation Count:39944 | no Evaluation Count:0 |
| 0-39944 |
4201 | const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; executed (the execution status of this line is deduced): const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; | - |
4202 | while (length) { evaluated: length yes Evaluation Count:39944 | yes Evaluation Count:39944 |
| 39944 |
4203 | int l = qMin(buffer_size, length); executed (the execution status of this line is deduced): int l = qMin(buffer_size, length); | - |
4204 | const uint *src = op.src_fetch(src_buffer, &op, data, sy, sx, l); executed (the execution status of this line is deduced): const uint *src = op.src_fetch(src_buffer, &op, data, sy, sx, l); | - |
4205 | uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; evaluated: op.dest_fetch yes Evaluation Count:30056 | yes Evaluation Count:9888 |
| 9888-30056 |
4206 | op.func(dest, src, l, coverage); executed (the execution status of this line is deduced): op.func(dest, src, l, coverage); | - |
4207 | if (op.dest_store) evaluated: op.dest_store yes Evaluation Count:30918 | yes Evaluation Count:9026 |
| 9026-30918 |
4208 | op.dest_store(data->rasterBuffer, x, spans->y, dest, l); executed: op.dest_store(data->rasterBuffer, x, spans->y, dest, l); Execution Count:30918 | 30918 |
4209 | x += l; executed (the execution status of this line is deduced): x += l; | - |
4210 | sx += l; executed (the execution status of this line is deduced): sx += l; | - |
4211 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4212 | } executed: } Execution Count:39944 | 39944 |
4213 | } executed: } Execution Count:39944 | 39944 |
4214 | } executed: } Execution Count:39944 | 39944 |
4215 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4216 | } executed: } Execution Count:39944 | 39944 |
4217 | } executed: } Execution Count:1216 | 1216 |
4218 | | - |
4219 | static void blend_untransformed_argb(int count, const QSpan *spans, void *userData) | - |
4220 | { | - |
4221 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4222 | if (data->texture.format != QImage::Format_ARGB32_Premultiplied evaluated: data->texture.format != QImage::Format_ARGB32_Premultiplied yes Evaluation Count:64 | yes Evaluation Count:27 |
| 27-64 |
4223 | && data->texture.format != QImage::Format_RGB32) { partially evaluated: data->texture.format != QImage::Format_RGB32 yes Evaluation Count:64 | no Evaluation Count:0 |
| 0-64 |
4224 | blend_untransformed_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_untransformed_generic(count, spans, userData); | - |
4225 | return; executed: return; Execution Count:64 | 64 |
4226 | } | - |
4227 | | - |
4228 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
4229 | | - |
4230 | const int image_width = data->texture.width; executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4231 | const int image_height = data->texture.height; executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4232 | int xoff = -qRound(-data->dx); executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx); | - |
4233 | int yoff = -qRound(-data->dy); executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy); | - |
4234 | | - |
4235 | while (count--) { evaluated: count-- yes Evaluation Count:5198 | yes Evaluation Count:27 |
| 27-5198 |
4236 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4237 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4238 | int sx = xoff + x; executed (the execution status of this line is deduced): int sx = xoff + x; | - |
4239 | int sy = yoff + spans->y; executed (the execution status of this line is deduced): int sy = yoff + spans->y; | - |
4240 | if (sy >= 0 && sy < image_height && sx < image_width) { partially evaluated: sy >= 0 yes Evaluation Count:5198 | no Evaluation Count:0 |
partially evaluated: sy < image_height yes Evaluation Count:5198 | no Evaluation Count:0 |
partially evaluated: sx < image_width yes Evaluation Count:5198 | no Evaluation Count:0 |
| 0-5198 |
4241 | if (sx < 0) { partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:5198 |
| 0-5198 |
4242 | x -= sx; never executed (the execution status of this line is deduced): x -= sx; | - |
4243 | length += sx; never executed (the execution status of this line is deduced): length += sx; | - |
4244 | sx = 0; never executed (the execution status of this line is deduced): sx = 0; | - |
4245 | } | 0 |
4246 | if (sx + length > image_width) partially evaluated: sx + length > image_width no Evaluation Count:0 | yes Evaluation Count:5198 |
| 0-5198 |
4247 | length = image_width - sx; never executed: length = image_width - sx; | 0 |
4248 | if (length > 0) { partially evaluated: length > 0 yes Evaluation Count:5198 | no Evaluation Count:0 |
| 0-5198 |
4249 | const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; executed (the execution status of this line is deduced): const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; | - |
4250 | const uint *src = (uint *)data->texture.scanLine(sy) + sx; executed (the execution status of this line is deduced): const uint *src = (uint *)data->texture.scanLine(sy) + sx; | - |
4251 | uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x; executed (the execution status of this line is deduced): uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x; | - |
4252 | op.func(dest, src, length, coverage); executed (the execution status of this line is deduced): op.func(dest, src, length, coverage); | - |
4253 | } executed: } Execution Count:5198 | 5198 |
4254 | } executed: } Execution Count:5198 | 5198 |
4255 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4256 | } executed: } Execution Count:5198 | 5198 |
4257 | } executed: } Execution Count:27 | 27 |
4258 | | - |
4259 | static inline quint16 interpolate_pixel_rgb16_255(quint16 x, quint8 a, | - |
4260 | quint16 y, quint8 b) | - |
4261 | { | - |
4262 | quint16 t = ((((x & 0x07e0) * a) + ((y & 0x07e0) * b)) >> 5) & 0x07e0; executed (the execution status of this line is deduced): quint16 t = ((((x & 0x07e0) * a) + ((y & 0x07e0) * b)) >> 5) & 0x07e0; | - |
4263 | t |= ((((x & 0xf81f) * a) + ((y & 0xf81f) * b)) >> 5) & 0xf81f; executed (the execution status of this line is deduced): t |= ((((x & 0xf81f) * a) + ((y & 0xf81f) * b)) >> 5) & 0xf81f; | - |
4264 | | - |
4265 | return t; executed: return t; Execution Count:1280 | 1280 |
4266 | } | - |
4267 | | - |
4268 | static inline quint32 interpolate_pixel_rgb16x2_255(quint32 x, quint8 a, | - |
4269 | quint32 y, quint8 b) | - |
4270 | { | - |
4271 | uint t; executed (the execution status of this line is deduced): uint t; | - |
4272 | t = ((((x & 0xf81f07e0) >> 5) * a) + (((y & 0xf81f07e0) >> 5) * b)) & 0xf81f07e0; executed (the execution status of this line is deduced): t = ((((x & 0xf81f07e0) >> 5) * a) + (((y & 0xf81f07e0) >> 5) * b)) & 0xf81f07e0; | - |
4273 | t |= ((((x & 0x07e0f81f) * a) + ((y & 0x07e0f81f) * b)) >> 5) & 0x07e0f81f; executed (the execution status of this line is deduced): t |= ((((x & 0x07e0f81f) * a) + ((y & 0x07e0f81f) * b)) >> 5) & 0x07e0f81f; | - |
4274 | return t; executed: return t; Execution Count:39680 | 39680 |
4275 | } | - |
4276 | | - |
4277 | static inline void blend_sourceOver_rgb16_rgb16(quint16 *Q_DECL_RESTRICT dest, | - |
4278 | const quint16 *Q_DECL_RESTRICT src, | - |
4279 | int length, | - |
4280 | const quint8 alpha, | - |
4281 | const quint8 ialpha) | - |
4282 | { | - |
4283 | const int dstAlign = ((quintptr)dest) & 0x3; executed (the execution status of this line is deduced): const int dstAlign = ((quintptr)dest) & 0x3; | - |
4284 | if (dstAlign) { evaluated: dstAlign yes Evaluation Count:640 | yes Evaluation Count:640 |
| 640 |
4285 | *dest = interpolate_pixel_rgb16_255(*src, alpha, *dest, ialpha); executed (the execution status of this line is deduced): *dest = interpolate_pixel_rgb16_255(*src, alpha, *dest, ialpha); | - |
4286 | ++dest; executed (the execution status of this line is deduced): ++dest; | - |
4287 | ++src; executed (the execution status of this line is deduced): ++src; | - |
4288 | --length; executed (the execution status of this line is deduced): --length; | - |
4289 | } executed: } Execution Count:640 | 640 |
4290 | const int srcAlign = ((quintptr)src) & 0x3; executed (the execution status of this line is deduced): const int srcAlign = ((quintptr)src) & 0x3; | - |
4291 | int length32 = length >> 1; executed (the execution status of this line is deduced): int length32 = length >> 1; | - |
4292 | if (length32 && srcAlign == 0) { partially evaluated: length32 yes Evaluation Count:1280 | no Evaluation Count:0 |
partially evaluated: srcAlign == 0 yes Evaluation Count:1280 | no Evaluation Count:0 |
| 0-1280 |
4293 | while (length32--) { evaluated: length32-- yes Evaluation Count:39680 | yes Evaluation Count:1280 |
| 1280-39680 |
4294 | const quint32 *src32 = reinterpret_cast<const quint32*>(src); executed (the execution status of this line is deduced): const quint32 *src32 = reinterpret_cast<const quint32*>(src); | - |
4295 | quint32 *dest32 = reinterpret_cast<quint32*>(dest); executed (the execution status of this line is deduced): quint32 *dest32 = reinterpret_cast<quint32*>(dest); | - |
4296 | *dest32 = interpolate_pixel_rgb16x2_255(*src32, alpha, executed (the execution status of this line is deduced): *dest32 = interpolate_pixel_rgb16x2_255(*src32, alpha, | - |
4297 | *dest32, ialpha); executed (the execution status of this line is deduced): *dest32, ialpha); | - |
4298 | dest += 2; executed (the execution status of this line is deduced): dest += 2; | - |
4299 | src += 2; executed (the execution status of this line is deduced): src += 2; | - |
4300 | } executed: } Execution Count:39680 | 39680 |
4301 | length &= 0x1; executed (the execution status of this line is deduced): length &= 0x1; | - |
4302 | } executed: } Execution Count:1280 | 1280 |
4303 | while (length--) { evaluated: length-- yes Evaluation Count:640 | yes Evaluation Count:1280 |
| 640-1280 |
4304 | *dest = interpolate_pixel_rgb16_255(*src, alpha, *dest, ialpha); executed (the execution status of this line is deduced): *dest = interpolate_pixel_rgb16_255(*src, alpha, *dest, ialpha); | - |
4305 | ++dest; executed (the execution status of this line is deduced): ++dest; | - |
4306 | ++src; executed (the execution status of this line is deduced): ++src; | - |
4307 | } executed: } Execution Count:640 | 640 |
4308 | } executed: } Execution Count:1280 | 1280 |
4309 | | - |
4310 | static void blend_untransformed_rgb565(int count, const QSpan *spans, void *userData) | - |
4311 | { | - |
4312 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
4313 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4314 | | - |
4315 | if (data->texture.format != QImage::Format_RGB16 partially evaluated: data->texture.format != QImage::Format_RGB16 yes Evaluation Count:175 | no Evaluation Count:0 |
| 0-175 |
4316 | || (mode != QPainter::CompositionMode_SourceOver never evaluated: mode != QPainter::CompositionMode_SourceOver | 0 |
4317 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
4318 | { | - |
4319 | blend_untransformed_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_untransformed_generic(count, spans, userData); | - |
4320 | return; executed: return; Execution Count:175 | 175 |
4321 | } | - |
4322 | | - |
4323 | const int image_width = data->texture.width; never executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4324 | const int image_height = data->texture.height; never executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4325 | int xoff = -qRound(-data->dx); never executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx); | - |
4326 | int yoff = -qRound(-data->dy); never executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy); | - |
4327 | | - |
4328 | while (count--) { | 0 |
4329 | const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; never executed (the execution status of this line is deduced): const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; | - |
4330 | if (coverage == 0) { never evaluated: coverage == 0 | 0 |
4331 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4332 | continue; never executed: continue; | 0 |
4333 | } | - |
4334 | | - |
4335 | int x = spans->x; never executed (the execution status of this line is deduced): int x = spans->x; | - |
4336 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4337 | int sx = xoff + x; never executed (the execution status of this line is deduced): int sx = xoff + x; | - |
4338 | int sy = yoff + spans->y; never executed (the execution status of this line is deduced): int sy = yoff + spans->y; | - |
4339 | if (sy >= 0 && sy < image_height && sx < image_width) { never evaluated: sy >= 0 never evaluated: sy < image_height never evaluated: sx < image_width | 0 |
4340 | if (sx < 0) { | 0 |
4341 | x -= sx; never executed (the execution status of this line is deduced): x -= sx; | - |
4342 | length += sx; never executed (the execution status of this line is deduced): length += sx; | - |
4343 | sx = 0; never executed (the execution status of this line is deduced): sx = 0; | - |
4344 | } | 0 |
4345 | if (sx + length > image_width) never evaluated: sx + length > image_width | 0 |
4346 | length = image_width - sx; never executed: length = image_width - sx; | 0 |
4347 | if (length > 0) { never evaluated: length > 0 | 0 |
4348 | quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + x; never executed (the execution status of this line is deduced): quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + x; | - |
4349 | const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; never executed (the execution status of this line is deduced): const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; | - |
4350 | if (coverage == 255) { never evaluated: coverage == 255 | 0 |
4351 | memcpy(dest, src, length * sizeof(quint16)); never executed (the execution status of this line is deduced): memcpy(dest, src, length * sizeof(quint16)); | - |
4352 | } else { | 0 |
4353 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4354 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4355 | if (alpha > 0) never evaluated: alpha > 0 | 0 |
4356 | blend_sourceOver_rgb16_rgb16(dest, src, length, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, src, length, alpha, ialpha); | 0 |
4357 | } | 0 |
4358 | } | - |
4359 | } | 0 |
4360 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4361 | } | 0 |
4362 | } | 0 |
4363 | | - |
4364 | static void blend_tiled_generic(int count, const QSpan *spans, void *userData) | - |
4365 | { | - |
4366 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4367 | | - |
4368 | uint buffer[buffer_size]; executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
4369 | uint src_buffer[buffer_size]; executed (the execution status of this line is deduced): uint src_buffer[buffer_size]; | - |
4370 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
4371 | | - |
4372 | const int image_width = data->texture.width; executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4373 | const int image_height = data->texture.height; executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4374 | int xoff = -qRound(-data->dx) % image_width; executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx) % image_width; | - |
4375 | int yoff = -qRound(-data->dy) % image_height; executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy) % image_height; | - |
4376 | | - |
4377 | if (xoff < 0) evaluated: xoff < 0 yes Evaluation Count:14282 | yes Evaluation Count:1843 |
| 1843-14282 |
4378 | xoff += image_width; executed: xoff += image_width; Execution Count:14282 | 14282 |
4379 | if (yoff < 0) evaluated: yoff < 0 yes Evaluation Count:14532 | yes Evaluation Count:1593 |
| 1593-14532 |
4380 | yoff += image_height; executed: yoff += image_height; Execution Count:14532 | 14532 |
4381 | | - |
4382 | while (count--) { evaluated: count-- yes Evaluation Count:418116 | yes Evaluation Count:16125 |
| 16125-418116 |
4383 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4384 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4385 | int sx = (xoff + spans->x) % image_width; executed (the execution status of this line is deduced): int sx = (xoff + spans->x) % image_width; | - |
4386 | int sy = (spans->y + yoff) % image_height; executed (the execution status of this line is deduced): int sy = (spans->y + yoff) % image_height; | - |
4387 | if (sx < 0) partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:418116 |
| 0-418116 |
4388 | sx += image_width; never executed: sx += image_width; | 0 |
4389 | if (sy < 0) partially evaluated: sy < 0 no Evaluation Count:0 | yes Evaluation Count:418116 |
| 0-418116 |
4390 | sy += image_height; never executed: sy += image_height; | 0 |
4391 | | - |
4392 | const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; executed (the execution status of this line is deduced): const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; | - |
4393 | while (length) { evaluated: length yes Evaluation Count:1129687 | yes Evaluation Count:418116 |
| 418116-1129687 |
4394 | int l = qMin(image_width - sx, length); executed (the execution status of this line is deduced): int l = qMin(image_width - sx, length); | - |
4395 | if (buffer_size < l) partially evaluated: buffer_size < l no Evaluation Count:0 | yes Evaluation Count:1129687 |
| 0-1129687 |
4396 | l = buffer_size; never executed: l = buffer_size; | 0 |
4397 | const uint *src = op.src_fetch(src_buffer, &op, data, sy, sx, l); executed (the execution status of this line is deduced): const uint *src = op.src_fetch(src_buffer, &op, data, sy, sx, l); | - |
4398 | uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; evaluated: op.dest_fetch yes Evaluation Count:1126250 | yes Evaluation Count:3437 |
| 3437-1126250 |
4399 | op.func(dest, src, l, coverage); executed (the execution status of this line is deduced): op.func(dest, src, l, coverage); | - |
4400 | if (op.dest_store) evaluated: op.dest_store yes Evaluation Count:1046462 | yes Evaluation Count:83225 |
| 83225-1046462 |
4401 | op.dest_store(data->rasterBuffer, x, spans->y, dest, l); executed: op.dest_store(data->rasterBuffer, x, spans->y, dest, l); Execution Count:1046462 | 1046462 |
4402 | x += l; executed (the execution status of this line is deduced): x += l; | - |
4403 | sx += l; executed (the execution status of this line is deduced): sx += l; | - |
4404 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4405 | if (sx >= image_width) evaluated: sx >= image_width yes Evaluation Count:896108 | yes Evaluation Count:233579 |
| 233579-896108 |
4406 | sx = 0; executed: sx = 0; Execution Count:896108 | 896108 |
4407 | } executed: } Execution Count:1129687 | 1129687 |
4408 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4409 | } executed: } Execution Count:418116 | 418116 |
4410 | } executed: } Execution Count:16125 | 16125 |
4411 | | - |
4412 | static void blend_tiled_argb(int count, const QSpan *spans, void *userData) | - |
4413 | { | - |
4414 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4415 | if (data->texture.format != QImage::Format_ARGB32_Premultiplied evaluated: data->texture.format != QImage::Format_ARGB32_Premultiplied yes Evaluation Count:1 | yes Evaluation Count:1457 |
| 1-1457 |
4416 | && data->texture.format != QImage::Format_RGB32) { partially evaluated: data->texture.format != QImage::Format_RGB32 no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
4417 | blend_tiled_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_tiled_generic(count, spans, userData); | - |
4418 | return; | 0 |
4419 | } | - |
4420 | | - |
4421 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
4422 | | - |
4423 | int image_width = data->texture.width; executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
4424 | int image_height = data->texture.height; executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
4425 | int xoff = -qRound(-data->dx) % image_width; executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx) % image_width; | - |
4426 | int yoff = -qRound(-data->dy) % image_height; executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy) % image_height; | - |
4427 | | - |
4428 | if (xoff < 0) partially evaluated: xoff < 0 no Evaluation Count:0 | yes Evaluation Count:1458 |
| 0-1458 |
4429 | xoff += image_width; never executed: xoff += image_width; | 0 |
4430 | if (yoff < 0) partially evaluated: yoff < 0 no Evaluation Count:0 | yes Evaluation Count:1458 |
| 0-1458 |
4431 | yoff += image_height; never executed: yoff += image_height; | 0 |
4432 | | - |
4433 | while (count--) { evaluated: count-- yes Evaluation Count:9299 | yes Evaluation Count:1458 |
| 1458-9299 |
4434 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4435 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4436 | int sx = (xoff + spans->x) % image_width; executed (the execution status of this line is deduced): int sx = (xoff + spans->x) % image_width; | - |
4437 | int sy = (spans->y + yoff) % image_height; executed (the execution status of this line is deduced): int sy = (spans->y + yoff) % image_height; | - |
4438 | if (sx < 0) partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:9299 |
| 0-9299 |
4439 | sx += image_width; never executed: sx += image_width; | 0 |
4440 | if (sy < 0) partially evaluated: sy < 0 no Evaluation Count:0 | yes Evaluation Count:9299 |
| 0-9299 |
4441 | sy += image_height; never executed: sy += image_height; | 0 |
4442 | | - |
4443 | const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; executed (the execution status of this line is deduced): const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; | - |
4444 | while (length) { evaluated: length yes Evaluation Count:10522 | yes Evaluation Count:9299 |
| 9299-10522 |
4445 | int l = qMin(image_width - sx, length); executed (the execution status of this line is deduced): int l = qMin(image_width - sx, length); | - |
4446 | if (buffer_size < l) partially evaluated: buffer_size < l no Evaluation Count:0 | yes Evaluation Count:10522 |
| 0-10522 |
4447 | l = buffer_size; never executed: l = buffer_size; | 0 |
4448 | const uint *src = (uint *)data->texture.scanLine(sy) + sx; executed (the execution status of this line is deduced): const uint *src = (uint *)data->texture.scanLine(sy) + sx; | - |
4449 | uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x; executed (the execution status of this line is deduced): uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x; | - |
4450 | op.func(dest, src, l, coverage); executed (the execution status of this line is deduced): op.func(dest, src, l, coverage); | - |
4451 | x += l; executed (the execution status of this line is deduced): x += l; | - |
4452 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4453 | sx = 0; executed (the execution status of this line is deduced): sx = 0; | - |
4454 | } executed: } Execution Count:10522 | 10522 |
4455 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4456 | } executed: } Execution Count:9299 | 9299 |
4457 | } executed: } Execution Count:1458 | 1458 |
4458 | | - |
4459 | static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData) | - |
4460 | { | - |
4461 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
4462 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4463 | | - |
4464 | if (data->texture.format != QImage::Format_RGB16 evaluated: data->texture.format != QImage::Format_RGB16 yes Evaluation Count:15927 | yes Evaluation Count:8 |
| 8-15927 |
4465 | || (mode != QPainter::CompositionMode_SourceOver partially evaluated: mode != QPainter::CompositionMode_SourceOver no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4466 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
4467 | { | - |
4468 | blend_tiled_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_tiled_generic(count, spans, userData); | - |
4469 | return; executed: return; Execution Count:15927 | 15927 |
4470 | } | - |
4471 | | - |
4472 | const int image_width = data->texture.width; executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4473 | const int image_height = data->texture.height; executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4474 | int xoff = -qRound(-data->dx) % image_width; executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx) % image_width; | - |
4475 | int yoff = -qRound(-data->dy) % image_height; executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy) % image_height; | - |
4476 | | - |
4477 | if (xoff < 0) partially evaluated: xoff < 0 no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4478 | xoff += image_width; never executed: xoff += image_width; | 0 |
4479 | if (yoff < 0) partially evaluated: yoff < 0 no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4480 | yoff += image_height; never executed: yoff += image_height; | 0 |
4481 | | - |
4482 | while (count--) { evaluated: count-- yes Evaluation Count:1024 | yes Evaluation Count:8 |
| 8-1024 |
4483 | const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; executed (the execution status of this line is deduced): const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; | - |
4484 | if (coverage == 0) { evaluated: coverage == 0 yes Evaluation Count:128 | yes Evaluation Count:896 |
| 128-896 |
4485 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4486 | continue; executed: continue; Execution Count:128 | 128 |
4487 | } | - |
4488 | | - |
4489 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4490 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4491 | int sx = (xoff + spans->x) % image_width; executed (the execution status of this line is deduced): int sx = (xoff + spans->x) % image_width; | - |
4492 | int sy = (spans->y + yoff) % image_height; executed (the execution status of this line is deduced): int sy = (spans->y + yoff) % image_height; | - |
4493 | if (sx < 0) partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:896 |
| 0-896 |
4494 | sx += image_width; never executed: sx += image_width; | 0 |
4495 | if (sy < 0) partially evaluated: sy < 0 no Evaluation Count:0 | yes Evaluation Count:896 |
| 0-896 |
4496 | sy += image_height; never executed: sy += image_height; | 0 |
4497 | | - |
4498 | if (coverage == 255) { evaluated: coverage == 255 yes Evaluation Count:128 | yes Evaluation Count:768 |
| 128-768 |
4499 | // Copy the first texture block | - |
4500 | length = qMin(image_width,length); executed (the execution status of this line is deduced): length = qMin(image_width,length); | - |
4501 | int tx = x; executed (the execution status of this line is deduced): int tx = x; | - |
4502 | while (length) { evaluated: length yes Evaluation Count:256 | yes Evaluation Count:128 |
| 128-256 |
4503 | int l = qMin(image_width - sx, length); executed (the execution status of this line is deduced): int l = qMin(image_width - sx, length); | - |
4504 | if (buffer_size < l) partially evaluated: buffer_size < l no Evaluation Count:0 | yes Evaluation Count:256 |
| 0-256 |
4505 | l = buffer_size; never executed: l = buffer_size; | 0 |
4506 | quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + tx; executed (the execution status of this line is deduced): quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + tx; | - |
4507 | const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; executed (the execution status of this line is deduced): const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; | - |
4508 | memcpy(dest, src, l * sizeof(quint16)); executed (the execution status of this line is deduced): memcpy(dest, src, l * sizeof(quint16)); | - |
4509 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4510 | tx += l; executed (the execution status of this line is deduced): tx += l; | - |
4511 | sx = 0; executed (the execution status of this line is deduced): sx = 0; | - |
4512 | } executed: } Execution Count:256 | 256 |
4513 | | - |
4514 | // Now use the rasterBuffer as the source of the texture, | - |
4515 | // We can now progressively copy larger blocks | - |
4516 | // - Less cpu time in code figuring out what to copy | - |
4517 | // We are dealing with one block of data | - |
4518 | // - More likely to fit in the cache | - |
4519 | // - can use memcpy | - |
4520 | int copy_image_width = qMin(image_width, int(spans->len)); executed (the execution status of this line is deduced): int copy_image_width = qMin(image_width, int(spans->len)); | - |
4521 | length = spans->len - copy_image_width; executed (the execution status of this line is deduced): length = spans->len - copy_image_width; | - |
4522 | quint16 *src = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + x; executed (the execution status of this line is deduced): quint16 *src = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + x; | - |
4523 | quint16 *dest = src + copy_image_width; executed (the execution status of this line is deduced): quint16 *dest = src + copy_image_width; | - |
4524 | while (copy_image_width < length) { partially evaluated: copy_image_width < length no Evaluation Count:0 | yes Evaluation Count:128 |
| 0-128 |
4525 | memcpy(dest, src, copy_image_width * sizeof(quint16)); never executed (the execution status of this line is deduced): memcpy(dest, src, copy_image_width * sizeof(quint16)); | - |
4526 | dest += copy_image_width; never executed (the execution status of this line is deduced): dest += copy_image_width; | - |
4527 | length -= copy_image_width; never executed (the execution status of this line is deduced): length -= copy_image_width; | - |
4528 | copy_image_width *= 2; never executed (the execution status of this line is deduced): copy_image_width *= 2; | - |
4529 | } | 0 |
4530 | if (length > 0) partially evaluated: length > 0 yes Evaluation Count:128 | no Evaluation Count:0 |
| 0-128 |
4531 | memcpy(dest, src, length * sizeof(quint16)); executed: memcpy(dest, src, length * sizeof(quint16)); Execution Count:128 | 128 |
4532 | } else { executed: } Execution Count:128 | 128 |
4533 | const quint8 alpha = (coverage + 1) >> 3; executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4534 | const quint8 ialpha = 0x20 - alpha; executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4535 | if (alpha > 0) { evaluated: alpha > 0 yes Evaluation Count:640 | yes Evaluation Count:128 |
| 128-640 |
4536 | while (length) { evaluated: length yes Evaluation Count:1280 | yes Evaluation Count:640 |
| 640-1280 |
4537 | int l = qMin(image_width - sx, length); executed (the execution status of this line is deduced): int l = qMin(image_width - sx, length); | - |
4538 | if (buffer_size < l) partially evaluated: buffer_size < l no Evaluation Count:0 | yes Evaluation Count:1280 |
| 0-1280 |
4539 | l = buffer_size; never executed: l = buffer_size; | 0 |
4540 | quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + x; executed (the execution status of this line is deduced): quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + x; | - |
4541 | const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; executed (the execution status of this line is deduced): const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx; | - |
4542 | blend_sourceOver_rgb16_rgb16(dest, src, l, alpha, ialpha); executed (the execution status of this line is deduced): blend_sourceOver_rgb16_rgb16(dest, src, l, alpha, ialpha); | - |
4543 | x += l; executed (the execution status of this line is deduced): x += l; | - |
4544 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4545 | sx = 0; executed (the execution status of this line is deduced): sx = 0; | - |
4546 | } executed: } Execution Count:1280 | 1280 |
4547 | } executed: } Execution Count:640 | 640 |
4548 | } executed: } Execution Count:768 | 768 |
4549 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4550 | } executed: } Execution Count:896 | 896 |
4551 | } executed: } Execution Count:8 | 8 |
4552 | | - |
4553 | static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans, void *userData) | - |
4554 | { | - |
4555 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); never executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
4556 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; never executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4557 | | - |
4558 | if (data->texture.format != QImage::Format_RGB16 never evaluated: data->texture.format != QImage::Format_RGB16 | 0 |
4559 | || (mode != QPainter::CompositionMode_SourceOver never evaluated: mode != QPainter::CompositionMode_SourceOver | 0 |
4560 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
4561 | { | - |
4562 | blend_src_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
4563 | return; | 0 |
4564 | } | - |
4565 | | - |
4566 | quint16 buffer[buffer_size]; never executed (the execution status of this line is deduced): quint16 buffer[buffer_size]; | - |
4567 | | - |
4568 | const int src_minx = data->texture.x1; never executed (the execution status of this line is deduced): const int src_minx = data->texture.x1; | - |
4569 | const int src_miny = data->texture.y1; never executed (the execution status of this line is deduced): const int src_miny = data->texture.y1; | - |
4570 | const int src_maxx = data->texture.x2 - 1; never executed (the execution status of this line is deduced): const int src_maxx = data->texture.x2 - 1; | - |
4571 | const int src_maxy = data->texture.y2 - 1; never executed (the execution status of this line is deduced): const int src_maxy = data->texture.y2 - 1; | - |
4572 | | - |
4573 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
4574 | // The increment pr x in the scanline | - |
4575 | const int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): const int fdx = (int)(data->m11 * fixed_scale); | - |
4576 | const int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): const int fdy = (int)(data->m12 * fixed_scale); | - |
4577 | | - |
4578 | while (count--) { | 0 |
4579 | const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; never executed (the execution status of this line is deduced): const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; | - |
4580 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4581 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4582 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
4583 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4584 | continue; never executed: continue; | 0 |
4585 | } | - |
4586 | | - |
4587 | quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; never executed (the execution status of this line is deduced): quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; | - |
4588 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
4589 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
4590 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
4591 | + data->m11 * cx + data->dx) * fixed_scale) - half_point; never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale) - half_point; | - |
4592 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
4593 | + data->m12 * cx + data->dy) * fixed_scale) - half_point; never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale) - half_point; | - |
4594 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4595 | | - |
4596 | while (length) { | 0 |
4597 | int l; never executed (the execution status of this line is deduced): int l; | - |
4598 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
4599 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
4600 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
4601 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
4602 | } else { | 0 |
4603 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
4604 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
4605 | } | 0 |
4606 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
4607 | | - |
4608 | while (b < end) { | 0 |
4609 | int x1 = (x >> 16); never executed (the execution status of this line is deduced): int x1 = (x >> 16); | - |
4610 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
4611 | int y1 = (y >> 16); never executed (the execution status of this line is deduced): int y1 = (y >> 16); | - |
4612 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
4613 | | - |
4614 | fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_minx, src_maxx, x1, x2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_minx, src_maxx, x1, x2); | - |
4615 | fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_miny, src_maxy, y1, y2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_miny, src_maxy, y1, y2); | - |
4616 | | - |
4617 | const quint16 *src1 = (quint16*)data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const quint16 *src1 = (quint16*)data->texture.scanLine(y1); | - |
4618 | const quint16 *src2 = (quint16*)data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const quint16 *src2 = (quint16*)data->texture.scanLine(y2); | - |
4619 | quint16 tl = src1[x1]; never executed (the execution status of this line is deduced): quint16 tl = src1[x1]; | - |
4620 | const quint16 tr = src1[x2]; never executed (the execution status of this line is deduced): const quint16 tr = src1[x2]; | - |
4621 | quint16 bl = src2[x1]; never executed (the execution status of this line is deduced): quint16 bl = src2[x1]; | - |
4622 | const quint16 br = src2[x2]; never executed (the execution status of this line is deduced): const quint16 br = src2[x2]; | - |
4623 | | - |
4624 | const uint distxsl8 = x & 0xff00; never executed (the execution status of this line is deduced): const uint distxsl8 = x & 0xff00; | - |
4625 | const uint distysl8 = y & 0xff00; never executed (the execution status of this line is deduced): const uint distysl8 = y & 0xff00; | - |
4626 | const uint distx = distxsl8 >> 8; never executed (the execution status of this line is deduced): const uint distx = distxsl8 >> 8; | - |
4627 | const uint disty = distysl8 >> 8; never executed (the execution status of this line is deduced): const uint disty = distysl8 >> 8; | - |
4628 | const uint distxy = distx * disty; never executed (the execution status of this line is deduced): const uint distxy = distx * disty; | - |
4629 | | - |
4630 | const uint tlw = 0x10000 - distxsl8 - distysl8 + distxy; // (256 - distx) * (256 - disty) never executed (the execution status of this line is deduced): const uint tlw = 0x10000 - distxsl8 - distysl8 + distxy; | - |
4631 | const uint trw = distxsl8 - distxy; // distx * (256 - disty) never executed (the execution status of this line is deduced): const uint trw = distxsl8 - distxy; | - |
4632 | const uint blw = distysl8 - distxy; // (256 - distx) * disty never executed (the execution status of this line is deduced): const uint blw = distysl8 - distxy; | - |
4633 | const uint brw = distxy; // distx * disty never executed (the execution status of this line is deduced): const uint brw = distxy; | - |
4634 | uint red = ((tl & 0xf800) * tlw + (tr & 0xf800) * trw never executed (the execution status of this line is deduced): uint red = ((tl & 0xf800) * tlw + (tr & 0xf800) * trw | - |
4635 | + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; never executed (the execution status of this line is deduced): + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; | - |
4636 | uint green = ((tl & 0x07e0) * tlw + (tr & 0x07e0) * trw never executed (the execution status of this line is deduced): uint green = ((tl & 0x07e0) * tlw + (tr & 0x07e0) * trw | - |
4637 | + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; never executed (the execution status of this line is deduced): + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; | - |
4638 | uint blue = ((tl & 0x001f) * tlw + (tr & 0x001f) * trw never executed (the execution status of this line is deduced): uint blue = ((tl & 0x001f) * tlw + (tr & 0x001f) * trw | - |
4639 | + (bl & 0x001f) * blw + (br & 0x001f) * brw); never executed (the execution status of this line is deduced): + (bl & 0x001f) * blw + (br & 0x001f) * brw); | - |
4640 | *b = quint16((red | green | blue) >> 16); never executed (the execution status of this line is deduced): *b = quint16((red | green | blue) >> 16); | - |
4641 | | - |
4642 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4643 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4644 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4645 | } | 0 |
4646 | | - |
4647 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
4648 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
4649 | | - |
4650 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
4651 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4652 | } | 0 |
4653 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4654 | } | 0 |
4655 | } else { | 0 |
4656 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
4657 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
4658 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
4659 | | - |
4660 | while (count--) { | 0 |
4661 | const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; never executed (the execution status of this line is deduced): const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; | - |
4662 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4663 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4664 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
4665 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4666 | continue; never executed: continue; | 0 |
4667 | } | - |
4668 | | - |
4669 | quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; never executed (the execution status of this line is deduced): quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; | - |
4670 | | - |
4671 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
4672 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
4673 | | - |
4674 | qreal x = data->m21 * cy + data->m11 * cx + data->dx; never executed (the execution status of this line is deduced): qreal x = data->m21 * cy + data->m11 * cx + data->dx; | - |
4675 | qreal y = data->m22 * cy + data->m12 * cx + data->dy; never executed (the execution status of this line is deduced): qreal y = data->m22 * cy + data->m12 * cx + data->dy; | - |
4676 | qreal w = data->m23 * cy + data->m13 * cx + data->m33; never executed (the execution status of this line is deduced): qreal w = data->m23 * cy + data->m13 * cx + data->m33; | - |
4677 | | - |
4678 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4679 | while (length) { | 0 |
4680 | int l; never executed (the execution status of this line is deduced): int l; | - |
4681 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
4682 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
4683 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
4684 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
4685 | } else { | 0 |
4686 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
4687 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
4688 | } | 0 |
4689 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
4690 | | - |
4691 | while (b < end) { | 0 |
4692 | const qreal iw = w == 0 ? 1 : 1 / w; | 0 |
4693 | const qreal px = x * iw - qreal(0.5); never executed (the execution status of this line is deduced): const qreal px = x * iw - qreal(0.5); | - |
4694 | const qreal py = y * iw - qreal(0.5); never executed (the execution status of this line is deduced): const qreal py = y * iw - qreal(0.5); | - |
4695 | | - |
4696 | int x1 = int(px) - (px < 0); never executed (the execution status of this line is deduced): int x1 = int(px) - (px < 0); | - |
4697 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
4698 | int y1 = int(py) - (py < 0); never executed (the execution status of this line is deduced): int y1 = int(py) - (py < 0); | - |
4699 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
4700 | | - |
4701 | fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_minx, src_maxx, x1, x2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_minx, src_maxx, x1, x2); | - |
4702 | fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_miny, src_maxy, y1, y2); never executed (the execution status of this line is deduced): fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_miny, src_maxy, y1, y2); | - |
4703 | | - |
4704 | const quint16 *src1 = (quint16 *)data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const quint16 *src1 = (quint16 *)data->texture.scanLine(y1); | - |
4705 | const quint16 *src2 = (quint16 *)data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const quint16 *src2 = (quint16 *)data->texture.scanLine(y2); | - |
4706 | quint16 tl = src1[x1]; never executed (the execution status of this line is deduced): quint16 tl = src1[x1]; | - |
4707 | const quint16 tr = src1[x2]; never executed (the execution status of this line is deduced): const quint16 tr = src1[x2]; | - |
4708 | quint16 bl = src2[x1]; never executed (the execution status of this line is deduced): quint16 bl = src2[x1]; | - |
4709 | const quint16 br = src2[x2]; never executed (the execution status of this line is deduced): const quint16 br = src2[x2]; | - |
4710 | | - |
4711 | const uint distx = uint((px - x1) * 256); never executed (the execution status of this line is deduced): const uint distx = uint((px - x1) * 256); | - |
4712 | const uint disty = uint((py - y1) * 256); never executed (the execution status of this line is deduced): const uint disty = uint((py - y1) * 256); | - |
4713 | const uint distxsl8 = distx << 8; never executed (the execution status of this line is deduced): const uint distxsl8 = distx << 8; | - |
4714 | const uint distysl8 = disty << 8; never executed (the execution status of this line is deduced): const uint distysl8 = disty << 8; | - |
4715 | const uint distxy = distx * disty; never executed (the execution status of this line is deduced): const uint distxy = distx * disty; | - |
4716 | | - |
4717 | const uint tlw = 0x10000 - distxsl8 - distysl8 + distxy; // (256 - distx) * (256 - disty) never executed (the execution status of this line is deduced): const uint tlw = 0x10000 - distxsl8 - distysl8 + distxy; | - |
4718 | const uint trw = distxsl8 - distxy; // distx * (256 - disty) never executed (the execution status of this line is deduced): const uint trw = distxsl8 - distxy; | - |
4719 | const uint blw = distysl8 - distxy; // (256 - distx) * disty never executed (the execution status of this line is deduced): const uint blw = distysl8 - distxy; | - |
4720 | const uint brw = distxy; // distx * disty never executed (the execution status of this line is deduced): const uint brw = distxy; | - |
4721 | uint red = ((tl & 0xf800) * tlw + (tr & 0xf800) * trw never executed (the execution status of this line is deduced): uint red = ((tl & 0xf800) * tlw + (tr & 0xf800) * trw | - |
4722 | + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; never executed (the execution status of this line is deduced): + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; | - |
4723 | uint green = ((tl & 0x07e0) * tlw + (tr & 0x07e0) * trw never executed (the execution status of this line is deduced): uint green = ((tl & 0x07e0) * tlw + (tr & 0x07e0) * trw | - |
4724 | + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; never executed (the execution status of this line is deduced): + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; | - |
4725 | uint blue = ((tl & 0x001f) * tlw + (tr & 0x001f) * trw never executed (the execution status of this line is deduced): uint blue = ((tl & 0x001f) * tlw + (tr & 0x001f) * trw | - |
4726 | + (bl & 0x001f) * blw + (br & 0x001f) * brw); never executed (the execution status of this line is deduced): + (bl & 0x001f) * blw + (br & 0x001f) * brw); | - |
4727 | *b = quint16((red | green | blue) >> 16); never executed (the execution status of this line is deduced): *b = quint16((red | green | blue) >> 16); | - |
4728 | | - |
4729 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4730 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4731 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4732 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
4733 | } | 0 |
4734 | | - |
4735 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
4736 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
4737 | | - |
4738 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
4739 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4740 | } | 0 |
4741 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4742 | } | 0 |
4743 | } | 0 |
4744 | } | - |
4745 | | - |
4746 | static void blend_transformed_argb(int count, const QSpan *spans, void *userData) | - |
4747 | { | - |
4748 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4749 | if (data->texture.format != QImage::Format_ARGB32_Premultiplied partially evaluated: data->texture.format != QImage::Format_ARGB32_Premultiplied yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1 |
4750 | && data->texture.format != QImage::Format_RGB32) { partially evaluated: data->texture.format != QImage::Format_RGB32 yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1 |
4751 | blend_src_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
4752 | return; executed: return; Execution Count:1 | 1 |
4753 | } | - |
4754 | | - |
4755 | CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode]; never executed (the execution status of this line is deduced): CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode]; | - |
4756 | uint buffer[buffer_size]; never executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
4757 | | - |
4758 | int image_width = data->texture.width; never executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
4759 | int image_height = data->texture.height; never executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
4760 | | - |
4761 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
4762 | // The increment pr x in the scanline | - |
4763 | int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
4764 | int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
4765 | | - |
4766 | while (count--) { | 0 |
4767 | void *t = data->rasterBuffer->scanLine(spans->y); never executed (the execution status of this line is deduced): void *t = data->rasterBuffer->scanLine(spans->y); | - |
4768 | | - |
4769 | uint *target = ((uint *)t) + spans->x; never executed (the execution status of this line is deduced): uint *target = ((uint *)t) + spans->x; | - |
4770 | | - |
4771 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
4772 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
4773 | | - |
4774 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
4775 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
4776 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
4777 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
4778 | | - |
4779 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4780 | const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; never executed (the execution status of this line is deduced): const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; | - |
4781 | while (length) { | 0 |
4782 | int l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
4783 | const uint *end = buffer + l; never executed (the execution status of this line is deduced): const uint *end = buffer + l; | - |
4784 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
4785 | while (b < end) { | 0 |
4786 | int px = qBound(0, x >> 16, image_width - 1); never executed (the execution status of this line is deduced): int px = qBound(0, x >> 16, image_width - 1); | - |
4787 | int py = qBound(0, y >> 16, image_height - 1); never executed (the execution status of this line is deduced): int py = qBound(0, y >> 16, image_height - 1); | - |
4788 | *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px]; | - |
4789 | | - |
4790 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4791 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4792 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4793 | } | 0 |
4794 | func(target, buffer, l, coverage); never executed (the execution status of this line is deduced): func(target, buffer, l, coverage); | - |
4795 | target += l; never executed (the execution status of this line is deduced): target += l; | - |
4796 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4797 | } | 0 |
4798 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4799 | } | 0 |
4800 | } else { | 0 |
4801 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
4802 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
4803 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
4804 | while (count--) { | 0 |
4805 | void *t = data->rasterBuffer->scanLine(spans->y); never executed (the execution status of this line is deduced): void *t = data->rasterBuffer->scanLine(spans->y); | - |
4806 | | - |
4807 | uint *target = ((uint *)t) + spans->x; never executed (the execution status of this line is deduced): uint *target = ((uint *)t) + spans->x; | - |
4808 | | - |
4809 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
4810 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
4811 | | - |
4812 | qreal x = data->m21 * cy + data->m11 * cx + data->dx; never executed (the execution status of this line is deduced): qreal x = data->m21 * cy + data->m11 * cx + data->dx; | - |
4813 | qreal y = data->m22 * cy + data->m12 * cx + data->dy; never executed (the execution status of this line is deduced): qreal y = data->m22 * cy + data->m12 * cx + data->dy; | - |
4814 | qreal w = data->m23 * cy + data->m13 * cx + data->m33; never executed (the execution status of this line is deduced): qreal w = data->m23 * cy + data->m13 * cx + data->m33; | - |
4815 | | - |
4816 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4817 | const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; never executed (the execution status of this line is deduced): const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; | - |
4818 | while (length) { | 0 |
4819 | int l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
4820 | const uint *end = buffer + l; never executed (the execution status of this line is deduced): const uint *end = buffer + l; | - |
4821 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
4822 | while (b < end) { | 0 |
4823 | const qreal iw = w == 0 ? 1 : 1 / w; | 0 |
4824 | const qreal tx = x * iw; never executed (the execution status of this line is deduced): const qreal tx = x * iw; | - |
4825 | const qreal ty = y * iw; never executed (the execution status of this line is deduced): const qreal ty = y * iw; | - |
4826 | const int px = qBound(0, int(tx) - (tx < 0), image_width - 1); never executed (the execution status of this line is deduced): const int px = qBound(0, int(tx) - (tx < 0), image_width - 1); | - |
4827 | const int py = qBound(0, int(ty) - (ty < 0), image_height - 1); never executed (the execution status of this line is deduced): const int py = qBound(0, int(ty) - (ty < 0), image_height - 1); | - |
4828 | | - |
4829 | *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px]; | - |
4830 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4831 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4832 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
4833 | | - |
4834 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4835 | } | 0 |
4836 | func(target, buffer, l, coverage); never executed (the execution status of this line is deduced): func(target, buffer, l, coverage); | - |
4837 | target += l; never executed (the execution status of this line is deduced): target += l; | - |
4838 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4839 | } | 0 |
4840 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4841 | } | 0 |
4842 | } | 0 |
4843 | } | - |
4844 | | - |
4845 | static void blend_transformed_rgb565(int count, const QSpan *spans, void *userData) | - |
4846 | { | - |
4847 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); never executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
4848 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; never executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4849 | | - |
4850 | if (data->texture.format != QImage::Format_RGB16 never evaluated: data->texture.format != QImage::Format_RGB16 | 0 |
4851 | || (mode != QPainter::CompositionMode_SourceOver never evaluated: mode != QPainter::CompositionMode_SourceOver | 0 |
4852 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
4853 | { | - |
4854 | blend_src_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
4855 | return; | 0 |
4856 | } | - |
4857 | | - |
4858 | quint16 buffer[buffer_size]; never executed (the execution status of this line is deduced): quint16 buffer[buffer_size]; | - |
4859 | const int image_width = data->texture.width; never executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4860 | const int image_height = data->texture.height; never executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4861 | | - |
4862 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
4863 | // The increment pr x in the scanline | - |
4864 | const int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): const int fdx = (int)(data->m11 * fixed_scale); | - |
4865 | const int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): const int fdy = (int)(data->m12 * fixed_scale); | - |
4866 | | - |
4867 | while (count--) { | 0 |
4868 | const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; never executed (the execution status of this line is deduced): const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; | - |
4869 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4870 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4871 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
4872 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4873 | continue; never executed: continue; | 0 |
4874 | } | - |
4875 | | - |
4876 | quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; never executed (the execution status of this line is deduced): quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; | - |
4877 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
4878 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
4879 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
4880 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
4881 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
4882 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
4883 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4884 | | - |
4885 | while (length) { | 0 |
4886 | int l; never executed (the execution status of this line is deduced): int l; | - |
4887 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
4888 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
4889 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
4890 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
4891 | } else { | 0 |
4892 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
4893 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
4894 | } | 0 |
4895 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
4896 | | - |
4897 | while (b < end) { | 0 |
4898 | const int px = qBound(0, x >> 16, image_width - 1); never executed (the execution status of this line is deduced): const int px = qBound(0, x >> 16, image_width - 1); | - |
4899 | const int py = qBound(0, y >> 16, image_height - 1); never executed (the execution status of this line is deduced): const int py = qBound(0, y >> 16, image_height - 1); | - |
4900 | | - |
4901 | *b = ((quint16 *)data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = ((quint16 *)data->texture.scanLine(py))[px]; | - |
4902 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4903 | | - |
4904 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4905 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4906 | } | 0 |
4907 | | - |
4908 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
4909 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
4910 | | - |
4911 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
4912 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4913 | } | 0 |
4914 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4915 | } | 0 |
4916 | } else { | 0 |
4917 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
4918 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
4919 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
4920 | | - |
4921 | while (count--) { | 0 |
4922 | const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; never executed (the execution status of this line is deduced): const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; | - |
4923 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4924 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4925 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
4926 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4927 | continue; never executed: continue; | 0 |
4928 | } | - |
4929 | | - |
4930 | quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; never executed (the execution status of this line is deduced): quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; | - |
4931 | | - |
4932 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
4933 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
4934 | | - |
4935 | qreal x = data->m21 * cy + data->m11 * cx + data->dx; never executed (the execution status of this line is deduced): qreal x = data->m21 * cy + data->m11 * cx + data->dx; | - |
4936 | qreal y = data->m22 * cy + data->m12 * cx + data->dy; never executed (the execution status of this line is deduced): qreal y = data->m22 * cy + data->m12 * cx + data->dy; | - |
4937 | qreal w = data->m23 * cy + data->m13 * cx + data->m33; never executed (the execution status of this line is deduced): qreal w = data->m23 * cy + data->m13 * cx + data->m33; | - |
4938 | | - |
4939 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4940 | while (length) { | 0 |
4941 | int l; never executed (the execution status of this line is deduced): int l; | - |
4942 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
4943 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
4944 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
4945 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
4946 | } else { | 0 |
4947 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
4948 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
4949 | } | 0 |
4950 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
4951 | | - |
4952 | while (b < end) { | 0 |
4953 | const qreal iw = w == 0 ? 1 : 1 / w; | 0 |
4954 | const qreal tx = x * iw; never executed (the execution status of this line is deduced): const qreal tx = x * iw; | - |
4955 | const qreal ty = y * iw; never executed (the execution status of this line is deduced): const qreal ty = y * iw; | - |
4956 | | - |
4957 | const int px = qBound(0, int(tx) - (tx < 0), image_width - 1); never executed (the execution status of this line is deduced): const int px = qBound(0, int(tx) - (tx < 0), image_width - 1); | - |
4958 | const int py = qBound(0, int(ty) - (ty < 0), image_height - 1); never executed (the execution status of this line is deduced): const int py = qBound(0, int(ty) - (ty < 0), image_height - 1); | - |
4959 | | - |
4960 | *b = ((quint16 *)data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = ((quint16 *)data->texture.scanLine(py))[px]; | - |
4961 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4962 | | - |
4963 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4964 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4965 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
4966 | } | 0 |
4967 | | - |
4968 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
4969 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
4970 | | - |
4971 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
4972 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4973 | } | 0 |
4974 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4975 | } | 0 |
4976 | } | 0 |
4977 | } | - |
4978 | | - |
4979 | static void blend_transformed_tiled_argb(int count, const QSpan *spans, void *userData) | - |
4980 | { | - |
4981 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4982 | if (data->texture.format != QImage::Format_ARGB32_Premultiplied partially evaluated: data->texture.format != QImage::Format_ARGB32_Premultiplied no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4983 | && data->texture.format != QImage::Format_RGB32) { never evaluated: data->texture.format != QImage::Format_RGB32 | 0 |
4984 | blend_src_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
4985 | return; | 0 |
4986 | } | - |
4987 | | - |
4988 | CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode]; executed (the execution status of this line is deduced): CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode]; | - |
4989 | uint buffer[buffer_size]; executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
4990 | | - |
4991 | int image_width = data->texture.width; executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
4992 | int image_height = data->texture.height; executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
4993 | const int scanline_offset = data->texture.bytesPerLine / 4; executed (the execution status of this line is deduced): const int scanline_offset = data->texture.bytesPerLine / 4; | - |
4994 | | - |
4995 | if (data->fast_matrix) { partially evaluated: data->fast_matrix no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4996 | // The increment pr x in the scanline | - |
4997 | int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
4998 | int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
4999 | | - |
5000 | while (count--) { | 0 |
5001 | void *t = data->rasterBuffer->scanLine(spans->y); never executed (the execution status of this line is deduced): void *t = data->rasterBuffer->scanLine(spans->y); | - |
5002 | | - |
5003 | uint *target = ((uint *)t) + spans->x; never executed (the execution status of this line is deduced): uint *target = ((uint *)t) + spans->x; | - |
5004 | uint *image_bits = (uint *)data->texture.imageData; never executed (the execution status of this line is deduced): uint *image_bits = (uint *)data->texture.imageData; | - |
5005 | | - |
5006 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
5007 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
5008 | | - |
5009 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
5010 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
5011 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
5012 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
5013 | | - |
5014 | const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; never executed (the execution status of this line is deduced): const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; | - |
5015 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
5016 | while (length) { | 0 |
5017 | int l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
5018 | const uint *end = buffer + l; never executed (the execution status of this line is deduced): const uint *end = buffer + l; | - |
5019 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
5020 | while (b < end) { | 0 |
5021 | int px = x >> 16; never executed (the execution status of this line is deduced): int px = x >> 16; | - |
5022 | int py = y >> 16; never executed (the execution status of this line is deduced): int py = y >> 16; | - |
5023 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
5024 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
5025 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
5026 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
5027 | int y_offset = py * scanline_offset; never executed (the execution status of this line is deduced): int y_offset = py * scanline_offset; | - |
5028 | | - |
5029 | Q_ASSERT(px >= 0 && px < image_width); never executed (the execution status of this line is deduced): qt_noop(); | - |
5030 | Q_ASSERT(py >= 0 && py < image_height); never executed (the execution status of this line is deduced): qt_noop(); | - |
5031 | | - |
5032 | *b = image_bits[y_offset + px]; never executed (the execution status of this line is deduced): *b = image_bits[y_offset + px]; | - |
5033 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
5034 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
5035 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
5036 | } | 0 |
5037 | func(target, buffer, l, coverage); never executed (the execution status of this line is deduced): func(target, buffer, l, coverage); | - |
5038 | target += l; never executed (the execution status of this line is deduced): target += l; | - |
5039 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
5040 | } | 0 |
5041 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5042 | } | 0 |
5043 | } else { | 0 |
5044 | const qreal fdx = data->m11; executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
5045 | const qreal fdy = data->m12; executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
5046 | const qreal fdw = data->m13; executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
5047 | while (count--) { evaluated: count-- yes Evaluation Count:111 | yes Evaluation Count:2 |
| 2-111 |
5048 | void *t = data->rasterBuffer->scanLine(spans->y); executed (the execution status of this line is deduced): void *t = data->rasterBuffer->scanLine(spans->y); | - |
5049 | | - |
5050 | uint *target = ((uint *)t) + spans->x; executed (the execution status of this line is deduced): uint *target = ((uint *)t) + spans->x; | - |
5051 | uint *image_bits = (uint *)data->texture.imageData; executed (the execution status of this line is deduced): uint *image_bits = (uint *)data->texture.imageData; | - |
5052 | | - |
5053 | const qreal cx = spans->x + qreal(0.5); executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
5054 | const qreal cy = spans->y + qreal(0.5); executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
5055 | | - |
5056 | qreal x = data->m21 * cy + data->m11 * cx + data->dx; executed (the execution status of this line is deduced): qreal x = data->m21 * cy + data->m11 * cx + data->dx; | - |
5057 | qreal y = data->m22 * cy + data->m12 * cx + data->dy; executed (the execution status of this line is deduced): qreal y = data->m22 * cy + data->m12 * cx + data->dy; | - |
5058 | qreal w = data->m23 * cy + data->m13 * cx + data->m33; executed (the execution status of this line is deduced): qreal w = data->m23 * cy + data->m13 * cx + data->m33; | - |
5059 | | - |
5060 | const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; executed (the execution status of this line is deduced): const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; | - |
5061 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
5062 | while (length) { evaluated: length yes Evaluation Count:111 | yes Evaluation Count:111 |
| 111 |
5063 | int l = qMin(length, buffer_size); executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
5064 | const uint *end = buffer + l; executed (the execution status of this line is deduced): const uint *end = buffer + l; | - |
5065 | uint *b = buffer; executed (the execution status of this line is deduced): uint *b = buffer; | - |
5066 | while (b < end) { evaluated: b < end yes Evaluation Count:12101 | yes Evaluation Count:111 |
| 111-12101 |
5067 | const qreal iw = w == 0 ? 1 : 1 / w; partially evaluated: w == 0 no Evaluation Count:0 | yes Evaluation Count:12101 |
| 0-12101 |
5068 | const qreal tx = x * iw; executed (the execution status of this line is deduced): const qreal tx = x * iw; | - |
5069 | const qreal ty = y * iw; executed (the execution status of this line is deduced): const qreal ty = y * iw; | - |
5070 | int px = int(tx) - (tx < 0); executed (the execution status of this line is deduced): int px = int(tx) - (tx < 0); | - |
5071 | int py = int(ty) - (ty < 0); executed (the execution status of this line is deduced): int py = int(ty) - (ty < 0); | - |
5072 | | - |
5073 | px %= image_width; executed (the execution status of this line is deduced): px %= image_width; | - |
5074 | py %= image_height; executed (the execution status of this line is deduced): py %= image_height; | - |
5075 | if (px < 0) px += image_width; executed: px += image_width; Execution Count:10450 evaluated: px < 0 yes Evaluation Count:10450 | yes Evaluation Count:1651 |
| 1651-10450 |
5076 | if (py < 0) py += image_height; never executed: py += image_height; partially evaluated: py < 0 no Evaluation Count:0 | yes Evaluation Count:12101 |
| 0-12101 |
5077 | int y_offset = py * scanline_offset; executed (the execution status of this line is deduced): int y_offset = py * scanline_offset; | - |
5078 | | - |
5079 | Q_ASSERT(px >= 0 && px < image_width); executed (the execution status of this line is deduced): qt_noop(); | - |
5080 | Q_ASSERT(py >= 0 && py < image_height); executed (the execution status of this line is deduced): qt_noop(); | - |
5081 | | - |
5082 | *b = image_bits[y_offset + px]; executed (the execution status of this line is deduced): *b = image_bits[y_offset + px]; | - |
5083 | x += fdx; executed (the execution status of this line is deduced): x += fdx; | - |
5084 | y += fdy; executed (the execution status of this line is deduced): y += fdy; | - |
5085 | w += fdw; executed (the execution status of this line is deduced): w += fdw; | - |
5086 | //force increment to avoid /0 | - |
5087 | if (!w) { partially evaluated: !w no Evaluation Count:0 | yes Evaluation Count:12101 |
| 0-12101 |
5088 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
5089 | } | 0 |
5090 | ++b; executed (the execution status of this line is deduced): ++b; | - |
5091 | } executed: } Execution Count:12101 | 12101 |
5092 | func(target, buffer, l, coverage); executed (the execution status of this line is deduced): func(target, buffer, l, coverage); | - |
5093 | target += l; executed (the execution status of this line is deduced): target += l; | - |
5094 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
5095 | } executed: } Execution Count:111 | 111 |
5096 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
5097 | } executed: } Execution Count:111 | 111 |
5098 | } executed: } Execution Count:2 | 2 |
5099 | } | - |
5100 | | - |
5101 | static void blend_transformed_tiled_rgb565(int count, const QSpan *spans, void *userData) | - |
5102 | { | - |
5103 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); never executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
5104 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; never executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
5105 | | - |
5106 | if (data->texture.format != QImage::Format_RGB16 never evaluated: data->texture.format != QImage::Format_RGB16 | 0 |
5107 | || (mode != QPainter::CompositionMode_SourceOver never evaluated: mode != QPainter::CompositionMode_SourceOver | 0 |
5108 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
5109 | { | - |
5110 | blend_src_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
5111 | return; | 0 |
5112 | } | - |
5113 | | - |
5114 | quint16 buffer[buffer_size]; never executed (the execution status of this line is deduced): quint16 buffer[buffer_size]; | - |
5115 | const int image_width = data->texture.width; never executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
5116 | const int image_height = data->texture.height; never executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
5117 | | - |
5118 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
5119 | // The increment pr x in the scanline | - |
5120 | const int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): const int fdx = (int)(data->m11 * fixed_scale); | - |
5121 | const int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): const int fdy = (int)(data->m12 * fixed_scale); | - |
5122 | | - |
5123 | while (count--) { | 0 |
5124 | const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; never executed (the execution status of this line is deduced): const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; | - |
5125 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
5126 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
5127 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
5128 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5129 | continue; never executed: continue; | 0 |
5130 | } | - |
5131 | | - |
5132 | quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; never executed (the execution status of this line is deduced): quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; | - |
5133 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
5134 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
5135 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
5136 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
5137 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
5138 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
5139 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
5140 | | - |
5141 | while (length) { | 0 |
5142 | int l; never executed (the execution status of this line is deduced): int l; | - |
5143 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
5144 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
5145 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
5146 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
5147 | } else { | 0 |
5148 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
5149 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
5150 | } | 0 |
5151 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
5152 | | - |
5153 | while (b < end) { | 0 |
5154 | int px = (x >> 16) % image_width; never executed (the execution status of this line is deduced): int px = (x >> 16) % image_width; | - |
5155 | int py = (y >> 16) % image_height; never executed (the execution status of this line is deduced): int py = (y >> 16) % image_height; | - |
5156 | | - |
5157 | if (px < 0) | 0 |
5158 | px += image_width; never executed: px += image_width; | 0 |
5159 | if (py < 0) | 0 |
5160 | py += image_height; never executed: py += image_height; | 0 |
5161 | | - |
5162 | *b = ((quint16 *)data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = ((quint16 *)data->texture.scanLine(py))[px]; | - |
5163 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
5164 | | - |
5165 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
5166 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
5167 | } | 0 |
5168 | | - |
5169 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
5170 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
5171 | | - |
5172 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
5173 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
5174 | } | 0 |
5175 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5176 | } | 0 |
5177 | } else { | 0 |
5178 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
5179 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
5180 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
5181 | | - |
5182 | while (count--) { | 0 |
5183 | const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; never executed (the execution status of this line is deduced): const quint8 coverage = (data->texture.const_alpha * spans->coverage) >> 8; | - |
5184 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
5185 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
5186 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
5187 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5188 | continue; never executed: continue; | 0 |
5189 | } | - |
5190 | | - |
5191 | quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; never executed (the execution status of this line is deduced): quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + spans->x; | - |
5192 | | - |
5193 | const qreal cx = spans->x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = spans->x + qreal(0.5); | - |
5194 | const qreal cy = spans->y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = spans->y + qreal(0.5); | - |
5195 | | - |
5196 | qreal x = data->m21 * cy + data->m11 * cx + data->dx; never executed (the execution status of this line is deduced): qreal x = data->m21 * cy + data->m11 * cx + data->dx; | - |
5197 | qreal y = data->m22 * cy + data->m12 * cx + data->dy; never executed (the execution status of this line is deduced): qreal y = data->m22 * cy + data->m12 * cx + data->dy; | - |
5198 | qreal w = data->m23 * cy + data->m13 * cx + data->m33; never executed (the execution status of this line is deduced): qreal w = data->m23 * cy + data->m13 * cx + data->m33; | - |
5199 | | - |
5200 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
5201 | while (length) { | 0 |
5202 | int l; never executed (the execution status of this line is deduced): int l; | - |
5203 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
5204 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
5205 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
5206 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
5207 | } else { | 0 |
5208 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
5209 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
5210 | } | 0 |
5211 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
5212 | | - |
5213 | while (b < end) { | 0 |
5214 | const qreal iw = w == 0 ? 1 : 1 / w; | 0 |
5215 | const qreal tx = x * iw; never executed (the execution status of this line is deduced): const qreal tx = x * iw; | - |
5216 | const qreal ty = y * iw; never executed (the execution status of this line is deduced): const qreal ty = y * iw; | - |
5217 | | - |
5218 | int px = int(tx) - (tx < 0); never executed (the execution status of this line is deduced): int px = int(tx) - (tx < 0); | - |
5219 | int py = int(ty) - (ty < 0); never executed (the execution status of this line is deduced): int py = int(ty) - (ty < 0); | - |
5220 | | - |
5221 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
5222 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
5223 | if (px < 0) | 0 |
5224 | px += image_width; never executed: px += image_width; | 0 |
5225 | if (py < 0) | 0 |
5226 | py += image_height; never executed: py += image_height; | 0 |
5227 | | - |
5228 | *b = ((quint16 *)data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = ((quint16 *)data->texture.scanLine(py))[px]; | - |
5229 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
5230 | | - |
5231 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
5232 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
5233 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
5234 | // force increment to avoid /0 | - |
5235 | if (!w) | 0 |
5236 | w += fdw; never executed: w += fdw; | 0 |
5237 | } | 0 |
5238 | | - |
5239 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
5240 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
5241 | | - |
5242 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
5243 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
5244 | } | 0 |
5245 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5246 | } | 0 |
5247 | } | 0 |
5248 | } | - |
5249 | | - |
5250 | | - |
5251 | /* Image formats here are target formats */ | - |
5252 | static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats] = { | - |
5253 | // Untransformed | - |
5254 | { | - |
5255 | 0, // Invalid | - |
5256 | blend_untransformed_generic, // Mono | - |
5257 | blend_untransformed_generic, // MonoLsb | - |
5258 | blend_untransformed_generic, // Indexed8 | - |
5259 | blend_untransformed_generic, // RGB32 | - |
5260 | blend_untransformed_generic, // ARGB32 | - |
5261 | blend_untransformed_argb, // ARGB32_Premultiplied | - |
5262 | blend_untransformed_rgb565, | - |
5263 | blend_untransformed_generic, | - |
5264 | blend_untransformed_generic, | - |
5265 | blend_untransformed_generic, | - |
5266 | blend_untransformed_generic, | - |
5267 | blend_untransformed_generic, | - |
5268 | blend_untransformed_generic, | - |
5269 | blend_untransformed_generic, | - |
5270 | blend_untransformed_generic, | - |
5271 | }, | - |
5272 | // Tiled | - |
5273 | { | - |
5274 | 0, // Invalid | - |
5275 | blend_tiled_generic, // Mono | - |
5276 | blend_tiled_generic, // MonoLsb | - |
5277 | blend_tiled_generic, // Indexed8 | - |
5278 | blend_tiled_generic, // RGB32 | - |
5279 | blend_tiled_generic, // ARGB32 | - |
5280 | blend_tiled_argb, // ARGB32_Premultiplied | - |
5281 | blend_tiled_rgb565, | - |
5282 | blend_tiled_generic, | - |
5283 | blend_tiled_generic, | - |
5284 | blend_tiled_generic, | - |
5285 | blend_tiled_generic, | - |
5286 | blend_tiled_generic, | - |
5287 | blend_tiled_generic, | - |
5288 | blend_tiled_generic, | - |
5289 | blend_tiled_generic, | - |
5290 | }, | - |
5291 | // Transformed | - |
5292 | { | - |
5293 | 0, // Invalid | - |
5294 | blend_src_generic, // Mono | - |
5295 | blend_src_generic, // MonoLsb | - |
5296 | blend_src_generic, // Indexed8 | - |
5297 | blend_src_generic, // RGB32 | - |
5298 | blend_src_generic, // ARGB32 | - |
5299 | blend_transformed_argb, // ARGB32_Premultiplied | - |
5300 | blend_transformed_rgb565, | - |
5301 | blend_src_generic, | - |
5302 | blend_src_generic, | - |
5303 | blend_src_generic, | - |
5304 | blend_src_generic, | - |
5305 | blend_src_generic, | - |
5306 | blend_src_generic, | - |
5307 | blend_src_generic, | - |
5308 | blend_src_generic, | - |
5309 | }, | - |
5310 | // TransformedTiled | - |
5311 | { | - |
5312 | 0, | - |
5313 | blend_src_generic, // Mono | - |
5314 | blend_src_generic, // MonoLsb | - |
5315 | blend_src_generic, // Indexed8 | - |
5316 | blend_src_generic, // RGB32 | - |
5317 | blend_src_generic, // ARGB32 | - |
5318 | blend_transformed_tiled_argb, // ARGB32_Premultiplied | - |
5319 | blend_transformed_tiled_rgb565, | - |
5320 | blend_src_generic, | - |
5321 | blend_src_generic, | - |
5322 | blend_src_generic, | - |
5323 | blend_src_generic, | - |
5324 | blend_src_generic, | - |
5325 | blend_src_generic, | - |
5326 | blend_src_generic, | - |
5327 | blend_src_generic | - |
5328 | }, | - |
5329 | // Bilinear | - |
5330 | { | - |
5331 | 0, | - |
5332 | blend_src_generic, // Mono | - |
5333 | blend_src_generic, // MonoLsb | - |
5334 | blend_src_generic, // Indexed8 | - |
5335 | blend_src_generic, // RGB32 | - |
5336 | blend_src_generic, // ARGB32 | - |
5337 | blend_src_generic, // ARGB32_Premultiplied | - |
5338 | blend_transformed_bilinear_rgb565, | - |
5339 | blend_src_generic, | - |
5340 | blend_src_generic, | - |
5341 | blend_src_generic, | - |
5342 | blend_src_generic, | - |
5343 | blend_src_generic, | - |
5344 | blend_src_generic, | - |
5345 | blend_src_generic, | - |
5346 | blend_src_generic, | - |
5347 | }, | - |
5348 | // BilinearTiled | - |
5349 | { | - |
5350 | 0, | - |
5351 | blend_src_generic, // Mono | - |
5352 | blend_src_generic, // MonoLsb | - |
5353 | blend_src_generic, // Indexed8 | - |
5354 | blend_src_generic, // RGB32 | - |
5355 | blend_src_generic, // ARGB32 | - |
5356 | blend_src_generic, // ARGB32_Premultiplied | - |
5357 | blend_src_generic, // RGB16 | - |
5358 | blend_src_generic, // ARGB8565_Premultiplied | - |
5359 | blend_src_generic, // RGB666 | - |
5360 | blend_src_generic, // ARGB6666_Premultiplied | - |
5361 | blend_src_generic, // RGB555 | - |
5362 | blend_src_generic, // ARGB8555_Premultiplied | - |
5363 | blend_src_generic, // RGB888 | - |
5364 | blend_src_generic, // RGB444 | - |
5365 | blend_src_generic, // ARGB4444_Premultiplied | - |
5366 | } | - |
5367 | }; | - |
5368 | | - |
5369 | void qBlendTexture(int count, const QSpan *spans, void *userData) | - |
5370 | { | - |
5371 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
5372 | ProcessSpans proc = processTextureSpans[getBlendType(data)][data->rasterBuffer->format]; executed (the execution status of this line is deduced): ProcessSpans proc = processTextureSpans[getBlendType(data)][data->rasterBuffer->format]; | - |
5373 | proc(count, spans, userData); executed (the execution status of this line is deduced): proc(count, spans, userData); | - |
5374 | } executed: } Execution Count:18866 | 18866 |
5375 | | - |
5376 | template <class DST> | - |
5377 | inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer, | - |
5378 | int x, int y, DST color, | - |
5379 | const uchar *map, | - |
5380 | int mapWidth, int mapHeight, int mapStride) | - |
5381 | { | - |
5382 | DST *dest = reinterpret_cast<DST *>(rasterBuffer->scanLine(y)) + x; never executed (the execution status of this line is deduced): DST *dest = reinterpret_cast<DST *>(rasterBuffer->scanLine(y)) + x; | - |
5383 | const int destStride = rasterBuffer->bytesPerLine() / sizeof(DST); never executed (the execution status of this line is deduced): const int destStride = rasterBuffer->bytesPerLine() / sizeof(DST); | - |
5384 | | - |
5385 | if (mapWidth > 8) { never evaluated: mapWidth > 8 | 0 |
5386 | while (mapHeight--) { never evaluated: mapHeight-- | 0 |
5387 | int x0 = 0; never executed (the execution status of this line is deduced): int x0 = 0; | - |
5388 | int n = 0; never executed (the execution status of this line is deduced): int n = 0; | - |
5389 | for (int x = 0; x < mapWidth; x += 8) { never evaluated: x < mapWidth | 0 |
5390 | uchar s = map[x >> 3]; never executed (the execution status of this line is deduced): uchar s = map[x >> 3]; | - |
5391 | for (int i = 0; i < 8; ++i) { | 0 |
5392 | if (s & 0x80) { never evaluated: s & 0x80 | 0 |
5393 | ++n; never executed (the execution status of this line is deduced): ++n; | - |
5394 | } else { | 0 |
5395 | if (n) { | 0 |
5396 | qt_memfill(dest + x0, color, n); never executed (the execution status of this line is deduced): qt_memfill(dest + x0, color, n); | - |
5397 | x0 += n + 1; never executed (the execution status of this line is deduced): x0 += n + 1; | - |
5398 | n = 0; never executed (the execution status of this line is deduced): n = 0; | - |
5399 | } else { | 0 |
5400 | ++x0; never executed (the execution status of this line is deduced): ++x0; | - |
5401 | } | 0 |
5402 | if (!s) { | 0 |
5403 | x0 += 8 - 1 - i; never executed (the execution status of this line is deduced): x0 += 8 - 1 - i; | - |
5404 | break; | 0 |
5405 | } | - |
5406 | } | 0 |
5407 | s <<= 1; never executed (the execution status of this line is deduced): s <<= 1; | - |
5408 | } | 0 |
5409 | } | 0 |
5410 | if (n) | 0 |
5411 | qt_memfill(dest + x0, color, n); never executed: qt_memfill(dest + x0, color, n); | 0 |
5412 | dest += destStride; never executed (the execution status of this line is deduced): dest += destStride; | - |
5413 | map += mapStride; never executed (the execution status of this line is deduced): map += mapStride; | - |
5414 | } | 0 |
5415 | } else { | 0 |
5416 | while (mapHeight--) { never evaluated: mapHeight-- | 0 |
5417 | int x0 = 0; never executed (the execution status of this line is deduced): int x0 = 0; | - |
5418 | int n = 0; never executed (the execution status of this line is deduced): int n = 0; | - |
5419 | for (uchar s = *map; s; s <<= 1) { | 0 |
5420 | if (s & 0x80) { never evaluated: s & 0x80 | 0 |
5421 | ++n; never executed (the execution status of this line is deduced): ++n; | - |
5422 | } else if (n) { never executed: } never evaluated: n | 0 |
5423 | qt_memfill(dest + x0, color, n); never executed (the execution status of this line is deduced): qt_memfill(dest + x0, color, n); | - |
5424 | x0 += n + 1; never executed (the execution status of this line is deduced): x0 += n + 1; | - |
5425 | n = 0; never executed (the execution status of this line is deduced): n = 0; | - |
5426 | } else { | 0 |
5427 | ++x0; never executed (the execution status of this line is deduced): ++x0; | - |
5428 | } | 0 |
5429 | } | - |
5430 | if (n) | 0 |
5431 | qt_memfill(dest + x0, color, n); never executed: qt_memfill(dest + x0, color, n); | 0 |
5432 | dest += destStride; never executed (the execution status of this line is deduced): dest += destStride; | - |
5433 | map += mapStride; never executed (the execution status of this line is deduced): map += mapStride; | - |
5434 | } | 0 |
5435 | } | 0 |
5436 | } | - |
5437 | | - |
5438 | static void qt_gradient_quint32(int count, const QSpan *spans, void *userData) | - |
5439 | { | - |
5440 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
5441 | | - |
5442 | bool isVerticalGradient = executed (the execution status of this line is deduced): bool isVerticalGradient = | - |
5443 | data->txop <= QTransform::TxScale && partially evaluated: data->txop <= QTransform::TxScale yes Evaluation Count:16099 | no Evaluation Count:0 |
| 0-16099 |
5444 | data->type == QSpanData::LinearGradient && evaluated: data->type == QSpanData::LinearGradient yes Evaluation Count:16085 | yes Evaluation Count:17 |
| 17-16085 |
5445 | data->gradient.linear.end.x == data->gradient.linear.origin.x; evaluated: data->gradient.linear.end.x == data->gradient.linear.origin.x yes Evaluation Count:32 | yes Evaluation Count:16054 |
| 32-16054 |
5446 | | - |
5447 | if (isVerticalGradient) { evaluated: isVerticalGradient yes Evaluation Count:32 | yes Evaluation Count:16071 |
| 32-16071 |
5448 | LinearGradientValues linear; executed (the execution status of this line is deduced): LinearGradientValues linear; | - |
5449 | getLinearGradientValues(&linear, data); executed (the execution status of this line is deduced): getLinearGradientValues(&linear, data); | - |
5450 | | - |
5451 | CompositionFunctionSolid funcSolid = executed (the execution status of this line is deduced): CompositionFunctionSolid funcSolid = | - |
5452 | functionForModeSolid[data->rasterBuffer->compositionMode]; executed (the execution status of this line is deduced): functionForModeSolid[data->rasterBuffer->compositionMode]; | - |
5453 | | - |
5454 | /* | - |
5455 | The logic for vertical gradient calculations is a mathematically | - |
5456 | reduced copy of that in fetchLinearGradient() - which is basically: | - |
5457 | | - |
5458 | qreal ry = data->m22 * (y + 0.5) + data->dy; | - |
5459 | qreal t = linear.dy*ry + linear.off; | - |
5460 | t *= (GRADIENT_STOPTABLE_SIZE - 1); | - |
5461 | quint32 color = | - |
5462 | qt_gradient_pixel_fixed(&data->gradient, | - |
5463 | int(t * FIXPT_SIZE)); | - |
5464 | | - |
5465 | This has then been converted to fixed point to improve performance. | - |
5466 | */ | - |
5467 | const int gss = GRADIENT_STOPTABLE_SIZE - 1; executed (the execution status of this line is deduced): const int gss = 1024 - 1; | - |
5468 | int yinc = int((linear.dy * data->m22 * gss) * FIXPT_SIZE); executed (the execution status of this line is deduced): int yinc = int((linear.dy * data->m22 * gss) * (1<<8)); | - |
5469 | int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * FIXPT_SIZE)); executed (the execution status of this line is deduced): int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * (1<<8))); | - |
5470 | | - |
5471 | while (count--) { evaluated: count-- yes Evaluation Count:4109 | yes Evaluation Count:32 |
| 32-4109 |
5472 | int y = spans->y; executed (the execution status of this line is deduced): int y = spans->y; | - |
5473 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
5474 | | - |
5475 | quint32 *dst = (quint32 *)(data->rasterBuffer->scanLine(y)) + x; executed (the execution status of this line is deduced): quint32 *dst = (quint32 *)(data->rasterBuffer->scanLine(y)) + x; | - |
5476 | quint32 color = executed (the execution status of this line is deduced): quint32 color = | - |
5477 | qt_gradient_pixel_fixed(&data->gradient, yinc * y + off); executed (the execution status of this line is deduced): qt_gradient_pixel_fixed(&data->gradient, yinc * y + off); | - |
5478 | | - |
5479 | funcSolid(dst, spans->len, color, spans->coverage); executed (the execution status of this line is deduced): funcSolid(dst, spans->len, color, spans->coverage); | - |
5480 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
5481 | } executed: } Execution Count:4109 | 4109 |
5482 | | - |
5483 | } else { executed: } Execution Count:32 | 32 |
5484 | blend_src_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
5485 | } executed: } Execution Count:16063 | 16063 |
5486 | } | - |
5487 | | - |
5488 | static void qt_gradient_quint16(int count, const QSpan *spans, void *userData) | - |
5489 | { | - |
5490 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
5491 | | - |
5492 | bool isVerticalGradient = executed (the execution status of this line is deduced): bool isVerticalGradient = | - |
5493 | data->txop <= QTransform::TxScale && partially evaluated: data->txop <= QTransform::TxScale yes Evaluation Count:1463 | no Evaluation Count:0 |
| 0-1463 |
5494 | data->type == QSpanData::LinearGradient && evaluated: data->type == QSpanData::LinearGradient yes Evaluation Count:961 | yes Evaluation Count:502 |
| 502-961 |
5495 | data->gradient.linear.end.x == data->gradient.linear.origin.x; evaluated: data->gradient.linear.end.x == data->gradient.linear.origin.x yes Evaluation Count:468 | yes Evaluation Count:493 |
| 468-493 |
5496 | | - |
5497 | if (isVerticalGradient) { evaluated: isVerticalGradient yes Evaluation Count:468 | yes Evaluation Count:995 |
| 468-995 |
5498 | | - |
5499 | LinearGradientValues linear; executed (the execution status of this line is deduced): LinearGradientValues linear; | - |
5500 | getLinearGradientValues(&linear, data); executed (the execution status of this line is deduced): getLinearGradientValues(&linear, data); | - |
5501 | | - |
5502 | /* | - |
5503 | The logic for vertical gradient calculations is a mathematically | - |
5504 | reduced copy of that in fetchLinearGradient() - which is basically: | - |
5505 | | - |
5506 | qreal ry = data->m22 * (y + 0.5) + data->dy; | - |
5507 | qreal t = linear.dy*ry + linear.off; | - |
5508 | t *= (GRADIENT_STOPTABLE_SIZE - 1); | - |
5509 | quint32 color = | - |
5510 | qt_gradient_pixel_fixed(&data->gradient, | - |
5511 | int(t * FIXPT_SIZE)); | - |
5512 | | - |
5513 | This has then been converted to fixed point to improve performance. | - |
5514 | */ | - |
5515 | const int gss = GRADIENT_STOPTABLE_SIZE - 1; executed (the execution status of this line is deduced): const int gss = 1024 - 1; | - |
5516 | int yinc = int((linear.dy * data->m22 * gss) * FIXPT_SIZE); executed (the execution status of this line is deduced): int yinc = int((linear.dy * data->m22 * gss) * (1<<8)); | - |
5517 | int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * FIXPT_SIZE)); executed (the execution status of this line is deduced): int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * (1<<8))); | - |
5518 | | - |
5519 | uint oldColor = data->solid.color; executed (the execution status of this line is deduced): uint oldColor = data->solid.color; | - |
5520 | while (count--) { evaluated: count-- yes Evaluation Count:5226 | yes Evaluation Count:468 |
| 468-5226 |
5521 | int y = spans->y; executed (the execution status of this line is deduced): int y = spans->y; | - |
5522 | | - |
5523 | quint32 color = qt_gradient_pixel_fixed(&data->gradient, yinc * y + off); executed (the execution status of this line is deduced): quint32 color = qt_gradient_pixel_fixed(&data->gradient, yinc * y + off); | - |
5524 | | - |
5525 | data->solid.color = color; executed (the execution status of this line is deduced): data->solid.color = color; | - |
5526 | blend_color_rgb16(1, spans, userData); executed (the execution status of this line is deduced): blend_color_rgb16(1, spans, userData); | - |
5527 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
5528 | } executed: } Execution Count:5226 | 5226 |
5529 | data->solid.color = oldColor; executed (the execution status of this line is deduced): data->solid.color = oldColor; | - |
5530 | | - |
5531 | } else { executed: } Execution Count:468 | 468 |
5532 | blend_src_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
5533 | } executed: } Execution Count:995 | 995 |
5534 | } | - |
5535 | | - |
5536 | inline static void qt_bitmapblit_quint32(QRasterBuffer *rasterBuffer, | - |
5537 | int x, int y, quint32 color, | - |
5538 | const uchar *map, | - |
5539 | int mapWidth, int mapHeight, int mapStride) | - |
5540 | { | - |
5541 | qt_bitmapblit_template<quint32>(rasterBuffer, x, y, color, never executed (the execution status of this line is deduced): qt_bitmapblit_template<quint32>(rasterBuffer, x, y, color, | - |
5542 | map, mapWidth, mapHeight, mapStride); never executed (the execution status of this line is deduced): map, mapWidth, mapHeight, mapStride); | - |
5543 | } | 0 |
5544 | | - |
5545 | inline static void qt_bitmapblit_quint16(QRasterBuffer *rasterBuffer, | - |
5546 | int x, int y, quint32 color, | - |
5547 | const uchar *map, | - |
5548 | int mapWidth, int mapHeight, int mapStride) | - |
5549 | { | - |
5550 | qt_bitmapblit_template<quint16>(rasterBuffer, x, y, qConvertRgb32To16(color), never executed (the execution status of this line is deduced): qt_bitmapblit_template<quint16>(rasterBuffer, x, y, qConvertRgb32To16(color), | - |
5551 | map, mapWidth, mapHeight, mapStride); never executed (the execution status of this line is deduced): map, mapWidth, mapHeight, mapStride); | - |
5552 | } | 0 |
5553 | | - |
5554 | static void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer, | - |
5555 | int x, int y, quint32 color, | - |
5556 | const uchar *map, | - |
5557 | int mapWidth, int mapHeight, int mapStride, | - |
5558 | const QClipData *) | - |
5559 | { | - |
5560 | const quint16 c = qConvertRgb32To16(color); executed (the execution status of this line is deduced): const quint16 c = qConvertRgb32To16(color); | - |
5561 | quint16 *dest = reinterpret_cast<quint16*>(rasterBuffer->scanLine(y)) + x; executed (the execution status of this line is deduced): quint16 *dest = reinterpret_cast<quint16*>(rasterBuffer->scanLine(y)) + x; | - |
5562 | const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16); executed (the execution status of this line is deduced): const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16); | - |
5563 | | - |
5564 | while (mapHeight--) { evaluated: mapHeight-- yes Evaluation Count:892486 | yes Evaluation Count:94275 |
| 94275-892486 |
5565 | for (int i = 0; i < mapWidth; ++i) { evaluated: i < mapWidth yes Evaluation Count:5449469 | yes Evaluation Count:892486 |
| 892486-5449469 |
5566 | const int coverage = map[i]; executed (the execution status of this line is deduced): const int coverage = map[i]; | - |
5567 | | - |
5568 | if (coverage == 0) { evaluated: coverage == 0 yes Evaluation Count:1885208 | yes Evaluation Count:3564261 |
| 1885208-3564261 |
5569 | // nothing | - |
5570 | } else if (coverage == 255) { executed: } Execution Count:1885208 evaluated: coverage == 255 yes Evaluation Count:115759 | yes Evaluation Count:3448502 |
| 115759-3448502 |
5571 | dest[i] = c; executed (the execution status of this line is deduced): dest[i] = c; | - |
5572 | } else { executed: } Execution Count:115759 | 115759 |
5573 | int ialpha = 255 - coverage; executed (the execution status of this line is deduced): int ialpha = 255 - coverage; | - |
5574 | dest[i] = BYTE_MUL_RGB16(c, coverage) executed (the execution status of this line is deduced): dest[i] = BYTE_MUL_RGB16(c, coverage) | - |
5575 | + BYTE_MUL_RGB16(dest[i], ialpha); executed (the execution status of this line is deduced): + BYTE_MUL_RGB16(dest[i], ialpha); | - |
5576 | } executed: } Execution Count:3448502 | 3448502 |
5577 | } | - |
5578 | dest += destStride; executed (the execution status of this line is deduced): dest += destStride; | - |
5579 | map += mapStride; executed (the execution status of this line is deduced): map += mapStride; | - |
5580 | } executed: } Execution Count:892486 | 892486 |
5581 | } executed: } Execution Count:94275 | 94275 |
5582 | | - |
5583 | static inline void rgbBlendPixel(quint32 *dst, int coverage, int sr, int sg, int sb, const uchar *gamma, const uchar *invgamma) | - |
5584 | { | - |
5585 | // Do a gray alphablend... | - |
5586 | int da = qAlpha(*dst); never executed (the execution status of this line is deduced): int da = qAlpha(*dst); | - |
5587 | int dr = qRed(*dst); never executed (the execution status of this line is deduced): int dr = qRed(*dst); | - |
5588 | int dg = qGreen(*dst); never executed (the execution status of this line is deduced): int dg = qGreen(*dst); | - |
5589 | int db = qBlue(*dst); never executed (the execution status of this line is deduced): int db = qBlue(*dst); | - |
5590 | | - |
5591 | if (da != 255 never evaluated: da != 255 | 0 |
5592 | ) { | - |
5593 | | - |
5594 | int a = qGray(coverage); never executed (the execution status of this line is deduced): int a = qGray(coverage); | - |
5595 | sr = qt_div_255(invgamma[sr] * a); never executed (the execution status of this line is deduced): sr = qt_div_255(invgamma[sr] * a); | - |
5596 | sg = qt_div_255(invgamma[sg] * a); never executed (the execution status of this line is deduced): sg = qt_div_255(invgamma[sg] * a); | - |
5597 | sb = qt_div_255(invgamma[sb] * a); never executed (the execution status of this line is deduced): sb = qt_div_255(invgamma[sb] * a); | - |
5598 | | - |
5599 | int ia = 255 - a; never executed (the execution status of this line is deduced): int ia = 255 - a; | - |
5600 | dr = qt_div_255(dr * ia); never executed (the execution status of this line is deduced): dr = qt_div_255(dr * ia); | - |
5601 | dg = qt_div_255(dg * ia); never executed (the execution status of this line is deduced): dg = qt_div_255(dg * ia); | - |
5602 | db = qt_div_255(db * ia); never executed (the execution status of this line is deduced): db = qt_div_255(db * ia); | - |
5603 | | - |
5604 | *dst = ((a + qt_div_255((255 - a) * da)) << 24) never executed (the execution status of this line is deduced): *dst = ((a + qt_div_255((255 - a) * da)) << 24) | - |
5605 | | ((sr + dr) << 16) never executed (the execution status of this line is deduced): | ((sr + dr) << 16) | - |
5606 | | ((sg + dg) << 8) never executed (the execution status of this line is deduced): | ((sg + dg) << 8) | - |
5607 | | ((sb + db)); never executed (the execution status of this line is deduced): | ((sb + db)); | - |
5608 | return; | 0 |
5609 | } | - |
5610 | | - |
5611 | int mr = qRed(coverage); never executed (the execution status of this line is deduced): int mr = qRed(coverage); | - |
5612 | int mg = qGreen(coverage); never executed (the execution status of this line is deduced): int mg = qGreen(coverage); | - |
5613 | int mb = qBlue(coverage); never executed (the execution status of this line is deduced): int mb = qBlue(coverage); | - |
5614 | | - |
5615 | dr = gamma[dr]; never executed (the execution status of this line is deduced): dr = gamma[dr]; | - |
5616 | dg = gamma[dg]; never executed (the execution status of this line is deduced): dg = gamma[dg]; | - |
5617 | db = gamma[db]; never executed (the execution status of this line is deduced): db = gamma[db]; | - |
5618 | | - |
5619 | int nr = qt_div_255((sr - dr) * mr) + dr; never executed (the execution status of this line is deduced): int nr = qt_div_255((sr - dr) * mr) + dr; | - |
5620 | int ng = qt_div_255((sg - dg) * mg) + dg; never executed (the execution status of this line is deduced): int ng = qt_div_255((sg - dg) * mg) + dg; | - |
5621 | int nb = qt_div_255((sb - db) * mb) + db; never executed (the execution status of this line is deduced): int nb = qt_div_255((sb - db) * mb) + db; | - |
5622 | | - |
5623 | nr = invgamma[nr]; never executed (the execution status of this line is deduced): nr = invgamma[nr]; | - |
5624 | ng = invgamma[ng]; never executed (the execution status of this line is deduced): ng = invgamma[ng]; | - |
5625 | nb = invgamma[nb]; never executed (the execution status of this line is deduced): nb = invgamma[nb]; | - |
5626 | | - |
5627 | *dst = qRgb(nr, ng, nb); never executed (the execution status of this line is deduced): *dst = qRgb(nr, ng, nb); | - |
5628 | } | 0 |
5629 | | - |
5630 | #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) | - |
5631 | static inline void grayBlendPixel(quint32 *dst, int coverage, int sr, int sg, int sb, const uint *gamma, const uchar *invgamma) | - |
5632 | { | - |
5633 | // Do a gammacorrected gray alphablend... | - |
5634 | int dr = qRed(*dst); | - |
5635 | int dg = qGreen(*dst); | - |
5636 | int db = qBlue(*dst); | - |
5637 | | - |
5638 | dr = gamma[dr]; | - |
5639 | dg = gamma[dg]; | - |
5640 | db = gamma[db]; | - |
5641 | | - |
5642 | int alpha = coverage; | - |
5643 | int ialpha = 255 - alpha; | - |
5644 | int nr = (sr * alpha + ialpha * dr) / 255; | - |
5645 | int ng = (sg * alpha + ialpha * dg) / 255; | - |
5646 | int nb = (sb * alpha + ialpha * db) / 255; | - |
5647 | | - |
5648 | nr = invgamma[nr]; | - |
5649 | ng = invgamma[ng]; | - |
5650 | nb = invgamma[nb]; | - |
5651 | | - |
5652 | *dst = qRgb(nr, ng, nb); | - |
5653 | } | - |
5654 | #endif | - |
5655 | | - |
5656 | static void qt_alphamapblit_quint32(QRasterBuffer *rasterBuffer, | - |
5657 | int x, int y, quint32 color, | - |
5658 | const uchar *map, | - |
5659 | int mapWidth, int mapHeight, int mapStride, | - |
5660 | const QClipData *clip) | - |
5661 | { | - |
5662 | const quint32 c = color; executed (the execution status of this line is deduced): const quint32 c = color; | - |
5663 | const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); executed (the execution status of this line is deduced): const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); | - |
5664 | | - |
5665 | #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) | - |
5666 | const QDrawHelperGammaTables *tables = QGuiApplicationPrivate::instance()->gammaTables(); | - |
5667 | if (!tables) | - |
5668 | return; | - |
5669 | | - |
5670 | const uint *gamma = tables->qt_pow_gamma; | - |
5671 | const uchar *invgamma = tables->qt_pow_invgamma; | - |
5672 | | - |
5673 | int sr = gamma[qRed(color)]; | - |
5674 | int sg = gamma[qGreen(color)]; | - |
5675 | int sb = gamma[qBlue(color)]; | - |
5676 | | - |
5677 | bool opaque_src = (qAlpha(color) == 255); | - |
5678 | #endif | - |
5679 | | - |
5680 | if (!clip) { evaluated: !clip yes Evaluation Count:6843 | yes Evaluation Count:513 |
| 513-6843 |
5681 | quint32 *dest = reinterpret_cast<quint32*>(rasterBuffer->scanLine(y)) + x; executed (the execution status of this line is deduced): quint32 *dest = reinterpret_cast<quint32*>(rasterBuffer->scanLine(y)) + x; | - |
5682 | while (mapHeight--) { evaluated: mapHeight-- yes Evaluation Count:56452 | yes Evaluation Count:6843 |
| 6843-56452 |
5683 | for (int i = 0; i < mapWidth; ++i) { evaluated: i < mapWidth yes Evaluation Count:277335 | yes Evaluation Count:56452 |
| 56452-277335 |
5684 | const int coverage = map[i]; executed (the execution status of this line is deduced): const int coverage = map[i]; | - |
5685 | | - |
5686 | if (coverage == 0) { evaluated: coverage == 0 yes Evaluation Count:91959 | yes Evaluation Count:185376 |
| 91959-185376 |
5687 | // nothing | - |
5688 | } else if (coverage == 255) { executed: } Execution Count:91959 evaluated: coverage == 255 yes Evaluation Count:17448 | yes Evaluation Count:167928 |
| 17448-167928 |
5689 | dest[i] = c; executed (the execution status of this line is deduced): dest[i] = c; | - |
5690 | } else { executed: } Execution Count:17448 | 17448 |
5691 | #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) | - |
5692 | if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && opaque_src | - |
5693 | && qAlpha(dest[i]) == 255) { | - |
5694 | grayBlendPixel(dest+i, coverage, sr, sg, sb, gamma, invgamma); | - |
5695 | } else | - |
5696 | #endif | - |
5697 | { | - |
5698 | int ialpha = 255 - coverage; executed (the execution status of this line is deduced): int ialpha = 255 - coverage; | - |
5699 | dest[i] = INTERPOLATE_PIXEL_255(c, coverage, dest[i], ialpha); executed (the execution status of this line is deduced): dest[i] = INTERPOLATE_PIXEL_255(c, coverage, dest[i], ialpha); | - |
5700 | } | - |
5701 | } executed: } Execution Count:167928 | 167928 |
5702 | } | - |
5703 | dest += destStride; executed (the execution status of this line is deduced): dest += destStride; | - |
5704 | map += mapStride; executed (the execution status of this line is deduced): map += mapStride; | - |
5705 | } executed: } Execution Count:56452 | 56452 |
5706 | } else { executed: } Execution Count:6843 | 6843 |
5707 | int bottom = qMin(y + mapHeight, rasterBuffer->height()); executed (the execution status of this line is deduced): int bottom = qMin(y + mapHeight, rasterBuffer->height()); | - |
5708 | | - |
5709 | int top = qMax(y, 0); executed (the execution status of this line is deduced): int top = qMax(y, 0); | - |
5710 | map += (top - y) * mapStride; executed (the execution status of this line is deduced): map += (top - y) * mapStride; | - |
5711 | | - |
5712 | const_cast<QClipData *>(clip)->initialize(); executed (the execution status of this line is deduced): const_cast<QClipData *>(clip)->initialize(); | - |
5713 | for (int yp = top; yp<bottom; ++yp) { evaluated: yp<bottom yes Evaluation Count:4872 | yes Evaluation Count:513 |
| 513-4872 |
5714 | const QClipData::ClipLine &line = clip->m_clipLines[yp]; executed (the execution status of this line is deduced): const QClipData::ClipLine &line = clip->m_clipLines[yp]; | - |
5715 | | - |
5716 | quint32 *dest = reinterpret_cast<quint32 *>(rasterBuffer->scanLine(yp)); executed (the execution status of this line is deduced): quint32 *dest = reinterpret_cast<quint32 *>(rasterBuffer->scanLine(yp)); | - |
5717 | | - |
5718 | for (int i=0; i<line.count; ++i) { evaluated: i<line.count yes Evaluation Count:4872 | yes Evaluation Count:4872 |
| 4872 |
5719 | const QSpan &clip = line.spans[i]; executed (the execution status of this line is deduced): const QSpan &clip = line.spans[i]; | - |
5720 | | - |
5721 | int start = qMax<int>(x, clip.x); executed (the execution status of this line is deduced): int start = qMax<int>(x, clip.x); | - |
5722 | int end = qMin<int>(x + mapWidth, clip.x + clip.len); executed (the execution status of this line is deduced): int end = qMin<int>(x + mapWidth, clip.x + clip.len); | - |
5723 | | - |
5724 | for (int xp=start; xp<end; ++xp) { evaluated: xp<end yes Evaluation Count:18364 | yes Evaluation Count:4872 |
| 4872-18364 |
5725 | const int coverage = map[xp - x]; executed (the execution status of this line is deduced): const int coverage = map[xp - x]; | - |
5726 | | - |
5727 | if (coverage == 0) { evaluated: coverage == 0 yes Evaluation Count:7288 | yes Evaluation Count:11076 |
| 7288-11076 |
5728 | // nothing | - |
5729 | } else if (coverage == 255) { executed: } Execution Count:7288 evaluated: coverage == 255 yes Evaluation Count:1190 | yes Evaluation Count:9886 |
| 1190-9886 |
5730 | dest[xp] = c; executed (the execution status of this line is deduced): dest[xp] = c; | - |
5731 | } else { executed: } Execution Count:1190 | 1190 |
5732 | #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) | - |
5733 | if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && opaque_src | - |
5734 | && qAlpha(dest[xp]) == 255) { | - |
5735 | grayBlendPixel(dest+xp, coverage, sr, sg, sb, gamma, invgamma); | - |
5736 | } else | - |
5737 | #endif | - |
5738 | { | - |
5739 | int ialpha = 255 - coverage; executed (the execution status of this line is deduced): int ialpha = 255 - coverage; | - |
5740 | dest[xp] = INTERPOLATE_PIXEL_255(c, coverage, dest[xp], ialpha); executed (the execution status of this line is deduced): dest[xp] = INTERPOLATE_PIXEL_255(c, coverage, dest[xp], ialpha); | - |
5741 | } | - |
5742 | } executed: } Execution Count:9886 | 9886 |
5743 | | - |
5744 | } // for (i -> line.count) | - |
5745 | } // for (yp -> bottom) executed: } Execution Count:4872 | 4872 |
5746 | map += mapStride; executed (the execution status of this line is deduced): map += mapStride; | - |
5747 | } executed: } Execution Count:4872 | 4872 |
5748 | } executed: } Execution Count:513 | 513 |
5749 | } | - |
5750 | | - |
5751 | static void qt_alphargbblit_quint32(QRasterBuffer *rasterBuffer, | - |
5752 | int x, int y, quint32 color, | - |
5753 | const uint *src, int mapWidth, int mapHeight, int srcStride, | - |
5754 | const QClipData *clip) | - |
5755 | { | - |
5756 | const quint32 c = color; never executed (the execution status of this line is deduced): const quint32 c = color; | - |
5757 | | - |
5758 | int sr = qRed(color); never executed (the execution status of this line is deduced): int sr = qRed(color); | - |
5759 | int sg = qGreen(color); never executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
5760 | int sb = qBlue(color); never executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
5761 | int sa = qAlpha(color); never executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
5762 | | - |
5763 | const QDrawHelperGammaTables *tables = QGuiApplicationPrivate::instance()->gammaTables(); never executed (the execution status of this line is deduced): const QDrawHelperGammaTables *tables = QGuiApplicationPrivate::instance()->gammaTables(); | - |
5764 | if (!tables) | 0 |
5765 | return; | 0 |
5766 | | - |
5767 | const uchar *gamma = tables->qt_pow_rgb_gamma; never executed (the execution status of this line is deduced): const uchar *gamma = tables->qt_pow_rgb_gamma; | - |
5768 | const uchar *invgamma = tables->qt_pow_rgb_invgamma; never executed (the execution status of this line is deduced): const uchar *invgamma = tables->qt_pow_rgb_invgamma; | - |
5769 | | - |
5770 | sr = gamma[sr]; never executed (the execution status of this line is deduced): sr = gamma[sr]; | - |
5771 | sg = gamma[sg]; never executed (the execution status of this line is deduced): sg = gamma[sg]; | - |
5772 | sb = gamma[sb]; never executed (the execution status of this line is deduced): sb = gamma[sb]; | - |
5773 | | - |
5774 | if (sa == 0) | 0 |
5775 | return; | 0 |
5776 | | - |
5777 | if (!clip) { | 0 |
5778 | quint32 *dst = reinterpret_cast<quint32*>(rasterBuffer->scanLine(y)) + x; never executed (the execution status of this line is deduced): quint32 *dst = reinterpret_cast<quint32*>(rasterBuffer->scanLine(y)) + x; | - |
5779 | const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); never executed (the execution status of this line is deduced): const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); | - |
5780 | while (mapHeight--) { never evaluated: mapHeight-- | 0 |
5781 | for (int i = 0; i < mapWidth; ++i) { never evaluated: i < mapWidth | 0 |
5782 | const uint coverage = src[i]; never executed (the execution status of this line is deduced): const uint coverage = src[i]; | - |
5783 | if (coverage == 0xffffffff) { never evaluated: coverage == 0xffffffff | 0 |
5784 | dst[i] = c; never executed (the execution status of this line is deduced): dst[i] = c; | - |
5785 | } else if (coverage != 0xff000000) { never executed: } never evaluated: coverage != 0xff000000 | 0 |
5786 | rgbBlendPixel(dst+i, coverage, sr, sg, sb, gamma, invgamma); never executed (the execution status of this line is deduced): rgbBlendPixel(dst+i, coverage, sr, sg, sb, gamma, invgamma); | - |
5787 | } | 0 |
5788 | } | - |
5789 | | - |
5790 | dst += destStride; never executed (the execution status of this line is deduced): dst += destStride; | - |
5791 | src += srcStride; never executed (the execution status of this line is deduced): src += srcStride; | - |
5792 | } | 0 |
5793 | } else { | 0 |
5794 | int bottom = qMin(y + mapHeight, rasterBuffer->height()); never executed (the execution status of this line is deduced): int bottom = qMin(y + mapHeight, rasterBuffer->height()); | - |
5795 | | - |
5796 | int top = qMax(y, 0); never executed (the execution status of this line is deduced): int top = qMax(y, 0); | - |
5797 | src += (top - y) * srcStride; never executed (the execution status of this line is deduced): src += (top - y) * srcStride; | - |
5798 | | - |
5799 | const_cast<QClipData *>(clip)->initialize(); never executed (the execution status of this line is deduced): const_cast<QClipData *>(clip)->initialize(); | - |
5800 | for (int yp = top; yp<bottom; ++yp) { never evaluated: yp<bottom | 0 |
5801 | const QClipData::ClipLine &line = clip->m_clipLines[yp]; never executed (the execution status of this line is deduced): const QClipData::ClipLine &line = clip->m_clipLines[yp]; | - |
5802 | | - |
5803 | quint32 *dst = reinterpret_cast<quint32 *>(rasterBuffer->scanLine(yp)); never executed (the execution status of this line is deduced): quint32 *dst = reinterpret_cast<quint32 *>(rasterBuffer->scanLine(yp)); | - |
5804 | | - |
5805 | for (int i=0; i<line.count; ++i) { never evaluated: i<line.count | 0 |
5806 | const QSpan &clip = line.spans[i]; never executed (the execution status of this line is deduced): const QSpan &clip = line.spans[i]; | - |
5807 | | - |
5808 | int start = qMax<int>(x, clip.x); never executed (the execution status of this line is deduced): int start = qMax<int>(x, clip.x); | - |
5809 | int end = qMin<int>(x + mapWidth, clip.x + clip.len); never executed (the execution status of this line is deduced): int end = qMin<int>(x + mapWidth, clip.x + clip.len); | - |
5810 | | - |
5811 | for (int xp=start; xp<end; ++xp) { | 0 |
5812 | const uint coverage = src[xp - x]; never executed (the execution status of this line is deduced): const uint coverage = src[xp - x]; | - |
5813 | if (coverage == 0xffffffff) { never evaluated: coverage == 0xffffffff | 0 |
5814 | dst[xp] = c; never executed (the execution status of this line is deduced): dst[xp] = c; | - |
5815 | } else if (coverage != 0xff000000) { never executed: } never evaluated: coverage != 0xff000000 | 0 |
5816 | rgbBlendPixel(dst+xp, coverage, sr, sg, sb, gamma, invgamma); never executed (the execution status of this line is deduced): rgbBlendPixel(dst+xp, coverage, sr, sg, sb, gamma, invgamma); | - |
5817 | } | 0 |
5818 | } | - |
5819 | } // for (i -> line.count) | 0 |
5820 | src += srcStride; never executed (the execution status of this line is deduced): src += srcStride; | - |
5821 | } // for (yp -> bottom) | 0 |
5822 | | - |
5823 | } | 0 |
5824 | } | - |
5825 | | - |
5826 | static void qt_rectfill_quint32(QRasterBuffer *rasterBuffer, | - |
5827 | int x, int y, int width, int height, | - |
5828 | quint32 color) | - |
5829 | { | - |
5830 | qt_rectfill<quint32>(reinterpret_cast<quint32 *>(rasterBuffer->buffer()), executed (the execution status of this line is deduced): qt_rectfill<quint32>(reinterpret_cast<quint32 *>(rasterBuffer->buffer()), | - |
5831 | color, x, y, width, height, rasterBuffer->bytesPerLine()); executed (the execution status of this line is deduced): color, x, y, width, height, rasterBuffer->bytesPerLine()); | - |
5832 | } executed: } Execution Count:1020 | 1020 |
5833 | | - |
5834 | static void qt_rectfill_quint16(QRasterBuffer *rasterBuffer, | - |
5835 | int x, int y, int width, int height, | - |
5836 | quint32 color) | - |
5837 | { | - |
5838 | qt_rectfill<quint16>(reinterpret_cast<quint16 *>(rasterBuffer->buffer()), executed (the execution status of this line is deduced): qt_rectfill<quint16>(reinterpret_cast<quint16 *>(rasterBuffer->buffer()), | - |
5839 | qConvertRgb32To16(color), x, y, width, height, rasterBuffer->bytesPerLine()); executed (the execution status of this line is deduced): qConvertRgb32To16(color), x, y, width, height, rasterBuffer->bytesPerLine()); | - |
5840 | } executed: } Execution Count:39808 | 39808 |
5841 | | - |
5842 | static void qt_rectfill_nonpremul_quint32(QRasterBuffer *rasterBuffer, | - |
5843 | int x, int y, int width, int height, | - |
5844 | quint32 color) | - |
5845 | { | - |
5846 | qt_rectfill<quint32>(reinterpret_cast<quint32 *>(rasterBuffer->buffer()), executed (the execution status of this line is deduced): qt_rectfill<quint32>(reinterpret_cast<quint32 *>(rasterBuffer->buffer()), | - |
5847 | INV_PREMUL(color), x, y, width, height, rasterBuffer->bytesPerLine()); executed (the execution status of this line is deduced): (qAlpha(color) == 0 ? 0 : ((qAlpha(color) << 24) | (((255*qRed(color))/ qAlpha(color)) << 16) | (((255*qGreen(color)) / qAlpha(color)) << 8) | ((255*qBlue(color)) / qAlpha(color)))), x, y, width, height, rasterBuffer->bytesPerLine()); | - |
5848 | } executed: } Execution Count:201 | 201 |
5849 | | - |
5850 | | - |
5851 | // Map table for destination image format. Contains function pointers | - |
5852 | // for blends of various types unto the destination | - |
5853 | | - |
5854 | DrawHelper qDrawHelper[QImage::NImageFormats] = | - |
5855 | { | - |
5856 | // Format_Invalid, | - |
5857 | { 0, 0, 0, 0, 0, 0 }, | - |
5858 | // Format_Mono, | - |
5859 | { | - |
5860 | blend_color_generic, | - |
5861 | blend_src_generic, | - |
5862 | 0, 0, 0, 0 | - |
5863 | }, | - |
5864 | // Format_MonoLSB, | - |
5865 | { | - |
5866 | blend_color_generic, | - |
5867 | blend_src_generic, | - |
5868 | 0, 0, 0, 0 | - |
5869 | }, | - |
5870 | // Format_Indexed8, | - |
5871 | { | - |
5872 | blend_color_generic, | - |
5873 | blend_src_generic, | - |
5874 | 0, 0, 0, 0 | - |
5875 | }, | - |
5876 | // Format_RGB32, | - |
5877 | { | - |
5878 | blend_color_argb, | - |
5879 | qt_gradient_quint32, | - |
5880 | qt_bitmapblit_quint32, | - |
5881 | qt_alphamapblit_quint32, | - |
5882 | qt_alphargbblit_quint32, | - |
5883 | qt_rectfill_quint32 | - |
5884 | }, | - |
5885 | // Format_ARGB32, | - |
5886 | { | - |
5887 | blend_color_generic, | - |
5888 | qt_gradient_quint32, | - |
5889 | qt_bitmapblit_quint32, | - |
5890 | qt_alphamapblit_quint32, | - |
5891 | qt_alphargbblit_quint32, | - |
5892 | qt_rectfill_nonpremul_quint32 | - |
5893 | }, | - |
5894 | // Format_ARGB32_Premultiplied | - |
5895 | { | - |
5896 | blend_color_argb, | - |
5897 | qt_gradient_quint32, | - |
5898 | qt_bitmapblit_quint32, | - |
5899 | qt_alphamapblit_quint32, | - |
5900 | qt_alphargbblit_quint32, | - |
5901 | qt_rectfill_quint32 | - |
5902 | }, | - |
5903 | // Format_RGB16 | - |
5904 | { | - |
5905 | blend_color_rgb16, | - |
5906 | qt_gradient_quint16, | - |
5907 | qt_bitmapblit_quint16, | - |
5908 | qt_alphamapblit_quint16, | - |
5909 | 0, | - |
5910 | qt_rectfill_quint16 | - |
5911 | }, | - |
5912 | // Format_ARGB8565_Premultiplied | - |
5913 | { | - |
5914 | blend_color_generic, | - |
5915 | blend_src_generic, | - |
5916 | 0, 0, 0, 0 | - |
5917 | }, | - |
5918 | // Format_RGB666 | - |
5919 | { | - |
5920 | blend_color_generic, | - |
5921 | blend_src_generic, | - |
5922 | 0, 0, 0, 0 | - |
5923 | }, | - |
5924 | // Format_ARGB6666_Premultiplied | - |
5925 | { | - |
5926 | blend_color_generic, | - |
5927 | blend_src_generic, | - |
5928 | 0, 0, 0, 0 | - |
5929 | }, | - |
5930 | // Format_RGB555 | - |
5931 | { | - |
5932 | blend_color_generic, | - |
5933 | blend_src_generic, | - |
5934 | 0, 0, 0, 0 | - |
5935 | }, | - |
5936 | // Format_ARGB8555_Premultiplied | - |
5937 | { | - |
5938 | blend_color_generic, | - |
5939 | blend_src_generic, | - |
5940 | 0, 0, 0, 0 | - |
5941 | }, | - |
5942 | // Format_RGB888 | - |
5943 | { | - |
5944 | blend_color_generic, | - |
5945 | blend_src_generic, | - |
5946 | 0, 0, 0, 0 | - |
5947 | }, | - |
5948 | // Format_RGB444 | - |
5949 | { | - |
5950 | blend_color_generic, | - |
5951 | blend_src_generic, | - |
5952 | 0, 0, 0, 0 | - |
5953 | }, | - |
5954 | // Format_ARGB4444_Premultiplied | - |
5955 | { | - |
5956 | blend_color_generic, | - |
5957 | blend_src_generic, | - |
5958 | 0, 0, 0, 0 | - |
5959 | } | - |
5960 | }; | - |
5961 | | - |
5962 | #if defined(Q_CC_MSVC) && !defined(_MIPS_) | - |
5963 | template <class T> | - |
5964 | inline void qt_memfill_template(T *dest, T color, int count) | - |
5965 | { | - |
5966 | while (count--) | - |
5967 | *dest++ = color; | - |
5968 | } | - |
5969 | | - |
5970 | #else | - |
5971 | | - |
5972 | template <class T> | - |
5973 | inline void qt_memfill_template(T *dest, T color, int count) | - |
5974 | { | - |
5975 | int n = (count + 7) / 8; never executed (the execution status of this line is deduced): int n = (count + 7) / 8; | - |
5976 | switch (count & 0x07) | - |
5977 | { | - |
5978 | case 0: do { *dest++ = color; never executed (the execution status of this line is deduced): case 0: do { *dest++ = color; | - |
5979 | case 7: *dest++ = color; code before this statement never executed: case 7: | 0 |
5980 | case 6: *dest++ = color; code before this statement never executed: case 6: | 0 |
5981 | case 5: *dest++ = color; code before this statement never executed: case 5: | 0 |
5982 | case 4: *dest++ = color; code before this statement never executed: case 4: | 0 |
5983 | case 3: *dest++ = color; code before this statement never executed: case 3: | 0 |
5984 | case 2: *dest++ = color; code before this statement never executed: case 2: | 0 |
5985 | case 1: *dest++ = color; code before this statement never executed: case 1: | 0 |
5986 | } while (--n > 0); never executed: } never evaluated: --n > 0 | 0 |
5987 | } | 0 |
5988 | } | 0 |
5989 | | - |
5990 | template <> | - |
5991 | inline void qt_memfill_template(quint16 *dest, quint16 value, int count) | - |
5992 | { | - |
5993 | if (count < 3) { never evaluated: count < 3 | 0 |
5994 | switch (count) { | - |
5995 | case 2: *dest++ = value; never executed (the execution status of this line is deduced): case 2: *dest++ = value; | - |
5996 | case 1: *dest = value; code before this statement never executed: case 1: | 0 |
5997 | } | 0 |
5998 | return; | 0 |
5999 | } | - |
6000 | | - |
6001 | const int align = (quintptr)(dest) & 0x3; never executed (the execution status of this line is deduced): const int align = (quintptr)(dest) & 0x3; | - |
6002 | switch (align) { | - |
6003 | case 2: *dest++ = value; --count; never executed (the execution status of this line is deduced): case 2: *dest++ = value; --count; | - |
6004 | } | 0 |
6005 | | - |
6006 | const quint32 value32 = (value << 16) | value; never executed (the execution status of this line is deduced): const quint32 value32 = (value << 16) | value; | - |
6007 | qt_memfill(reinterpret_cast<quint32*>(dest), value32, count / 2); never executed (the execution status of this line is deduced): qt_memfill(reinterpret_cast<quint32*>(dest), value32, count / 2); | - |
6008 | if (count & 0x1) never evaluated: count & 0x1 | 0 |
6009 | dest[count - 1] = value; never executed: dest[count - 1] = value; | 0 |
6010 | } | 0 |
6011 | #endif | - |
6012 | | - |
6013 | static void qt_memfill_quint16(quint16 *dest, quint16 color, int count) | - |
6014 | { | - |
6015 | qt_memfill_template<quint16>(dest, color, count); never executed (the execution status of this line is deduced): qt_memfill_template<quint16>(dest, color, count); | - |
6016 | } | 0 |
6017 | | - |
6018 | typedef void (*qt_memfill32_func)(quint32 *dest, quint32 value, int count); | - |
6019 | typedef void (*qt_memfill16_func)(quint16 *dest, quint16 value, int count); | - |
6020 | static void qt_memfill32_setup(quint32 *dest, quint32 value, int count); | - |
6021 | static void qt_memfill16_setup(quint16 *dest, quint16 value, int count); | - |
6022 | | - |
6023 | qt_memfill32_func qt_memfill32 = qt_memfill32_setup; | - |
6024 | qt_memfill16_func qt_memfill16 = qt_memfill16_setup; | - |
6025 | | - |
6026 | void qInitDrawhelperAsm() | - |
6027 | { | - |
6028 | | - |
6029 | qt_memfill32 = qt_memfill_template<quint32>; executed (the execution status of this line is deduced): qt_memfill32 = qt_memfill_template<quint32>; | - |
6030 | qt_memfill16 = qt_memfill_quint16; //qt_memfill_template<quint16>; executed (the execution status of this line is deduced): qt_memfill16 = qt_memfill_quint16; | - |
6031 | | - |
6032 | CompositionFunction *functionForModeAsm = 0; executed (the execution status of this line is deduced): CompositionFunction *functionForModeAsm = 0; | - |
6033 | CompositionFunctionSolid *functionForModeSolidAsm = 0; executed (the execution status of this line is deduced): CompositionFunctionSolid *functionForModeSolidAsm = 0; | - |
6034 | | - |
6035 | const uint features = qCpuFeatures(); executed (the execution status of this line is deduced): const uint features = qCpuFeatures(); | - |
6036 | if (false) { partially evaluated: false no Evaluation Count:0 | yes Evaluation Count:290 |
| 0-290 |
6037 | #ifdef QT_COMPILER_SUPPORTS_AVX | - |
6038 | } else if (features & AVX) { never executed: } partially evaluated: features & AVX no Evaluation Count:0 | yes Evaluation Count:290 |
| 0-290 |
6039 | qt_memfill32 = qt_memfill32_avx; never executed (the execution status of this line is deduced): qt_memfill32 = qt_memfill32_avx; | - |
6040 | qt_memfill16 = qt_memfill16_avx; never executed (the execution status of this line is deduced): qt_memfill16 = qt_memfill16_avx; | - |
6041 | qDrawHelper[QImage::Format_RGB32].bitmapBlit = qt_bitmapblit32_avx; never executed (the execution status of this line is deduced): qDrawHelper[QImage::Format_RGB32].bitmapBlit = qt_bitmapblit32_avx; | - |
6042 | qDrawHelper[QImage::Format_ARGB32].bitmapBlit = qt_bitmapblit32_avx; never executed (the execution status of this line is deduced): qDrawHelper[QImage::Format_ARGB32].bitmapBlit = qt_bitmapblit32_avx; | - |
6043 | qDrawHelper[QImage::Format_ARGB32_Premultiplied].bitmapBlit = qt_bitmapblit32_avx; never executed (the execution status of this line is deduced): qDrawHelper[QImage::Format_ARGB32_Premultiplied].bitmapBlit = qt_bitmapblit32_avx; | - |
6044 | qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_avx; never executed (the execution status of this line is deduced): qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_avx; | - |
6045 | | - |
6046 | extern void qt_scale_image_argb32_on_argb32_avx(uchar *destPixels, int dbpl, never executed (the execution status of this line is deduced): extern void qt_scale_image_argb32_on_argb32_avx(uchar *destPixels, int dbpl, | - |
6047 | const uchar *srcPixels, int sbpl, never executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6048 | const QRectF &targetRect, never executed (the execution status of this line is deduced): const QRectF &targetRect, | - |
6049 | const QRectF &sourceRect, never executed (the execution status of this line is deduced): const QRectF &sourceRect, | - |
6050 | const QRect &clip, never executed (the execution status of this line is deduced): const QRect &clip, | - |
6051 | int const_alpha); never executed (the execution status of this line is deduced): int const_alpha); | - |
6052 | qScaleFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_avx; never executed (the execution status of this line is deduced): qScaleFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_avx; | - |
6053 | qScaleFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_avx; never executed (the execution status of this line is deduced): qScaleFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_avx; | - |
6054 | #endif | - |
6055 | #ifdef QT_COMPILER_SUPPORTS_SSE2 | - |
6056 | } else if (features & SSE2) { never executed: } partially evaluated: features & SSE2 yes Evaluation Count:290 | no Evaluation Count:0 |
| 0-290 |
6057 | qt_memfill32 = qt_memfill32_sse2; executed (the execution status of this line is deduced): qt_memfill32 = qt_memfill32_sse2; | - |
6058 | qt_memfill16 = qt_memfill16_sse2; executed (the execution status of this line is deduced): qt_memfill16 = qt_memfill16_sse2; | - |
6059 | qDrawHelper[QImage::Format_RGB32].bitmapBlit = qt_bitmapblit32_sse2; executed (the execution status of this line is deduced): qDrawHelper[QImage::Format_RGB32].bitmapBlit = qt_bitmapblit32_sse2; | - |
6060 | qDrawHelper[QImage::Format_ARGB32].bitmapBlit = qt_bitmapblit32_sse2; executed (the execution status of this line is deduced): qDrawHelper[QImage::Format_ARGB32].bitmapBlit = qt_bitmapblit32_sse2; | - |
6061 | qDrawHelper[QImage::Format_ARGB32_Premultiplied].bitmapBlit = qt_bitmapblit32_sse2; executed (the execution status of this line is deduced): qDrawHelper[QImage::Format_ARGB32_Premultiplied].bitmapBlit = qt_bitmapblit32_sse2; | - |
6062 | qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse2; executed (the execution status of this line is deduced): qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse2; | - |
6063 | | - |
6064 | extern void qt_scale_image_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, executed (the execution status of this line is deduced): extern void qt_scale_image_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, | - |
6065 | const uchar *srcPixels, int sbpl, executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6066 | const QRectF &targetRect, executed (the execution status of this line is deduced): const QRectF &targetRect, | - |
6067 | const QRectF &sourceRect, executed (the execution status of this line is deduced): const QRectF &sourceRect, | - |
6068 | const QRect &clip, executed (the execution status of this line is deduced): const QRect &clip, | - |
6069 | int const_alpha); executed (the execution status of this line is deduced): int const_alpha); | - |
6070 | qScaleFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_sse2; executed (the execution status of this line is deduced): qScaleFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_sse2; | - |
6071 | qScaleFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_sse2; executed (the execution status of this line is deduced): qScaleFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32_sse2; | - |
6072 | #endif | - |
6073 | } executed: } Execution Count:290 | 290 |
6074 | | - |
6075 | #ifdef QT_COMPILER_SUPPORTS_SSE2 | - |
6076 | if (features & SSE2) { partially evaluated: features & SSE2 yes Evaluation Count:290 | no Evaluation Count:0 |
| 0-290 |
6077 | extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl, executed (the execution status of this line is deduced): extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl, | - |
6078 | const uchar *srcPixels, int sbpl, executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6079 | int w, int h, executed (the execution status of this line is deduced): int w, int h, | - |
6080 | int const_alpha); executed (the execution status of this line is deduced): int const_alpha); | - |
6081 | extern void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, executed (the execution status of this line is deduced): extern void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, | - |
6082 | const uchar *srcPixels, int sbpl, executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6083 | int w, int h, executed (the execution status of this line is deduced): int w, int h, | - |
6084 | int const_alpha); executed (the execution status of this line is deduced): int const_alpha); | - |
6085 | | - |
6086 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2; executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2; | - |
6087 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2; executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2; | - |
6088 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2; executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2; | - |
6089 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2; executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2; | - |
6090 | | - |
6091 | extern const uint * QT_FASTCALL qt_fetch_radial_gradient_sse2(uint *buffer, const Operator *op, const QSpanData *data, executed (the execution status of this line is deduced): extern const uint * qt_fetch_radial_gradient_sse2(uint *buffer, const Operator *op, const QSpanData *data, | - |
6092 | int y, int x, int length); executed (the execution status of this line is deduced): int y, int x, int length); | - |
6093 | | - |
6094 | qt_fetch_radial_gradient = qt_fetch_radial_gradient_sse2; executed (the execution status of this line is deduced): qt_fetch_radial_gradient = qt_fetch_radial_gradient_sse2; | - |
6095 | } executed: } Execution Count:290 | 290 |
6096 | | - |
6097 | #ifdef QT_COMPILER_SUPPORTS_SSSE3 | - |
6098 | if (features & SSSE3) { partially evaluated: features & SSSE3 yes Evaluation Count:290 | no Evaluation Count:0 |
| 0-290 |
6099 | extern void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl, executed (the execution status of this line is deduced): extern void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl, | - |
6100 | const uchar *srcPixels, int sbpl, executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6101 | int w, int h, executed (the execution status of this line is deduced): int w, int h, | - |
6102 | int const_alpha); executed (the execution status of this line is deduced): int const_alpha); | - |
6103 | | - |
6104 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3; executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3; | - |
6105 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3; executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3; | - |
6106 | } executed: } Execution Count:290 | 290 |
6107 | #endif // SSSE3 | - |
6108 | | - |
6109 | #ifdef QT_COMPILER_SUPPORTS_AVX | - |
6110 | if (features & AVX) { partially evaluated: features & AVX no Evaluation Count:0 | yes Evaluation Count:290 |
| 0-290 |
6111 | extern void qt_blend_rgb32_on_rgb32_avx(uchar *destPixels, int dbpl, never executed (the execution status of this line is deduced): extern void qt_blend_rgb32_on_rgb32_avx(uchar *destPixels, int dbpl, | - |
6112 | const uchar *srcPixels, int sbpl, never executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6113 | int w, int h, never executed (the execution status of this line is deduced): int w, int h, | - |
6114 | int const_alpha); never executed (the execution status of this line is deduced): int const_alpha); | - |
6115 | extern void qt_blend_argb32_on_argb32_avx(uchar *destPixels, int dbpl, never executed (the execution status of this line is deduced): extern void qt_blend_argb32_on_argb32_avx(uchar *destPixels, int dbpl, | - |
6116 | const uchar *srcPixels, int sbpl, never executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6117 | int w, int h, never executed (the execution status of this line is deduced): int w, int h, | - |
6118 | int const_alpha); never executed (the execution status of this line is deduced): int const_alpha); | - |
6119 | | - |
6120 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_avx; never executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_avx; | - |
6121 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_avx; never executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_avx; | - |
6122 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_avx; never executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_avx; | - |
6123 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_avx; never executed (the execution status of this line is deduced): qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_avx; | - |
6124 | | - |
6125 | extern const uint * QT_FASTCALL qt_fetch_radial_gradient_avx(uint *buffer, const Operator *op, const QSpanData *data, never executed (the execution status of this line is deduced): extern const uint * qt_fetch_radial_gradient_avx(uint *buffer, const Operator *op, const QSpanData *data, | - |
6126 | int y, int x, int length); never executed (the execution status of this line is deduced): int y, int x, int length); | - |
6127 | | - |
6128 | qt_fetch_radial_gradient = qt_fetch_radial_gradient_avx; never executed (the execution status of this line is deduced): qt_fetch_radial_gradient = qt_fetch_radial_gradient_avx; | - |
6129 | } | 0 |
6130 | #endif // AVX | - |
6131 | | - |
6132 | #endif // SSE2 | - |
6133 | | - |
6134 | #ifdef QT_COMPILER_SUPPORTS_SSE2 | - |
6135 | if (features & SSE2) { partially evaluated: features & SSE2 yes Evaluation Count:290 | no Evaluation Count:0 |
| 0-290 |
6136 | functionForModeAsm = qt_functionForMode_SSE2; executed (the execution status of this line is deduced): functionForModeAsm = qt_functionForMode_SSE2; | - |
6137 | functionForModeSolidAsm = qt_functionForModeSolid_SSE2; executed (the execution status of this line is deduced): functionForModeSolidAsm = qt_functionForModeSolid_SSE2; | - |
6138 | } executed: } Execution Count:290 | 290 |
6139 | #endif | - |
6140 | #ifdef QT_COMPILER_SUPPORTS_AVX | - |
6141 | if (features & AVX) { partially evaluated: features & AVX no Evaluation Count:0 | yes Evaluation Count:290 |
| 0-290 |
6142 | extern void QT_FASTCALL comp_func_SourceOver_avx(uint *destPixels, never executed (the execution status of this line is deduced): extern void comp_func_SourceOver_avx(uint *destPixels, | - |
6143 | const uint *srcPixels, never executed (the execution status of this line is deduced): const uint *srcPixels, | - |
6144 | int length, never executed (the execution status of this line is deduced): int length, | - |
6145 | uint const_alpha); never executed (the execution status of this line is deduced): uint const_alpha); | - |
6146 | extern void QT_FASTCALL comp_func_solid_SourceOver_avx(uint *destPixels, int length, uint color, uint const_alpha); never executed (the execution status of this line is deduced): extern void comp_func_solid_SourceOver_avx(uint *destPixels, int length, uint color, uint const_alpha); | - |
6147 | extern void QT_FASTCALL comp_func_Plus_avx(uint *dst, const uint *src, int length, uint const_alpha); never executed (the execution status of this line is deduced): extern void comp_func_Plus_avx(uint *dst, const uint *src, int length, uint const_alpha); | - |
6148 | extern void QT_FASTCALL comp_func_Source_avx(uint *dst, const uint *src, int length, uint const_alpha); never executed (the execution status of this line is deduced): extern void comp_func_Source_avx(uint *dst, const uint *src, int length, uint const_alpha); | - |
6149 | | - |
6150 | functionForModeAsm[0] = comp_func_SourceOver_avx; never executed (the execution status of this line is deduced): functionForModeAsm[0] = comp_func_SourceOver_avx; | - |
6151 | functionForModeAsm[QPainter::CompositionMode_Source] = comp_func_Source_avx; never executed (the execution status of this line is deduced): functionForModeAsm[QPainter::CompositionMode_Source] = comp_func_Source_avx; | - |
6152 | functionForModeAsm[QPainter::CompositionMode_Plus] = comp_func_Plus_avx; never executed (the execution status of this line is deduced): functionForModeAsm[QPainter::CompositionMode_Plus] = comp_func_Plus_avx; | - |
6153 | functionForModeSolidAsm[0] = comp_func_solid_SourceOver_avx; never executed (the execution status of this line is deduced): functionForModeSolidAsm[0] = comp_func_solid_SourceOver_avx; | - |
6154 | } | 0 |
6155 | #endif // SSE2 | - |
6156 | | - |
6157 | #ifdef QT_COMPILER_SUPPORTS_IWMMXT | - |
6158 | if (features & IWMMXT) { | - |
6159 | functionForModeAsm = qt_functionForMode_IWMMXT; | - |
6160 | functionForModeSolidAsm = qt_functionForModeSolid_IWMMXT; | - |
6161 | qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_iwmmxt; | - |
6162 | } | - |
6163 | #endif // IWMMXT | - |
6164 | | - |
6165 | #if defined(QT_COMPILER_SUPPORTS_NEON) | - |
6166 | if (features & NEON) { | - |
6167 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; | - |
6168 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; | - |
6169 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; | - |
6170 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; | - |
6171 | qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon; | - |
6172 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon; | - |
6173 | qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon; | - |
6174 | | - |
6175 | qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon; | - |
6176 | qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon; | - |
6177 | | - |
6178 | qTransformFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_rgb16_neon; | - |
6179 | qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon; | - |
6180 | | - |
6181 | qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon; | - |
6182 | | - |
6183 | functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon; | - |
6184 | functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon; | - |
6185 | functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon; | - |
6186 | destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon; | - |
6187 | destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon; | - |
6188 | | - |
6189 | qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon; | - |
6190 | qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon; | - |
6191 | qt_memfill32 = qt_memfill32_neon; | - |
6192 | | - |
6193 | extern const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer, const Operator *op, const QSpanData *data, | - |
6194 | int y, int x, int length); | - |
6195 | | - |
6196 | qt_fetch_radial_gradient = qt_fetch_radial_gradient_neon; | - |
6197 | } | - |
6198 | #endif | - |
6199 | | - |
6200 | #if defined(QT_COMPILER_SUPPORTS_MIPS_DSP) | - |
6201 | functionForMode_C[QPainter::CompositionMode_SourceOver] = comp_func_SourceOver_asm_mips_dsp; | - |
6202 | functionForMode_C[QPainter::CompositionMode_Source] = comp_func_Source_mips_dsp; | - |
6203 | functionForMode_C[QPainter::CompositionMode_DestinationOver] = comp_func_DestinationOver_mips_dsp; | - |
6204 | functionForMode_C[QPainter::CompositionMode_SourceIn] = comp_func_SourceIn_mips_dsp; | - |
6205 | functionForMode_C[QPainter::CompositionMode_DestinationIn] = comp_func_DestinationIn_mips_dsp; | - |
6206 | functionForMode_C[QPainter::CompositionMode_DestinationOut] = comp_func_DestinationOut_mips_dsp; | - |
6207 | functionForMode_C[QPainter::CompositionMode_SourceAtop] = comp_func_SourceAtop_mips_dsp; | - |
6208 | functionForMode_C[QPainter::CompositionMode_DestinationAtop] = comp_func_DestinationAtop_mips_dsp; | - |
6209 | functionForMode_C[QPainter::CompositionMode_Xor] = comp_func_XOR_mips_dsp; | - |
6210 | functionForMode_C[QPainter::CompositionMode_SourceOut] = comp_func_SourceOut_mips_dsp; | - |
6211 | | - |
6212 | functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_mips_dsp; | - |
6213 | functionForModeSolid_C[QPainter::CompositionMode_DestinationOver] = comp_func_solid_DestinationOver_mips_dsp; | - |
6214 | functionForModeSolid_C[QPainter::CompositionMode_SourceIn] = comp_func_solid_SourceIn_mips_dsp; | - |
6215 | functionForModeSolid_C[QPainter::CompositionMode_DestinationIn] = comp_func_solid_DestinationIn_mips_dsp; | - |
6216 | functionForModeSolid_C[QPainter::CompositionMode_SourceAtop] = comp_func_solid_SourceAtop_mips_dsp; | - |
6217 | functionForModeSolid_C[QPainter::CompositionMode_DestinationAtop] = comp_func_solid_DestinationAtop_mips_dsp; | - |
6218 | functionForModeSolid_C[QPainter::CompositionMode_Xor] = comp_func_solid_XOR_mips_dsp; | - |
6219 | functionForModeSolid_C[QPainter::CompositionMode_SourceOut] = comp_func_solid_SourceOut_mips_dsp; | - |
6220 | | - |
6221 | qt_memfill32 = qt_memfill32_asm_mips_dsp; | - |
6222 | | - |
6223 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mips_dsp; | - |
6224 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mips_dsp; | - |
6225 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_mips_dsp; | - |
6226 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_mips_dsp; | - |
6227 | | - |
6228 | destFetchProc[QImage::Format_ARGB32] = qt_destFetchARGB32_mips_dsp; | - |
6229 | | - |
6230 | destStoreProc[QImage::Format_ARGB32] = qt_destStoreARGB32_mips_dsp; | - |
6231 | | - |
6232 | #endif // QT_COMPILER_SUPPORTS_MIPS_DSP | - |
6233 | if (functionForModeSolidAsm) { partially evaluated: functionForModeSolidAsm yes Evaluation Count:290 | no Evaluation Count:0 |
| 0-290 |
6234 | const int destinationMode = QPainter::CompositionMode_Destination; executed (the execution status of this line is deduced): const int destinationMode = QPainter::CompositionMode_Destination; | - |
6235 | functionForModeSolidAsm[destinationMode] = functionForModeSolid_C[destinationMode]; executed (the execution status of this line is deduced): functionForModeSolidAsm[destinationMode] = functionForModeSolid_C[destinationMode]; | - |
6236 | | - |
6237 | // use the default qdrawhelper implementation for the | - |
6238 | // extended composition modes | - |
6239 | for (int mode = 12; mode < 24; ++mode) evaluated: mode < 24 yes Evaluation Count:3480 | yes Evaluation Count:290 |
| 290-3480 |
6240 | functionForModeSolidAsm[mode] = functionForModeSolid_C[mode]; executed: functionForModeSolidAsm[mode] = functionForModeSolid_C[mode]; Execution Count:3480 | 3480 |
6241 | | - |
6242 | functionForModeSolid = functionForModeSolidAsm; executed (the execution status of this line is deduced): functionForModeSolid = functionForModeSolidAsm; | - |
6243 | } executed: } Execution Count:290 | 290 |
6244 | if (functionForModeAsm) partially evaluated: functionForModeAsm yes Evaluation Count:290 | no Evaluation Count:0 |
| 0-290 |
6245 | functionForMode = functionForModeAsm; executed: functionForMode = functionForModeAsm; Execution Count:290 | 290 |
6246 | } executed: } Execution Count:290 | 290 |
6247 | | - |
6248 | static void qt_memfill32_setup(quint32 *dest, quint32 value, int count) | - |
6249 | { | - |
6250 | qInitDrawhelperAsm(); executed (the execution status of this line is deduced): qInitDrawhelperAsm(); | - |
6251 | qt_memfill32(dest, value, count); executed (the execution status of this line is deduced): qt_memfill32(dest, value, count); | - |
6252 | } executed: } Execution Count:1 | 1 |
6253 | | - |
6254 | static void qt_memfill16_setup(quint16 *dest, quint16 value, int count) | - |
6255 | { | - |
6256 | qInitDrawhelperAsm(); never executed (the execution status of this line is deduced): qInitDrawhelperAsm(); | - |
6257 | qt_memfill16(dest, value, count); never executed (the execution status of this line is deduced): qt_memfill16(dest, value, count); | - |
6258 | } | 0 |
6259 | | - |
6260 | QT_END_NAMESPACE | - |
6261 | | - |
| | |