Line | Source Code | Coverage |
---|
1 | /**************************************************************************** | - |
2 | ** | - |
3 | ** Copyright (C) 2012 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__ >= 404) | - |
44 | // GCC 4.4 supports #pragma GCC optimize and #pragma GCC target | - |
45 | # pragma GCC optimize "O3" | - |
46 | # if defined(__i386__) && defined(__SSE2__) && !defined(__SSE2_MATH__) | - |
47 | # pragma GCC target "fpmath=sse" | - |
48 | # endif | - |
49 | #endif | - |
50 | | - |
51 | #include <qstylehints.h> | - |
52 | #include <qguiapplication.h> | - |
53 | #include <qatomic.h> | - |
54 | #include <private/qdrawhelper_p.h> | - |
55 | #include <private/qpaintengine_raster_p.h> | - |
56 | #include <private/qpainter_p.h> | - |
57 | #include <private/qdrawhelper_x86_p.h> | - |
58 | #include <private/qdrawhelper_neon_p.h> | - |
59 | #if defined(QT_COMPILER_SUPPORTS_MIPS_DSP) || defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2) | - |
60 | #include <private/qdrawhelper_mips_dsp_p.h> | - |
61 | #endif | - |
62 | #include <private/qmath_p.h> | - |
63 | #include <private/qguiapplication_p.h> | - |
64 | #include <qmath.h> | - |
65 | | - |
66 | QT_BEGIN_NAMESPACE | - |
67 | | - |
68 | #define MASK(src, a) src = BYTE_MUL(src, a) | - |
69 | | - |
70 | /* | - |
71 | constants and structures | - |
72 | */ | - |
73 | | - |
74 | enum { | - |
75 | fixed_scale = 1 << 16, | - |
76 | half_point = 1 << 15 | - |
77 | }; | - |
78 | | - |
79 | // must be multiple of 4 for easier SIMD implementations | - |
80 | static const int buffer_size = 2048; | - |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
85 | // To convert in place, let 'dest' and 'src' be the same. | - |
86 | static const uint *QT_FASTCALL convertIndexedToARGB32PM(uint *buffer, const uint *src, int count, | - |
87 | const QPixelLayout *, const QRgb *clut) | - |
88 | { | - |
89 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:69009 | yes Evaluation Count:3393 |
| 3393-69009 |
90 | buffer[i] = PREMUL(clut[src[i]]); executed: buffer[i] = PREMUL(clut[src[i]]); Execution Count:69009 | 69009 |
91 | return buffer; executed: return buffer; Execution Count:3393 | 3393 |
92 | } | - |
93 | | - |
94 | static const uint *QT_FASTCALL convertPassThrough(uint *, const uint *src, int, | - |
95 | const QPixelLayout *, const QRgb *) | - |
96 | { | - |
97 | return src; executed: return src; Execution Count:42077 | 42077 |
98 | } | - |
99 | | - |
100 | static const uint *QT_FASTCALL convertRGB16ToARGB32PM(uint *buffer, const uint *src, int count, | - |
101 | const QPixelLayout *, const QRgb *) | - |
102 | { | - |
103 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:280794 | yes Evaluation Count:3041 |
| 3041-280794 |
104 | buffer[i] = qConvertRgb16To32(src[i]); executed: buffer[i] = qConvertRgb16To32(src[i]); Execution Count:280794 | 280794 |
105 | return buffer; executed: return buffer; Execution Count:3041 | 3041 |
106 | } | - |
107 | | - |
108 | static const uint *QT_FASTCALL convertARGB32ToARGB32PM(uint *buffer, const uint *src, int count, | - |
109 | const QPixelLayout *, const QRgb *) | - |
110 | { | - |
111 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:1431100 | yes Evaluation Count:16167 |
| 16167-1431100 |
112 | buffer[i] = PREMUL(src[i]); executed: buffer[i] = PREMUL(src[i]); Execution Count:1431100 | 1431100 |
113 | return buffer; executed: return buffer; Execution Count:16167 | 16167 |
114 | } | - |
115 | | - |
116 | static const uint *QT_FASTCALL convertToRGB32(uint *buffer, const uint *src, int count, | - |
117 | const QPixelLayout *layout, const QRgb *) | - |
118 | { | - |
119 | Q_ASSERT(layout->redWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
120 | Q_ASSERT(layout->greenWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
121 | Q_ASSERT(layout->blueWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
122 | Q_ASSERT(layout->alphaWidth == 0); executed (the execution status of this line is deduced): qt_noop(); | - |
123 | | - |
124 | const uint redMask = ((1 << layout->redWidth) - 1); executed (the execution status of this line is deduced): const uint redMask = ((1 << layout->redWidth) - 1); | - |
125 | const uint greenMask = ((1 << layout->greenWidth) - 1); executed (the execution status of this line is deduced): const uint greenMask = ((1 << layout->greenWidth) - 1); | - |
126 | const uint blueMask = ((1 << layout->blueWidth) - 1); executed (the execution status of this line is deduced): const uint blueMask = ((1 << layout->blueWidth) - 1); | - |
127 | | - |
128 | const uchar redLeftShift = 8 - layout->redWidth; executed (the execution status of this line is deduced): const uchar redLeftShift = 8 - layout->redWidth; | - |
129 | const uchar greenLeftShift = 8 - layout->greenWidth; executed (the execution status of this line is deduced): const uchar greenLeftShift = 8 - layout->greenWidth; | - |
130 | const uchar blueLeftShift = 8 - layout->blueWidth; executed (the execution status of this line is deduced): const uchar blueLeftShift = 8 - layout->blueWidth; | - |
131 | | - |
132 | const uchar redRightShift = 2 * layout->redWidth - 8; executed (the execution status of this line is deduced): const uchar redRightShift = 2 * layout->redWidth - 8; | - |
133 | const uchar greenRightShift = 2 * layout->greenWidth - 8; executed (the execution status of this line is deduced): const uchar greenRightShift = 2 * layout->greenWidth - 8; | - |
134 | const uchar blueRightShift = 2 * layout->blueWidth - 8; executed (the execution status of this line is deduced): const uchar blueRightShift = 2 * layout->blueWidth - 8; | - |
135 | | - |
136 | for (int i = 0; i < count; ++i) { evaluated: i < count yes Evaluation Count:6060419 | yes Evaluation Count:1087009 |
| 1087009-6060419 |
137 | uint red = (src[i] >> layout->redShift) & redMask; executed (the execution status of this line is deduced): uint red = (src[i] >> layout->redShift) & redMask; | - |
138 | uint green = (src[i] >> layout->greenShift) & greenMask; executed (the execution status of this line is deduced): uint green = (src[i] >> layout->greenShift) & greenMask; | - |
139 | uint blue = (src[i] >> layout->blueShift) & blueMask; executed (the execution status of this line is deduced): uint blue = (src[i] >> layout->blueShift) & blueMask; | - |
140 | | - |
141 | red = ((red << redLeftShift) | (red >> redRightShift)) << 16; executed (the execution status of this line is deduced): red = ((red << redLeftShift) | (red >> redRightShift)) << 16; | - |
142 | green = ((green << greenLeftShift) | (green >> greenRightShift)) << 8; executed (the execution status of this line is deduced): green = ((green << greenLeftShift) | (green >> greenRightShift)) << 8; | - |
143 | blue = (blue << blueLeftShift) | (blue >> blueRightShift); executed (the execution status of this line is deduced): blue = (blue << blueLeftShift) | (blue >> blueRightShift); | - |
144 | buffer[i] = 0xff000000 | red | green | blue; executed (the execution status of this line is deduced): buffer[i] = 0xff000000 | red | green | blue; | - |
145 | } executed: } Execution Count:6060419 | 6060419 |
146 | | - |
147 | return buffer; executed: return buffer; Execution Count:1087009 | 1087009 |
148 | } | - |
149 | | - |
150 | static const uint *QT_FASTCALL convertToARGB32PM(uint *buffer, const uint *src, int count, | - |
151 | const QPixelLayout *layout, const QRgb *) | - |
152 | { | - |
153 | Q_ASSERT(layout->redWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
154 | Q_ASSERT(layout->greenWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
155 | Q_ASSERT(layout->blueWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
156 | Q_ASSERT(layout->alphaWidth >= 4); executed (the execution status of this line is deduced): qt_noop(); | - |
157 | | - |
158 | const uint redMask = ((1 << layout->redWidth) - 1); executed (the execution status of this line is deduced): const uint redMask = ((1 << layout->redWidth) - 1); | - |
159 | const uint greenMask = ((1 << layout->greenWidth) - 1); executed (the execution status of this line is deduced): const uint greenMask = ((1 << layout->greenWidth) - 1); | - |
160 | const uint blueMask = ((1 << layout->blueWidth) - 1); executed (the execution status of this line is deduced): const uint blueMask = ((1 << layout->blueWidth) - 1); | - |
161 | | - |
162 | const uchar redLeftShift = 8 - layout->redWidth; executed (the execution status of this line is deduced): const uchar redLeftShift = 8 - layout->redWidth; | - |
163 | const uchar greenLeftShift = 8 - layout->greenWidth; executed (the execution status of this line is deduced): const uchar greenLeftShift = 8 - layout->greenWidth; | - |
164 | const uchar blueLeftShift = 8 - layout->blueWidth; executed (the execution status of this line is deduced): const uchar blueLeftShift = 8 - layout->blueWidth; | - |
165 | | - |
166 | const uchar redRightShift = 2 * layout->redWidth - 8; executed (the execution status of this line is deduced): const uchar redRightShift = 2 * layout->redWidth - 8; | - |
167 | const uchar greenRightShift = 2 * layout->greenWidth - 8; executed (the execution status of this line is deduced): const uchar greenRightShift = 2 * layout->greenWidth - 8; | - |
168 | const uchar blueRightShift = 2 * layout->blueWidth - 8; executed (the execution status of this line is deduced): const uchar blueRightShift = 2 * layout->blueWidth - 8; | - |
169 | | - |
170 | const uint alphaMask = ((1 << layout->alphaWidth) - 1); executed (the execution status of this line is deduced): const uint alphaMask = ((1 << layout->alphaWidth) - 1); | - |
171 | const uchar alphaLeftShift = 8 - layout->alphaWidth; executed (the execution status of this line is deduced): const uchar alphaLeftShift = 8 - layout->alphaWidth; | - |
172 | const uchar alphaRightShift = 2 * layout->alphaWidth - 8; executed (the execution status of this line is deduced): const uchar alphaRightShift = 2 * layout->alphaWidth - 8; | - |
173 | | - |
174 | if (layout->premultiplied) { partially evaluated: layout->premultiplied yes Evaluation Count:449773 | no Evaluation Count:0 |
| 0-449773 |
175 | for (int i = 0; i < count; ++i) { evaluated: i < count yes Evaluation Count:3279420 | yes Evaluation Count:449773 |
| 449773-3279420 |
176 | uint alpha = (src[i] >> layout->alphaShift) & alphaMask; executed (the execution status of this line is deduced): uint alpha = (src[i] >> layout->alphaShift) & alphaMask; | - |
177 | uint red = (src[i] >> layout->redShift) & redMask; executed (the execution status of this line is deduced): uint red = (src[i] >> layout->redShift) & redMask; | - |
178 | uint green = (src[i] >> layout->greenShift) & greenMask; executed (the execution status of this line is deduced): uint green = (src[i] >> layout->greenShift) & greenMask; | - |
179 | uint blue = (src[i] >> layout->blueShift) & blueMask; executed (the execution status of this line is deduced): uint blue = (src[i] >> layout->blueShift) & blueMask; | - |
180 | | - |
181 | alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); executed (the execution status of this line is deduced): alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); | - |
182 | red = qMin(alpha, (red << redLeftShift) | (red >> redRightShift)); executed (the execution status of this line is deduced): red = qMin(alpha, (red << redLeftShift) | (red >> redRightShift)); | - |
183 | green = qMin(alpha, (green << greenLeftShift) | (green >> greenRightShift)); executed (the execution status of this line is deduced): green = qMin(alpha, (green << greenLeftShift) | (green >> greenRightShift)); | - |
184 | blue = qMin(alpha, (blue << blueLeftShift) | (blue >> blueRightShift)); executed (the execution status of this line is deduced): blue = qMin(alpha, (blue << blueLeftShift) | (blue >> blueRightShift)); | - |
185 | 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; | - |
186 | } executed: } Execution Count:3279420 | 3279420 |
187 | } else { executed: } Execution Count:449773 | 449773 |
188 | for (int i = 0; i < count; ++i) { never evaluated: i < count | 0 |
189 | uint alpha = (src[i] >> layout->alphaShift) & alphaMask; never executed (the execution status of this line is deduced): uint alpha = (src[i] >> layout->alphaShift) & alphaMask; | - |
190 | uint red = (src[i] >> layout->redShift) & redMask; never executed (the execution status of this line is deduced): uint red = (src[i] >> layout->redShift) & redMask; | - |
191 | uint green = (src[i] >> layout->greenShift) & greenMask; never executed (the execution status of this line is deduced): uint green = (src[i] >> layout->greenShift) & greenMask; | - |
192 | uint blue = (src[i] >> layout->blueShift) & blueMask; never executed (the execution status of this line is deduced): uint blue = (src[i] >> layout->blueShift) & blueMask; | - |
193 | | - |
194 | alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); never executed (the execution status of this line is deduced): alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift); | - |
195 | red = (red << redLeftShift) | (red >> redRightShift); never executed (the execution status of this line is deduced): red = (red << redLeftShift) | (red >> redRightShift); | - |
196 | green = (green << greenLeftShift) | (green >> greenRightShift); never executed (the execution status of this line is deduced): green = (green << greenLeftShift) | (green >> greenRightShift); | - |
197 | blue = (blue << blueLeftShift) | (blue >> blueRightShift); never executed (the execution status of this line is deduced): blue = (blue << blueLeftShift) | (blue >> blueRightShift); | - |
198 | 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); | - |
199 | } | 0 |
200 | } | 0 |
201 | return buffer; executed: return buffer; Execution Count:449773 | 449773 |
202 | } | - |
203 | | - |
204 | static const uint *QT_FASTCALL convertRGB16FromARGB32PM(uint *buffer, const uint *src, int count, | - |
205 | const QPixelLayout *, const QRgb *) | - |
206 | { | - |
207 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:242710 | yes Evaluation Count:5005 |
| 5005-242710 |
208 | 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 |
209 | return buffer; executed: return buffer; Execution Count:5005 | 5005 |
210 | } | - |
211 | | - |
212 | static const uint *QT_FASTCALL convertARGB32FromARGB32PM(uint *buffer, const uint *src, int count, | - |
213 | const QPixelLayout *, const QRgb *) | - |
214 | { | - |
215 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:1798047 | yes Evaluation Count:42902 |
| 42902-1798047 |
216 | 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:1798047 evaluated: qAlpha(src[i]) == 0 yes Evaluation Count:422700 | yes Evaluation Count:1375347 |
| 422700-1798047 |
217 | return buffer; executed: return buffer; Execution Count:42902 | 42902 |
218 | } | - |
219 | | - |
220 | static const uint *QT_FASTCALL convertFromARGB32PM(uint *buffer, const uint *src, int count, | - |
221 | const QPixelLayout *layout, const QRgb *) | - |
222 | { | - |
223 | Q_ASSERT(layout->redWidth <= 8); executed (the execution status of this line is deduced): qt_noop(); | - |
224 | Q_ASSERT(layout->greenWidth <= 8); executed (the execution status of this line is deduced): qt_noop(); | - |
225 | Q_ASSERT(layout->blueWidth <= 8); executed (the execution status of this line is deduced): qt_noop(); | - |
226 | Q_ASSERT(layout->alphaWidth <= 8); executed (the execution status of this line is deduced): qt_noop(); | - |
227 | | - |
228 | const uint redMask = (1 << layout->redWidth) - 1; executed (the execution status of this line is deduced): const uint redMask = (1 << layout->redWidth) - 1; | - |
229 | const uint greenMask = (1 << layout->greenWidth) - 1; executed (the execution status of this line is deduced): const uint greenMask = (1 << layout->greenWidth) - 1; | - |
230 | const uint blueMask = (1 << layout->blueWidth) - 1; executed (the execution status of this line is deduced): const uint blueMask = (1 << layout->blueWidth) - 1; | - |
231 | const uint alphaMask = (1 << layout->alphaWidth) - 1; executed (the execution status of this line is deduced): const uint alphaMask = (1 << layout->alphaWidth) - 1; | - |
232 | | - |
233 | const uchar redRightShift = 24 - layout->redWidth; executed (the execution status of this line is deduced): const uchar redRightShift = 24 - layout->redWidth; | - |
234 | const uchar greenRightShift = 16 - layout->greenWidth; executed (the execution status of this line is deduced): const uchar greenRightShift = 16 - layout->greenWidth; | - |
235 | const uchar blueRightShift = 8 - layout->blueWidth; executed (the execution status of this line is deduced): const uchar blueRightShift = 8 - layout->blueWidth; | - |
236 | const uchar alphaRightShift = 32 - layout->alphaWidth; executed (the execution status of this line is deduced): const uchar alphaRightShift = 32 - layout->alphaWidth; | - |
237 | | - |
238 | if (!layout->premultiplied) { evaluated: !layout->premultiplied yes Evaluation Count:104293 | yes Evaluation Count:62937 |
| 62937-104293 |
239 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:8235233 | yes Evaluation Count:104293 |
| 104293-8235233 |
240 | 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 |
241 | src = buffer; executed (the execution status of this line is deduced): src = buffer; | - |
242 | } executed: } Execution Count:104293 | 104293 |
243 | for (int i = 0; i < count; ++i) { evaluated: i < count yes Evaluation Count:12486467 | yes Evaluation Count:167230 |
| 167230-12486467 |
244 | 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; | - |
245 | 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; | - |
246 | 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; | - |
247 | 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; | - |
248 | buffer[i] = red | green | blue | alpha; executed (the execution status of this line is deduced): buffer[i] = red | green | blue | alpha; | - |
249 | } executed: } Execution Count:12486467 | 12486467 |
250 | return buffer; executed: return buffer; Execution Count:167230 | 167230 |
251 | } | - |
252 | | - |
253 | template <QPixelLayout::BPP bpp> static | - |
254 | uint QT_FASTCALL fetchPixel(const uchar *src, int index); | - |
255 | | - |
256 | template <> | - |
257 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP1LSB>(const uchar *src, int index) | - |
258 | { | - |
259 | return (src[index >> 3] >> (index & 7)) & 1; executed: return (src[index >> 3] >> (index & 7)) & 1; Execution Count:22984 | 22984 |
260 | } | - |
261 | | - |
262 | template <> | - |
263 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP1MSB>(const uchar *src, int index) | - |
264 | { | - |
265 | return (src[index >> 3] >> (~index & 7)) & 1; executed: return (src[index >> 3] >> (~index & 7)) & 1; Execution Count:23065 | 23065 |
266 | } | - |
267 | | - |
268 | template <> | - |
269 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP8>(const uchar *src, int index) | - |
270 | { | - |
271 | return src[index]; executed: return src[index]; Execution Count:22960 | 22960 |
272 | } | - |
273 | | - |
274 | template <> | - |
275 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP16>(const uchar *src, int index) | - |
276 | { | - |
277 | return reinterpret_cast<const quint16 *>(src)[index]; executed: return reinterpret_cast<const quint16 *>(src)[index]; Execution Count:2919303 | 2919303 |
278 | } | - |
279 | | - |
280 | template <> | - |
281 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP24>(const uchar *src, int index) | - |
282 | { | - |
283 | return reinterpret_cast<const quint24 *>(src)[index]; executed: return reinterpret_cast<const quint24 *>(src)[index]; Execution Count:6702930 | 6702930 |
284 | } | - |
285 | | - |
286 | template <> | - |
287 | inline uint QT_FASTCALL fetchPixel<QPixelLayout::BPP32>(const uchar *src, int index) | - |
288 | { | - |
289 | return reinterpret_cast<const uint *>(src)[index]; never executed: return reinterpret_cast<const uint *>(src)[index]; | 0 |
290 | } | - |
291 | | - |
292 | template <QPixelLayout::BPP bpp> | - |
293 | inline const uint *QT_FASTCALL fetchPixels(uint *buffer, const uchar *src, int index, int count) | - |
294 | { | - |
295 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:9689113 | yes Evaluation Count:1543159 |
| 1543159-9689113 |
296 | buffer[i] = fetchPixel<bpp>(src, index + i); executed: buffer[i] = fetchPixel<bpp>(src, index + i); Execution Count:9689113 | 9689113 |
297 | return buffer; executed: return buffer; Execution Count:1543159 | 1543159 |
298 | } | - |
299 | | - |
300 | template <> | - |
301 | inline const uint *QT_FASTCALL fetchPixels<QPixelLayout::BPP32>(uint *, const uchar *src, int index, int) | - |
302 | { | - |
303 | return reinterpret_cast<const uint *>(src) + index; executed: return reinterpret_cast<const uint *>(src) + index; Execution Count:50906 | 50906 |
304 | } | - |
305 | | - |
306 | template <QPixelLayout::BPP width> static | - |
307 | void QT_FASTCALL storePixel(uchar *dest, int index, uint pixel); | - |
308 | | - |
309 | template <> | - |
310 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP1LSB>(uchar *dest, int index, uint pixel) | - |
311 | { | - |
312 | if (pixel) | 0 |
313 | dest[index >> 3] |= 1 << (index & 7); never executed: dest[index >> 3] |= 1 << (index & 7); | 0 |
314 | else | - |
315 | dest[index >> 3] &= ~(1 << (index & 7)); never executed: dest[index >> 3] &= ~(1 << (index & 7)); | 0 |
316 | } | - |
317 | | - |
318 | template <> | - |
319 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP1MSB>(uchar *dest, int index, uint pixel) | - |
320 | { | - |
321 | if (pixel) | 0 |
322 | dest[index >> 3] |= 1 << (~index & 7); never executed: dest[index >> 3] |= 1 << (~index & 7); | 0 |
323 | else | - |
324 | dest[index >> 3] &= ~(1 << (~index & 7)); never executed: dest[index >> 3] &= ~(1 << (~index & 7)); | 0 |
325 | } | - |
326 | | - |
327 | template <> | - |
328 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP8>(uchar *dest, int index, uint pixel) | - |
329 | { | - |
330 | dest[index] = uchar(pixel); never executed (the execution status of this line is deduced): dest[index] = uchar(pixel); | - |
331 | } | 0 |
332 | | - |
333 | template <> | - |
334 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP16>(uchar *dest, int index, uint pixel) | - |
335 | { | - |
336 | reinterpret_cast<quint16 *>(dest)[index] = quint16(pixel); executed (the execution status of this line is deduced): reinterpret_cast<quint16 *>(dest)[index] = quint16(pixel); | - |
337 | } executed: } Execution Count:3419198 | 3419198 |
338 | | - |
339 | template <> | - |
340 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP24>(uchar *dest, int index, uint pixel) | - |
341 | { | - |
342 | reinterpret_cast<quint24 *>(dest)[index] = quint24(pixel); executed (the execution status of this line is deduced): reinterpret_cast<quint24 *>(dest)[index] = quint24(pixel); | - |
343 | } executed: } Execution Count:9311579 | 9311579 |
344 | | - |
345 | template <> | - |
346 | inline void QT_FASTCALL storePixel<QPixelLayout::BPP32>(uchar *dest, int index, uint pixel) | - |
347 | { | - |
348 | reinterpret_cast<uint *>(dest)[index] = pixel; never executed (the execution status of this line is deduced): reinterpret_cast<uint *>(dest)[index] = pixel; | - |
349 | } | 0 |
350 | | - |
351 | template <QPixelLayout::BPP width> | - |
352 | inline void QT_FASTCALL storePixels(uchar *dest, const uint *src, int index, int count) | - |
353 | { | - |
354 | for (int i = 0; i < count; ++i) evaluated: i < count yes Evaluation Count:12730777 | yes Evaluation Count:172251 |
| 172251-12730777 |
355 | storePixel<width>(dest, index + i, src[i]); executed: storePixel<width>(dest, index + i, src[i]); Execution Count:12730777 | 12730777 |
356 | } executed: } Execution Count:172251 | 172251 |
357 | | - |
358 | template <> | - |
359 | inline void QT_FASTCALL storePixels<QPixelLayout::BPP32>(uchar *dest, const uint *src, int index, int count) | - |
360 | { | - |
361 | 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)); | - |
362 | } executed: } Execution Count:49891 | 49891 |
363 | | - |
364 | // Note: | - |
365 | // convertToArgb32() assumes that no color channel is less than 4 bits. | - |
366 | // convertFromArgb32() assumes that no color channel is more than 8 bits. | - |
367 | // QImage::rgbSwapped() assumes that the red and blue color channels have the same number of bits. | - |
368 | QPixelLayout qPixelLayouts[QImage::NImageFormats] = { | - |
369 | { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPPNone, 0, 0 }, // Format_Invalid | - |
370 | { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1MSB, convertIndexedToARGB32PM, 0 }, // Format_Mono | - |
371 | { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1LSB, convertIndexedToARGB32PM, 0 }, // Format_MonoLSB | - |
372 | { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertIndexedToARGB32PM, 0 }, // Format_Indexed8 | - |
373 | { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP32, convertPassThrough, convertPassThrough }, // Format_RGB32 | - |
374 | { 8, 16, 8, 8, 8, 0, 8, 24, false, QPixelLayout::BPP32, convertARGB32ToARGB32PM, convertARGB32FromARGB32PM }, // Format_ARGB32 | - |
375 | { 8, 16, 8, 8, 8, 0, 8, 24, true, QPixelLayout::BPP32, convertPassThrough, convertPassThrough }, // Format_ARGB32_Premultiplied | - |
376 | { 5, 11, 6, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16, convertRGB16ToARGB32PM, convertRGB16FromARGB32PM }, // Format_RGB16 | - |
377 | { 5, 19, 6, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB8565_Premultiplied | - |
378 | { 6, 12, 6, 6, 6, 0, 0, 0, false, QPixelLayout::BPP24, convertToRGB32, convertFromARGB32PM }, // Format_RGB666 | - |
379 | { 6, 12, 6, 6, 6, 0, 6, 18, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB6666_Premultiplied | - |
380 | { 5, 10, 5, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16, convertToRGB32, convertFromARGB32PM }, // Format_RGB555 | - |
381 | { 5, 18, 5, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM }, // Format_ARGB8555_Premultiplied | - |
382 | { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP24, convertToRGB32, convertFromARGB32PM }, // Format_RGB888 | - |
383 | { 4, 8, 4, 4, 4, 0, 0, 0, false, QPixelLayout::BPP16, convertToRGB32, convertFromARGB32PM }, // Format_RGB444 | - |
384 | { 4, 8, 4, 4, 4, 0, 4, 12, true, QPixelLayout::BPP16, convertToARGB32PM, convertFromARGB32PM } // Format_ARGB4444_Premultiplied | - |
385 | }; | - |
386 | | - |
387 | FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { | - |
388 | 0, // BPPNone | - |
389 | fetchPixels<QPixelLayout::BPP1MSB>, // BPP1MSB | - |
390 | fetchPixels<QPixelLayout::BPP1LSB>, // BPP1LSB | - |
391 | fetchPixels<QPixelLayout::BPP8>, // BPP8 | - |
392 | fetchPixels<QPixelLayout::BPP16>, // BPP16 | - |
393 | fetchPixels<QPixelLayout::BPP24>, // BPP24 | - |
394 | fetchPixels<QPixelLayout::BPP32> // BPP32 | - |
395 | }; | - |
396 | | - |
397 | StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { | - |
398 | 0, // BPPNone | - |
399 | storePixels<QPixelLayout::BPP1MSB>, // BPP1MSB | - |
400 | storePixels<QPixelLayout::BPP1LSB>, // BPP1LSB | - |
401 | storePixels<QPixelLayout::BPP8>, // BPP8 | - |
402 | storePixels<QPixelLayout::BPP16>, // BPP16 | - |
403 | storePixels<QPixelLayout::BPP24>, // BPP24 | - |
404 | storePixels<QPixelLayout::BPP32> // BPP32 | - |
405 | }; | - |
406 | | - |
407 | typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index); | - |
408 | | - |
409 | FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = { | - |
410 | 0, // BPPNone | - |
411 | fetchPixel<QPixelLayout::BPP1MSB>, // BPP1MSB | - |
412 | fetchPixel<QPixelLayout::BPP1LSB>, // BPP1LSB | - |
413 | fetchPixel<QPixelLayout::BPP8>, // BPP8 | - |
414 | fetchPixel<QPixelLayout::BPP16>, // BPP16 | - |
415 | fetchPixel<QPixelLayout::BPP24>, // BPP24 | - |
416 | fetchPixel<QPixelLayout::BPP32> // BPP32 | - |
417 | }; | - |
418 | | - |
419 | /* | - |
420 | Destination fetch. This is simple as we don't have to do bounds checks or | - |
421 | transformations | - |
422 | */ | - |
423 | | - |
424 | static uint * QT_FASTCALL destFetchMono(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) | - |
425 | { | - |
426 | 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); | - |
427 | uint *start = buffer; executed (the execution status of this line is deduced): uint *start = buffer; | - |
428 | const uint *end = buffer + length; executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
429 | while (buffer < end) { evaluated: buffer < end yes Evaluation Count:9885 | yes Evaluation Count:501 |
| 501-9885 |
430 | *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 |
431 | ++buffer; executed (the execution status of this line is deduced): ++buffer; | - |
432 | ++x; executed (the execution status of this line is deduced): ++x; | - |
433 | } executed: } Execution Count:9885 | 9885 |
434 | return start; executed: return start; Execution Count:501 | 501 |
435 | } | - |
436 | | - |
437 | static uint * QT_FASTCALL destFetchMonoLsb(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) | - |
438 | { | - |
439 | 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); | - |
440 | uint *start = buffer; executed (the execution status of this line is deduced): uint *start = buffer; | - |
441 | const uint *end = buffer + length; executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
442 | while (buffer < end) { evaluated: buffer < end yes Evaluation Count:107917 | yes Evaluation Count:98539 |
| 98539-107917 |
443 | *buffer = data[x>>3] & (0x1 << (x & 7)) ? rasterBuffer->destColor1 : rasterBuffer->destColor0; evaluated: data[x>>3] & (0x1 << (x & 7)) yes Evaluation Count:4381 | yes Evaluation Count:103536 |
| 4381-103536 |
444 | ++buffer; executed (the execution status of this line is deduced): ++buffer; | - |
445 | ++x; executed (the execution status of this line is deduced): ++x; | - |
446 | } executed: } Execution Count:107917 | 107917 |
447 | return start; executed: return start; Execution Count:98539 | 98539 |
448 | } | - |
449 | | - |
450 | static uint * QT_FASTCALL destFetchARGB32P(uint *, QRasterBuffer *rasterBuffer, int x, int y, int) | - |
451 | { | - |
452 | return (uint *)rasterBuffer->scanLine(y) + x; executed: return (uint *)rasterBuffer->scanLine(y) + x; Execution Count:88114 | 88114 |
453 | } | - |
454 | | - |
455 | static uint * QT_FASTCALL destFetchRGB16(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) | - |
456 | { | - |
457 | 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; | - |
458 | for (int i = 0; i < length; ++i) evaluated: i < length yes Evaluation Count:1786111 | yes Evaluation Count:353478 |
| 353478-1786111 |
459 | buffer[i] = qConvertRgb16To32(data[i]); executed: buffer[i] = qConvertRgb16To32(data[i]); Execution Count:1786111 | 1786111 |
460 | return buffer; executed: return buffer; Execution Count:353478 | 353478 |
461 | } | - |
462 | | - |
463 | static uint *QT_FASTCALL destFetch(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) | - |
464 | { | - |
465 | const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; | - |
466 | 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); | - |
467 | 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 |
468 | } | - |
469 | | - |
470 | | - |
471 | static DestFetchProc destFetchProc[QImage::NImageFormats] = | - |
472 | { | - |
473 | 0, // Format_Invalid | - |
474 | destFetchMono, // Format_Mono, | - |
475 | destFetchMonoLsb, // Format_MonoLSB | - |
476 | 0, // Format_Indexed8 | - |
477 | destFetchARGB32P, // Format_RGB32 | - |
478 | destFetch, // Format_ARGB32, | - |
479 | destFetchARGB32P, // Format_ARGB32_Premultiplied | - |
480 | destFetchRGB16, // Format_RGB16 | - |
481 | destFetch, // Format_ARGB8565_Premultiplied | - |
482 | destFetch, // Format_RGB666 | - |
483 | destFetch, // Format_ARGB6666_Premultiplied | - |
484 | destFetch, // Format_RGB555 | - |
485 | destFetch, // Format_ARGB8555_Premultiplied | - |
486 | destFetch, // Format_RGB888 | - |
487 | destFetch, // Format_RGB444 | - |
488 | destFetch // Format_ARGB4444_Premultiplied | - |
489 | }; | - |
490 | | - |
491 | /* | - |
492 | Returns the color in the mono destination color table | - |
493 | that is the "nearest" to /color/. | - |
494 | */ | - |
495 | static inline QRgb findNearestColor(QRgb color, QRasterBuffer *rbuf) | - |
496 | { | - |
497 | QRgb color_0 = PREMUL(rbuf->destColor0); executed (the execution status of this line is deduced): QRgb color_0 = PREMUL(rbuf->destColor0); | - |
498 | QRgb color_1 = PREMUL(rbuf->destColor1); executed (the execution status of this line is deduced): QRgb color_1 = PREMUL(rbuf->destColor1); | - |
499 | color = PREMUL(color); executed (the execution status of this line is deduced): color = PREMUL(color); | - |
500 | | - |
501 | int r = qRed(color); executed (the execution status of this line is deduced): int r = qRed(color); | - |
502 | int g = qGreen(color); executed (the execution status of this line is deduced): int g = qGreen(color); | - |
503 | int b = qBlue(color); executed (the execution status of this line is deduced): int b = qBlue(color); | - |
504 | int rx, gx, bx; executed (the execution status of this line is deduced): int rx, gx, bx; | - |
505 | int dist_0, dist_1; executed (the execution status of this line is deduced): int dist_0, dist_1; | - |
506 | | - |
507 | rx = r - qRed(color_0); executed (the execution status of this line is deduced): rx = r - qRed(color_0); | - |
508 | gx = g - qGreen(color_0); executed (the execution status of this line is deduced): gx = g - qGreen(color_0); | - |
509 | bx = b - qBlue(color_0); executed (the execution status of this line is deduced): bx = b - qBlue(color_0); | - |
510 | 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; | - |
511 | | - |
512 | rx = r - qRed(color_1); executed (the execution status of this line is deduced): rx = r - qRed(color_1); | - |
513 | gx = g - qGreen(color_1); executed (the execution status of this line is deduced): gx = g - qGreen(color_1); | - |
514 | bx = b - qBlue(color_1); executed (the execution status of this line is deduced): bx = b - qBlue(color_1); | - |
515 | 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; | - |
516 | | - |
517 | if (dist_0 < dist_1) partially evaluated: dist_0 < dist_1 no Evaluation Count:0 | yes Evaluation Count:4399 |
| 0-4399 |
518 | return color_0; never executed: return color_0; | 0 |
519 | return color_1; executed: return color_1; Execution Count:4399 | 4399 |
520 | } | - |
521 | | - |
522 | /* | - |
523 | Destination store. | - |
524 | */ | - |
525 | | - |
526 | static void QT_FASTCALL destStoreMono(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) | - |
527 | { | - |
528 | 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); | - |
529 | if (rasterBuffer->monoDestinationWithClut) { partially evaluated: rasterBuffer->monoDestinationWithClut yes Evaluation Count:1288 | no Evaluation Count:0 |
| 0-1288 |
530 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:45095 | yes Evaluation Count:1288 |
| 1288-45095 |
531 | if (buffer[i] == rasterBuffer->destColor0) { evaluated: buffer[i] == rasterBuffer->destColor0 yes Evaluation Count:82 | yes Evaluation Count:45013 |
| 82-45013 |
532 | data[x >> 3] &= ~(0x80 >> (x & 7)); executed (the execution status of this line is deduced): data[x >> 3] &= ~(0x80 >> (x & 7)); | - |
533 | } 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 |
534 | data[x >> 3] |= 0x80 >> (x & 7); executed (the execution status of this line is deduced): data[x >> 3] |= 0x80 >> (x & 7); | - |
535 | } 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 |
536 | data[x >> 3] &= ~(0x80 >> (x & 7)); executed (the execution status of this line is deduced): data[x >> 3] &= ~(0x80 >> (x & 7)); | - |
537 | } else { executed: } Execution Count:36 | 36 |
538 | data[x >> 3] |= 0x80 >> (x & 7); never executed (the execution status of this line is deduced): data[x >> 3] |= 0x80 >> (x & 7); | - |
539 | } | 0 |
540 | ++x; executed (the execution status of this line is deduced): ++x; | - |
541 | } executed: } Execution Count:45095 | 45095 |
542 | } else { executed: } Execution Count:1288 | 1288 |
543 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
544 | 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 |
545 | data[x >> 3] |= 0x80 >> (x & 7); never executed: data[x >> 3] |= 0x80 >> (x & 7); | 0 |
546 | else | - |
547 | data[x >> 3] &= ~(0x80 >> (x & 7)); never executed: data[x >> 3] &= ~(0x80 >> (x & 7)); | 0 |
548 | ++x; never executed (the execution status of this line is deduced): ++x; | - |
549 | } | 0 |
550 | } | 0 |
551 | } | - |
552 | | - |
553 | static void QT_FASTCALL destStoreMonoLsb(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) | - |
554 | { | - |
555 | 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); | - |
556 | if (rasterBuffer->monoDestinationWithClut) { partially evaluated: rasterBuffer->monoDestinationWithClut yes Evaluation Count:133696 | no Evaluation Count:0 |
| 0-133696 |
557 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:214899 | yes Evaluation Count:133696 |
| 133696-214899 |
558 | if (buffer[i] == rasterBuffer->destColor0) { evaluated: buffer[i] == rasterBuffer->destColor0 yes Evaluation Count:159254 | yes Evaluation Count:55645 |
| 55645-159254 |
559 | data[x >> 3] &= ~(1 << (x & 7)); executed (the execution status of this line is deduced): data[x >> 3] &= ~(1 << (x & 7)); | - |
560 | } else if (buffer[i] == rasterBuffer->destColor1) { executed: } Execution Count:159254 evaluated: buffer[i] == rasterBuffer->destColor1 yes Evaluation Count:51282 | yes Evaluation Count:4363 |
| 4363-159254 |
561 | data[x >> 3] |= 1 << (x & 7); executed (the execution status of this line is deduced): data[x >> 3] |= 1 << (x & 7); | - |
562 | } 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:4363 |
| 0-51282 |
563 | data[x >> 3] &= ~(1 << (x & 7)); never executed (the execution status of this line is deduced): data[x >> 3] &= ~(1 << (x & 7)); | - |
564 | } else { | 0 |
565 | data[x >> 3] |= 1 << (x & 7); executed (the execution status of this line is deduced): data[x >> 3] |= 1 << (x & 7); | - |
566 | } executed: } Execution Count:4363 | 4363 |
567 | ++x; executed (the execution status of this line is deduced): ++x; | - |
568 | } executed: } Execution Count:214899 | 214899 |
569 | } else { executed: } Execution Count:133696 | 133696 |
570 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
571 | 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 |
572 | data[x >> 3] |= 1 << (x & 7); never executed: data[x >> 3] |= 1 << (x & 7); | 0 |
573 | else | - |
574 | data[x >> 3] &= ~(1 << (x & 7)); never executed: data[x >> 3] &= ~(1 << (x & 7)); | 0 |
575 | ++x; never executed (the execution status of this line is deduced): ++x; | - |
576 | } | 0 |
577 | } | 0 |
578 | } | - |
579 | | - |
580 | static void QT_FASTCALL destStoreRGB16(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) | - |
581 | { | - |
582 | quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x; executed (the execution status of this line is deduced): quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x; | - |
583 | for (int i = 0; i < length; ++i) evaluated: i < length yes Evaluation Count:1891063 | yes Evaluation Count:354815 |
| 354815-1891063 |
584 | data[i] = qConvertRgb32To16(buffer[i]); executed: data[i] = qConvertRgb32To16(buffer[i]); Execution Count:1891063 | 1891063 |
585 | } executed: } Execution Count:354815 | 354815 |
586 | | - |
587 | static void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) | - |
588 | { | - |
589 | uint buf[buffer_size]; executed (the execution status of this line is deduced): uint buf[buffer_size]; | - |
590 | const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[rasterBuffer->format]; | - |
591 | StorePixelsFunc store = qStorePixels[layout->bpp]; executed (the execution status of this line is deduced): StorePixelsFunc store = qStorePixels[layout->bpp]; | - |
592 | uchar *dest = rasterBuffer->scanLine(y); executed (the execution status of this line is deduced): uchar *dest = rasterBuffer->scanLine(y); | - |
593 | while (length) { evaluated: length yes Evaluation Count:147575 | yes Evaluation Count:147575 |
| 147575 |
594 | int l = qMin(length, buffer_size); executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
595 | 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); | - |
596 | store(dest, ptr, x, l); executed (the execution status of this line is deduced): store(dest, ptr, x, l); | - |
597 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
598 | buffer += l; executed (the execution status of this line is deduced): buffer += l; | - |
599 | x += l; executed (the execution status of this line is deduced): x += l; | - |
600 | } executed: } Execution Count:147575 | 147575 |
601 | } executed: } Execution Count:147575 | 147575 |
602 | | - |
603 | static DestStoreProc destStoreProc[QImage::NImageFormats] = | - |
604 | { | - |
605 | 0, // Format_Invalid | - |
606 | destStoreMono, // Format_Mono, | - |
607 | destStoreMonoLsb, // Format_MonoLSB | - |
608 | 0, // Format_Indexed8 | - |
609 | 0, // Format_RGB32 | - |
610 | destStore, // Format_ARGB32, | - |
611 | 0, // Format_ARGB32_Premultiplied | - |
612 | destStoreRGB16, // Format_RGB16 | - |
613 | destStore, // Format_ARGB8565_Premultiplied | - |
614 | destStore, // Format_RGB666 | - |
615 | destStore, // Format_ARGB6666_Premultiplied | - |
616 | destStore, // Format_RGB555 | - |
617 | destStore, // Format_ARGB8555_Premultiplied | - |
618 | destStore, // Format_RGB888 | - |
619 | destStore, // Format_RGB444 | - |
620 | destStore // Format_ARGB4444_Premultiplied | - |
621 | }; | - |
622 | | - |
623 | /* | - |
624 | Source fetches | - |
625 | | - |
626 | This is a bit more complicated, as we need several fetch routines for every surface type | - |
627 | | - |
628 | We need 5 fetch methods per surface type: | - |
629 | untransformed | - |
630 | transformed (tiled and not tiled) | - |
631 | transformed bilinear (tiled and not tiled) | - |
632 | | - |
633 | We don't need bounds checks for untransformed, but we need them for the other ones. | - |
634 | | - |
635 | The generic implementation does pixel by pixel fetches | - |
636 | */ | - |
637 | | - |
638 | enum TextureBlendType { | - |
639 | BlendUntransformed, | - |
640 | BlendTiled, | - |
641 | BlendTransformed, | - |
642 | BlendTransformedTiled, | - |
643 | BlendTransformedBilinear, | - |
644 | BlendTransformedBilinearTiled, | - |
645 | NBlendTypes | - |
646 | }; | - |
647 | | - |
648 | static const uint *QT_FASTCALL fetchUntransformed(uint *buffer, const Operator *, | - |
649 | const QSpanData *data, int y, int x, int length) | - |
650 | { | - |
651 | const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; | - |
652 | 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); | - |
653 | 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 |
654 | return layout->convertToARGB32PM(buffer, ptr, length, layout, clut); executed: return layout->convertToARGB32PM(buffer, ptr, length, layout, clut); Execution Count:57312 | 57312 |
655 | } | - |
656 | | - |
657 | static const uint *QT_FASTCALL fetchUntransformedARGB32PM(uint *, const Operator *, | - |
658 | const QSpanData *data, int y, int x, int) | - |
659 | { | - |
660 | const uchar *scanLine = data->texture.scanLine(y); executed (the execution status of this line is deduced): const uchar *scanLine = data->texture.scanLine(y); | - |
661 | return ((const uint *)scanLine) + x; executed: return ((const uint *)scanLine) + x; Execution Count:417370 | 417370 |
662 | } | - |
663 | | - |
664 | static const uint *QT_FASTCALL fetchUntransformedRGB16(uint *buffer, const Operator *, | - |
665 | const QSpanData *data, int y, int x, | - |
666 | int length) | - |
667 | { | - |
668 | 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; | - |
669 | #ifdef QT_COMPILER_SUPPORTS_MIPS_DSPR2 | - |
670 | qConvertRgb16To32_asm_mips_dspr2(buffer, scanLine, length); | - |
671 | #else | - |
672 | for (int i = 0; i < length; ++i) evaluated: i < length yes Evaluation Count:279512 | yes Evaluation Count:4124 |
| 4124-279512 |
673 | buffer[i] = qConvertRgb16To32(scanLine[i]); executed: buffer[i] = qConvertRgb16To32(scanLine[i]); Execution Count:279512 | 279512 |
674 | #endif | - |
675 | return buffer; executed: return buffer; Execution Count:4124 | 4124 |
676 | } | - |
677 | | - |
678 | // blendType is either BlendTransformed or BlendTransformedTiled | - |
679 | template<TextureBlendType blendType> | - |
680 | static const uint *QT_FASTCALL fetchTransformedARGB32PM(uint *buffer, const Operator *, const QSpanData *data, | - |
681 | int y, int x, int length) | - |
682 | { | - |
683 | int image_width = data->texture.width; never executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
684 | int image_height = data->texture.height; never executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
685 | | - |
686 | const qreal cx = x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = x + qreal(0.5); | - |
687 | const qreal cy = y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = y + qreal(0.5); | - |
688 | | - |
689 | const uint *end = buffer + length; never executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
690 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
691 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
692 | // The increment pr x in the scanline | - |
693 | int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
694 | int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
695 | | - |
696 | int fx = int((data->m21 * cy never executed (the execution status of this line is deduced): int fx = int((data->m21 * cy | - |
697 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
698 | int fy = int((data->m22 * cy never executed (the execution status of this line is deduced): int fy = int((data->m22 * cy | - |
699 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
700 | | - |
701 | while (b < end) { | 0 |
702 | int px = fx >> 16; never executed (the execution status of this line is deduced): int px = fx >> 16; | - |
703 | int py = fy >> 16; never executed (the execution status of this line is deduced): int py = fy >> 16; | - |
704 | | - |
705 | if (blendType == BlendTransformedTiled) { never evaluated: blendType == BlendTransformedTiled | 0 |
706 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
707 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
708 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
709 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
710 | } else { | 0 |
711 | px = qBound(0, px, image_width - 1); never executed (the execution status of this line is deduced): px = qBound(0, px, image_width - 1); | - |
712 | py = qBound(0, py, image_height - 1); never executed (the execution status of this line is deduced): py = qBound(0, py, image_height - 1); | - |
713 | } | 0 |
714 | *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]; | - |
715 | | - |
716 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
717 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
718 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
719 | } | 0 |
720 | } else { | 0 |
721 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
722 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
723 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
724 | | - |
725 | 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; | - |
726 | 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; | - |
727 | 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; | - |
728 | | - |
729 | while (b < end) { | 0 |
730 | const qreal iw = fw == 0 ? 1 : 1 / fw; | 0 |
731 | const qreal tx = fx * iw; never executed (the execution status of this line is deduced): const qreal tx = fx * iw; | - |
732 | const qreal ty = fy * iw; never executed (the execution status of this line is deduced): const qreal ty = fy * iw; | - |
733 | int px = int(tx) - (tx < 0); never executed (the execution status of this line is deduced): int px = int(tx) - (tx < 0); | - |
734 | int py = int(ty) - (ty < 0); never executed (the execution status of this line is deduced): int py = int(ty) - (ty < 0); | - |
735 | | - |
736 | if (blendType == BlendTransformedTiled) { never evaluated: blendType == BlendTransformedTiled | 0 |
737 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
738 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
739 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
740 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
741 | } else { | 0 |
742 | px = qBound(0, px, image_width - 1); never executed (the execution status of this line is deduced): px = qBound(0, px, image_width - 1); | - |
743 | py = qBound(0, py, image_height - 1); never executed (the execution status of this line is deduced): py = qBound(0, py, image_height - 1); | - |
744 | } | 0 |
745 | *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]; | - |
746 | | - |
747 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
748 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
749 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
750 | //force increment to avoid /0 | - |
751 | if (!fw) { | 0 |
752 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
753 | } | 0 |
754 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
755 | } | 0 |
756 | } | 0 |
757 | return buffer; never executed: return buffer; | 0 |
758 | } | - |
759 | | - |
760 | template<TextureBlendType blendType> /* either BlendTransformed or BlendTransformedTiled */ | - |
761 | static const uint *QT_FASTCALL fetchTransformed(uint *buffer, const Operator *, const QSpanData *data, | - |
762 | int y, int x, int length) | - |
763 | { | - |
764 | int image_width = data->texture.width; executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
765 | int image_height = data->texture.height; executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
766 | | - |
767 | const qreal cx = x + qreal(0.5); executed (the execution status of this line is deduced): const qreal cx = x + qreal(0.5); | - |
768 | const qreal cy = y + qreal(0.5); executed (the execution status of this line is deduced): const qreal cy = y + qreal(0.5); | - |
769 | | - |
770 | const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; | - |
771 | FetchPixelFunc fetch = qFetchPixel[layout->bpp]; executed (the execution status of this line is deduced): FetchPixelFunc fetch = qFetchPixel[layout->bpp]; | - |
772 | | - |
773 | const uint *end = buffer + length; executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
774 | uint *b = buffer; executed (the execution status of this line is deduced): uint *b = buffer; | - |
775 | if (data->fast_matrix) { partially evaluated: data->fast_matrix yes Evaluation Count:73 | no Evaluation Count:0 |
| 0-73 |
776 | // The increment pr x in the scanline | - |
777 | int fdx = (int)(data->m11 * fixed_scale); executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
778 | int fdy = (int)(data->m12 * fixed_scale); executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
779 | | - |
780 | int fx = int((data->m21 * cy executed (the execution status of this line is deduced): int fx = int((data->m21 * cy | - |
781 | + data->m11 * cx + data->dx) * fixed_scale); executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
782 | int fy = int((data->m22 * cy executed (the execution status of this line is deduced): int fy = int((data->m22 * cy | - |
783 | + data->m12 * cx + data->dy) * fixed_scale); executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
784 | | - |
785 | while (b < end) { evaluated: b < end yes Evaluation Count:2129 | yes Evaluation Count:73 |
| 73-2129 |
786 | int px = fx >> 16; executed (the execution status of this line is deduced): int px = fx >> 16; | - |
787 | int py = fy >> 16; executed (the execution status of this line is deduced): int py = fy >> 16; | - |
788 | | - |
789 | if (blendType == BlendTransformedTiled) { partially evaluated: blendType == BlendTransformedTiled no Evaluation Count:0 | yes Evaluation Count:2129 |
| 0-2129 |
790 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
791 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
792 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
793 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
794 | } else { | 0 |
795 | px = qBound(0, px, image_width - 1); executed (the execution status of this line is deduced): px = qBound(0, px, image_width - 1); | - |
796 | py = qBound(0, py, image_height - 1); executed (the execution status of this line is deduced): py = qBound(0, py, image_height - 1); | - |
797 | } executed: } Execution Count:2129 | 2129 |
798 | *b = fetch(data->texture.scanLine(py), px); executed (the execution status of this line is deduced): *b = fetch(data->texture.scanLine(py), px); | - |
799 | | - |
800 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
801 | fy += fdy; executed (the execution status of this line is deduced): fy += fdy; | - |
802 | ++b; executed (the execution status of this line is deduced): ++b; | - |
803 | } executed: } Execution Count:2129 | 2129 |
804 | } else { executed: } Execution Count:73 | 73 |
805 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
806 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
807 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
808 | | - |
809 | 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; | - |
810 | 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; | - |
811 | 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; | - |
812 | | - |
813 | while (b < end) { | 0 |
814 | const qreal iw = fw == 0 ? 1 : 1 / fw; | 0 |
815 | const qreal tx = fx * iw; never executed (the execution status of this line is deduced): const qreal tx = fx * iw; | - |
816 | const qreal ty = fy * iw; never executed (the execution status of this line is deduced): const qreal ty = fy * iw; | - |
817 | int px = int(tx) - (tx < 0); never executed (the execution status of this line is deduced): int px = int(tx) - (tx < 0); | - |
818 | int py = int(ty) - (ty < 0); never executed (the execution status of this line is deduced): int py = int(ty) - (ty < 0); | - |
819 | | - |
820 | if (blendType == BlendTransformedTiled) { never evaluated: blendType == BlendTransformedTiled | 0 |
821 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
822 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
823 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
824 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
825 | } else { | 0 |
826 | px = qBound(0, px, image_width - 1); never executed (the execution status of this line is deduced): px = qBound(0, px, image_width - 1); | - |
827 | py = qBound(0, py, image_height - 1); never executed (the execution status of this line is deduced): py = qBound(0, py, image_height - 1); | - |
828 | } | 0 |
829 | *b = fetch(data->texture.scanLine(py), px); never executed (the execution status of this line is deduced): *b = fetch(data->texture.scanLine(py), px); | - |
830 | | - |
831 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
832 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
833 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
834 | //force increment to avoid /0 | - |
835 | if (!fw) { | 0 |
836 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
837 | } | 0 |
838 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
839 | } | 0 |
840 | } | 0 |
841 | 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 |
842 | return layout->convertToARGB32PM(buffer, buffer, length, layout, clut); executed: return layout->convertToARGB32PM(buffer, buffer, length, layout, clut); Execution Count:73 | 73 |
843 | } | - |
844 | | - |
845 | /** \internal | - |
846 | interpolate 4 argb pixels with the distx and disty factor. | - |
847 | distx and disty bust be between 0 and 16 | - |
848 | */ | - |
849 | static inline uint interpolate_4_pixels_16(uint tl, uint tr, uint bl, uint br, int distx, int disty) | - |
850 | { | - |
851 | uint distxy = distx * disty; executed (the execution status of this line is deduced): uint distxy = distx * disty; | - |
852 | //idistx * disty = (16-distx) * disty = 16*disty - distxy | - |
853 | //idistx * idisty = (16-distx) * (16-disty) = 16*16 - 16*distx -16*dity + distxy | - |
854 | 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); | - |
855 | 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); | - |
856 | uint trrb = ((tr & 0x00ff00ff) * (distx*16 - distxy)); executed (the execution status of this line is deduced): uint trrb = ((tr & 0x00ff00ff) * (distx*16 - distxy)); | - |
857 | 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)); | - |
858 | uint blrb = ((bl & 0x00ff00ff) * (disty*16 - distxy)); executed (the execution status of this line is deduced): uint blrb = ((bl & 0x00ff00ff) * (disty*16 - distxy)); | - |
859 | 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)); | - |
860 | uint brrb = ((br & 0x00ff00ff) * (distxy)); executed (the execution status of this line is deduced): uint brrb = ((br & 0x00ff00ff) * (distxy)); | - |
861 | uint brag = (((br & 0xff00ff00) >> 8) * (distxy)); executed (the execution status of this line is deduced): uint brag = (((br & 0xff00ff00) >> 8) * (distxy)); | - |
862 | 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 |
863 | } | - |
864 | | - |
865 | #if defined(__SSE2__) | - |
866 | #define interpolate_4_pixels_16_sse2(tl, tr, bl, br, distx, disty, colorMask, v_256, b) \ | - |
867 | { \ | - |
868 | const __m128i dxdy = _mm_mullo_epi16 (distx, disty); \ | - |
869 | const __m128i distx_ = _mm_slli_epi16(distx, 4); \ | - |
870 | const __m128i disty_ = _mm_slli_epi16(disty, 4); \ | - |
871 | const __m128i idxidy = _mm_add_epi16(dxdy, _mm_sub_epi16(v_256, _mm_add_epi16(distx_, disty_))); \ | - |
872 | const __m128i dxidy = _mm_sub_epi16(distx_, dxdy); \ | - |
873 | const __m128i idxdy = _mm_sub_epi16(disty_, dxdy); \ | - |
874 | \ | - |
875 | __m128i tlAG = _mm_srli_epi16(tl, 8); \ | - |
876 | __m128i tlRB = _mm_and_si128(tl, colorMask); \ | - |
877 | __m128i trAG = _mm_srli_epi16(tr, 8); \ | - |
878 | __m128i trRB = _mm_and_si128(tr, colorMask); \ | - |
879 | __m128i blAG = _mm_srli_epi16(bl, 8); \ | - |
880 | __m128i blRB = _mm_and_si128(bl, colorMask); \ | - |
881 | __m128i brAG = _mm_srli_epi16(br, 8); \ | - |
882 | __m128i brRB = _mm_and_si128(br, colorMask); \ | - |
883 | \ | - |
884 | tlAG = _mm_mullo_epi16(tlAG, idxidy); \ | - |
885 | tlRB = _mm_mullo_epi16(tlRB, idxidy); \ | - |
886 | trAG = _mm_mullo_epi16(trAG, dxidy); \ | - |
887 | trRB = _mm_mullo_epi16(trRB, dxidy); \ | - |
888 | blAG = _mm_mullo_epi16(blAG, idxdy); \ | - |
889 | blRB = _mm_mullo_epi16(blRB, idxdy); \ | - |
890 | brAG = _mm_mullo_epi16(brAG, dxdy); \ | - |
891 | brRB = _mm_mullo_epi16(brRB, dxdy); \ | - |
892 | \ | - |
893 | /* Add the values, and shift to only keep 8 significant bits per colors */ \ | - |
894 | __m128i rAG =_mm_add_epi16(_mm_add_epi16(tlAG, trAG), _mm_add_epi16(blAG, brAG)); \ | - |
895 | __m128i rRB =_mm_add_epi16(_mm_add_epi16(tlRB, trRB), _mm_add_epi16(blRB, brRB)); \ | - |
896 | rAG = _mm_andnot_si128(colorMask, rAG); \ | - |
897 | rRB = _mm_srli_epi16(rRB, 8); \ | - |
898 | _mm_storeu_si128((__m128i*)(b), _mm_or_si128(rAG, rRB)); \ | - |
899 | } | - |
900 | #endif | - |
901 | | - |
902 | #if defined(__ARM_NEON__) | - |
903 | #define interpolate_4_pixels_16_neon(tl, tr, bl, br, distx, disty, disty_, colorMask, invColorMask, v_256, b) \ | - |
904 | { \ | - |
905 | const int16x8_t dxdy = vmulq_s16(distx, disty); \ | - |
906 | const int16x8_t distx_ = vshlq_n_s16(distx, 4); \ | - |
907 | const int16x8_t idxidy = vaddq_s16(dxdy, vsubq_s16(v_256, vaddq_s16(distx_, disty_))); \ | - |
908 | const int16x8_t dxidy = vsubq_s16(distx_, dxdy); \ | - |
909 | const int16x8_t idxdy = vsubq_s16(disty_, dxdy); \ | - |
910 | \ | - |
911 | int16x8_t tlAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tl), 8)); \ | - |
912 | int16x8_t tlRB = vandq_s16(tl, colorMask); \ | - |
913 | int16x8_t trAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tr), 8)); \ | - |
914 | int16x8_t trRB = vandq_s16(tr, colorMask); \ | - |
915 | int16x8_t blAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bl), 8)); \ | - |
916 | int16x8_t blRB = vandq_s16(bl, colorMask); \ | - |
917 | int16x8_t brAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(br), 8)); \ | - |
918 | int16x8_t brRB = vandq_s16(br, colorMask); \ | - |
919 | \ | - |
920 | int16x8_t rAG = vmulq_s16(tlAG, idxidy); \ | - |
921 | int16x8_t rRB = vmulq_s16(tlRB, idxidy); \ | - |
922 | rAG = vmlaq_s16(rAG, trAG, dxidy); \ | - |
923 | rRB = vmlaq_s16(rRB, trRB, dxidy); \ | - |
924 | rAG = vmlaq_s16(rAG, blAG, idxdy); \ | - |
925 | rRB = vmlaq_s16(rRB, blRB, idxdy); \ | - |
926 | rAG = vmlaq_s16(rAG, brAG, dxdy); \ | - |
927 | rRB = vmlaq_s16(rRB, brRB, dxdy); \ | - |
928 | \ | - |
929 | rAG = vandq_s16(invColorMask, rAG); \ | - |
930 | rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8)); \ | - |
931 | vst1q_s16((int16_t*)(b), vorrq_s16(rAG, rRB)); \ | - |
932 | } | - |
933 | #endif | - |
934 | | - |
935 | template<TextureBlendType blendType> | - |
936 | void fetchTransformedBilinear_pixelBounds(int max, int l1, int l2, int &v1, int &v2); | - |
937 | | - |
938 | template<> | - |
939 | inline void fetchTransformedBilinear_pixelBounds<BlendTransformedBilinearTiled>(int max, int, int, int &v1, int &v2) | - |
940 | { | - |
941 | v1 %= max; executed (the execution status of this line is deduced): v1 %= max; | - |
942 | if (v1 < 0) evaluated: v1 < 0 yes Evaluation Count:10780 | yes Evaluation Count:13422 |
| 10780-13422 |
943 | v1 += max; executed: v1 += max; Execution Count:10780 | 10780 |
944 | v2 = v1 + 1; executed (the execution status of this line is deduced): v2 = v1 + 1; | - |
945 | if (v2 == max) evaluated: v2 == max yes Evaluation Count:3300 | yes Evaluation Count:20902 |
| 3300-20902 |
946 | v2 = 0; executed: v2 = 0; Execution Count:3300 | 3300 |
947 | Q_ASSERT(v1 >= 0 && v1 < max); executed (the execution status of this line is deduced): qt_noop(); | - |
948 | Q_ASSERT(v2 >= 0 && v2 < max); executed (the execution status of this line is deduced): qt_noop(); | - |
949 | } executed: } Execution Count:24202 | 24202 |
950 | | - |
951 | template<> | - |
952 | inline void fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(int, int l1, int l2, int &v1, int &v2) | - |
953 | { | - |
954 | if (v1 < l1) evaluated: v1 < l1 yes Evaluation Count:2219 | yes Evaluation Count:253099 |
| 2219-253099 |
955 | v2 = v1 = l1; executed: v2 = v1 = l1; Execution Count:2219 | 2219 |
956 | else if (v1 >= l2) evaluated: v1 >= l2 yes Evaluation Count:1568 | yes Evaluation Count:251531 |
| 1568-251531 |
957 | v2 = v1 = l2; executed: v2 = v1 = l2; Execution Count:1568 | 1568 |
958 | else | - |
959 | v2 = v1 + 1; executed: v2 = v1 + 1; Execution Count:251531 | 251531 |
960 | Q_ASSERT(v1 >= l1 && v1 <= l2); executed (the execution status of this line is deduced): qt_noop(); | - |
961 | Q_ASSERT(v2 >= l1 && v2 <= l2); executed (the execution status of this line is deduced): qt_noop(); | - |
962 | } executed: } Execution Count:255318 | 255318 |
963 | | - |
964 | template<TextureBlendType blendType> /* blendType = BlendTransformedBilinear or BlendTransformedBilinearTiled */ | - |
965 | static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, const Operator *, | - |
966 | const QSpanData *data, int y, int x, | - |
967 | int length) | - |
968 | { | - |
969 | int image_width = data->texture.width; executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
970 | int image_height = data->texture.height; executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
971 | | - |
972 | int image_x1 = data->texture.x1; executed (the execution status of this line is deduced): int image_x1 = data->texture.x1; | - |
973 | int image_y1 = data->texture.y1; executed (the execution status of this line is deduced): int image_y1 = data->texture.y1; | - |
974 | int image_x2 = data->texture.x2 - 1; executed (the execution status of this line is deduced): int image_x2 = data->texture.x2 - 1; | - |
975 | int image_y2 = data->texture.y2 - 1; executed (the execution status of this line is deduced): int image_y2 = data->texture.y2 - 1; | - |
976 | | - |
977 | const qreal cx = x + qreal(0.5); executed (the execution status of this line is deduced): const qreal cx = x + qreal(0.5); | - |
978 | const qreal cy = y + qreal(0.5); executed (the execution status of this line is deduced): const qreal cy = y + qreal(0.5); | - |
979 | | - |
980 | uint *end = buffer + length; executed (the execution status of this line is deduced): uint *end = buffer + length; | - |
981 | uint *b = buffer; executed (the execution status of this line is deduced): uint *b = buffer; | - |
982 | if (data->fast_matrix) { evaluated: data->fast_matrix yes Evaluation Count:1606 | yes Evaluation Count:583 |
| 583-1606 |
983 | // The increment pr x in the scanline | - |
984 | int fdx = (int)(data->m11 * fixed_scale); executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
985 | int fdy = (int)(data->m12 * fixed_scale); executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
986 | | - |
987 | int fx = int((data->m21 * cy executed (the execution status of this line is deduced): int fx = int((data->m21 * cy | - |
988 | + data->m11 * cx + data->dx) * fixed_scale); executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
989 | int fy = int((data->m22 * cy executed (the execution status of this line is deduced): int fy = int((data->m22 * cy | - |
990 | + data->m12 * cx + data->dy) * fixed_scale); executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
991 | | - |
992 | fx -= half_point; executed (the execution status of this line is deduced): fx -= half_point; | - |
993 | fy -= half_point; executed (the execution status of this line is deduced): fy -= half_point; | - |
994 | | - |
995 | if (fdy == 0) { //simple scale, no rotation evaluated: fdy == 0 yes Evaluation Count:994 | yes Evaluation Count:612 |
| 612-994 |
996 | int y1 = (fy >> 16); executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
997 | int y2; executed (the execution status of this line is deduced): int y2; | - |
998 | 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); | - |
999 | 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); | - |
1000 | 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); | - |
1001 | | - |
1002 | 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 |
1003 | int disty = (fy & 0x0000ffff) >> 8; executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1004 | int idisty = 256 - disty; executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1005 | int x = fx >> 16; executed (the execution status of this line is deduced): int x = fx >> 16; | - |
1006 | | - |
1007 | // The idea is first to do the interpolation between the row s1 and the row s2 | - |
1008 | // into an intermediate buffer, then we interpolate between two pixel of this buffer. | - |
1009 | | - |
1010 | // intermediate_buffer[0] is a buffer of red-blue component of the pixel, in the form 0x00RR00BB | - |
1011 | // intermediate_buffer[1] is the alpha-green component of the pixel, in the form 0x00AA00GG | - |
1012 | quint32 intermediate_buffer[2][buffer_size + 2]; executed (the execution status of this line is deduced): quint32 intermediate_buffer[2][buffer_size + 2]; | - |
1013 | // count is the size used in the intermediate_buffer. | - |
1014 | 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; | - |
1015 | 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(); | - |
1016 | int f = 0; executed (the execution status of this line is deduced): int f = 0; | - |
1017 | int lim = count; executed (the execution status of this line is deduced): int lim = count; | - |
1018 | if (blendType == BlendTransformedBilinearTiled) { partially evaluated: blendType == BlendTransformedBilinearTiled no Evaluation Count:0 | yes Evaluation Count:802 |
| 0-802 |
1019 | x %= image_width; never executed (the execution status of this line is deduced): x %= image_width; | - |
1020 | if (x < 0) x += image_width; never executed: x += image_width; never evaluated: x < 0 | 0 |
1021 | } else { | 0 |
1022 | lim = qMin(count, image_x2-x+1); executed (the execution status of this line is deduced): lim = qMin(count, image_x2-x+1); | - |
1023 | if (x < image_x1) { partially evaluated: x < image_x1 yes Evaluation Count:802 | no Evaluation Count:0 |
| 0-802 |
1024 | Q_ASSERT(x <= image_x2); executed (the execution status of this line is deduced): qt_noop(); | - |
1025 | uint t = s1[image_x1]; executed (the execution status of this line is deduced): uint t = s1[image_x1]; | - |
1026 | uint b = s2[image_x1]; executed (the execution status of this line is deduced): uint b = s2[image_x1]; | - |
1027 | 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; | - |
1028 | 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; | - |
1029 | do { | - |
1030 | intermediate_buffer[0][f] = rb; executed (the execution status of this line is deduced): intermediate_buffer[0][f] = rb; | - |
1031 | intermediate_buffer[1][f] = ag; executed (the execution status of this line is deduced): intermediate_buffer[1][f] = ag; | - |
1032 | f++; executed (the execution status of this line is deduced): f++; | - |
1033 | x++; executed (the execution status of this line is deduced): x++; | - |
1034 | } 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 |
1035 | } executed: } Execution Count:802 | 802 |
1036 | } executed: } Execution Count:802 | 802 |
1037 | | - |
1038 | if (blendType != BlendTransformedBilinearTiled) { partially evaluated: blendType != BlendTransformedBilinearTiled yes Evaluation Count:802 | no Evaluation Count:0 |
| 0-802 |
1039 | #if defined(__SSE2__) | - |
1040 | const __m128i disty_ = _mm_set1_epi16(disty); executed (the execution status of this line is deduced): const __m128i disty_ = _mm_set1_epi16(disty); | - |
1041 | const __m128i idisty_ = _mm_set1_epi16(idisty); executed (the execution status of this line is deduced): const __m128i idisty_ = _mm_set1_epi16(idisty); | - |
1042 | const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); executed (the execution status of this line is deduced): const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); | - |
1043 | | - |
1044 | lim -= 3; executed (the execution status of this line is deduced): lim -= 3; | - |
1045 | for (; f < lim; x += 4, f += 4) { evaluated: f < lim yes Evaluation Count:15770 | yes Evaluation Count:802 |
| 802-15770 |
1046 | // Load 4 pixels from s1, and split the alpha-green and red-blue component | - |
1047 | __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)); | - |
1048 | __m128i topAG = _mm_srli_epi16(top, 8); executed (the execution status of this line is deduced): __m128i topAG = _mm_srli_epi16(top, 8); | - |
1049 | __m128i topRB = _mm_and_si128(top, colorMask); executed (the execution status of this line is deduced): __m128i topRB = _mm_and_si128(top, colorMask); | - |
1050 | // Multiplies each colour component by idisty | - |
1051 | topAG = _mm_mullo_epi16 (topAG, idisty_); executed (the execution status of this line is deduced): topAG = _mm_mullo_epi16 (topAG, idisty_); | - |
1052 | topRB = _mm_mullo_epi16 (topRB, idisty_); executed (the execution status of this line is deduced): topRB = _mm_mullo_epi16 (topRB, idisty_); | - |
1053 | | - |
1054 | // Same for the s2 vector | - |
1055 | __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)); | - |
1056 | __m128i bottomAG = _mm_srli_epi16(bottom, 8); executed (the execution status of this line is deduced): __m128i bottomAG = _mm_srli_epi16(bottom, 8); | - |
1057 | __m128i bottomRB = _mm_and_si128(bottom, colorMask); executed (the execution status of this line is deduced): __m128i bottomRB = _mm_and_si128(bottom, colorMask); | - |
1058 | bottomAG = _mm_mullo_epi16 (bottomAG, disty_); executed (the execution status of this line is deduced): bottomAG = _mm_mullo_epi16 (bottomAG, disty_); | - |
1059 | bottomRB = _mm_mullo_epi16 (bottomRB, disty_); executed (the execution status of this line is deduced): bottomRB = _mm_mullo_epi16 (bottomRB, disty_); | - |
1060 | | - |
1061 | // Add the values, and shift to only keep 8 significant bits per colors | - |
1062 | __m128i rAG =_mm_add_epi16(topAG, bottomAG); executed (the execution status of this line is deduced): __m128i rAG =_mm_add_epi16(topAG, bottomAG); | - |
1063 | rAG = _mm_srli_epi16(rAG, 8); executed (the execution status of this line is deduced): rAG = _mm_srli_epi16(rAG, 8); | - |
1064 | _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); | - |
1065 | __m128i rRB =_mm_add_epi16(topRB, bottomRB); executed (the execution status of this line is deduced): __m128i rRB =_mm_add_epi16(topRB, bottomRB); | - |
1066 | rRB = _mm_srli_epi16(rRB, 8); executed (the execution status of this line is deduced): rRB = _mm_srli_epi16(rRB, 8); | - |
1067 | _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); | - |
1068 | } executed: } Execution Count:15770 | 15770 |
1069 | #elif defined(__ARM_NEON__) | - |
1070 | const int16x8_t disty_ = vdupq_n_s16(disty); | - |
1071 | const int16x8_t idisty_ = vdupq_n_s16(idisty); | - |
1072 | const int16x8_t colorMask = vdupq_n_s16(0x00ff); | - |
1073 | | - |
1074 | lim -= 3; | - |
1075 | for (; f < lim; x += 4, f += 4) { | - |
1076 | // Load 4 pixels from s1, and split the alpha-green and red-blue component | - |
1077 | int16x8_t top = vld1q_s16((int16_t*)((const uint *)(s1)+x)); | - |
1078 | int16x8_t topAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(top), 8)); | - |
1079 | int16x8_t topRB = vandq_s16(top, colorMask); | - |
1080 | // Multiplies each colour component by idisty | - |
1081 | topAG = vmulq_s16(topAG, idisty_); | - |
1082 | topRB = vmulq_s16(topRB, idisty_); | - |
1083 | | - |
1084 | // Same for the s2 vector | - |
1085 | int16x8_t bottom = vld1q_s16((int16_t*)((const uint *)(s2)+x)); | - |
1086 | int16x8_t bottomAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bottom), 8)); | - |
1087 | int16x8_t bottomRB = vandq_s16(bottom, colorMask); | - |
1088 | bottomAG = vmulq_s16(bottomAG, disty_); | - |
1089 | bottomRB = vmulq_s16(bottomRB, disty_); | - |
1090 | | - |
1091 | // Add the values, and shift to only keep 8 significant bits per colors | - |
1092 | int16x8_t rAG = vaddq_s16(topAG, bottomAG); | - |
1093 | rAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rAG), 8)); | - |
1094 | vst1q_s16((int16_t*)(&intermediate_buffer[1][f]), rAG); | - |
1095 | int16x8_t rRB = vaddq_s16(topRB, bottomRB); | - |
1096 | rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8)); | - |
1097 | vst1q_s16((int16_t*)(&intermediate_buffer[0][f]), rRB); | - |
1098 | } | - |
1099 | #endif | - |
1100 | } executed: } Execution Count:802 | 802 |
1101 | for (; f < count; f++) { // Same as above but without sse2 evaluated: f < count yes Evaluation Count:970 | yes Evaluation Count:802 |
| 802-970 |
1102 | if (blendType == BlendTransformedBilinearTiled) { partially evaluated: blendType == BlendTransformedBilinearTiled no Evaluation Count:0 | yes Evaluation Count:970 |
| 0-970 |
1103 | if (x >= image_width) x -= image_width; never executed: x -= image_width; never evaluated: x >= image_width | 0 |
1104 | } else { | 0 |
1105 | x = qMin(x, image_x2); executed (the execution status of this line is deduced): x = qMin(x, image_x2); | - |
1106 | } executed: } Execution Count:970 | 970 |
1107 | | - |
1108 | uint t = s1[x]; executed (the execution status of this line is deduced): uint t = s1[x]; | - |
1109 | uint b = s2[x]; executed (the execution status of this line is deduced): uint b = s2[x]; | - |
1110 | | - |
1111 | 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; | - |
1112 | 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; | - |
1113 | x++; executed (the execution status of this line is deduced): x++; | - |
1114 | } executed: } Execution Count:970 | 970 |
1115 | // Now interpolate the values from the intermediate_buffer to get the final result. | - |
1116 | fx &= fixed_scale - 1; executed (the execution status of this line is deduced): fx &= fixed_scale - 1; | - |
1117 | Q_ASSERT((fx >> 16) == 0); executed (the execution status of this line is deduced): qt_noop(); | - |
1118 | while (b < end) { evaluated: b < end yes Evaluation Count:138364 | yes Evaluation Count:802 |
| 802-138364 |
1119 | register int x1 = (fx >> 16); executed (the execution status of this line is deduced): register int x1 = (fx >> 16); | - |
1120 | register int x2 = x1 + 1; executed (the execution status of this line is deduced): register int x2 = x1 + 1; | - |
1121 | Q_ASSERT(x1 >= 0); executed (the execution status of this line is deduced): qt_noop(); | - |
1122 | Q_ASSERT(x2 < count); executed (the execution status of this line is deduced): qt_noop(); | - |
1123 | | - |
1124 | register int distx = (fx & 0x0000ffff) >> 8; executed (the execution status of this line is deduced): register int distx = (fx & 0x0000ffff) >> 8; | - |
1125 | register int idistx = 256 - distx; executed (the execution status of this line is deduced): register int idistx = 256 - distx; | - |
1126 | 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; | - |
1127 | 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; | - |
1128 | *b = rb | ag; executed (the execution status of this line is deduced): *b = rb | ag; | - |
1129 | b++; executed (the execution status of this line is deduced): b++; | - |
1130 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1131 | } executed: } Execution Count:138364 | 138364 |
1132 | } 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 |
1133 | int y1 = (fy >> 16); never executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1134 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1135 | 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); | - |
1136 | 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); | - |
1137 | 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); | - |
1138 | int disty = (fy & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1139 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1140 | while (b < end) { | 0 |
1141 | int x1 = (fx >> 16); never executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1142 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1143 | 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); | - |
1144 | uint tl = s1[x1]; never executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1145 | uint tr = s1[x2]; never executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1146 | uint bl = s2[x1]; never executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1147 | uint br = s2[x2]; never executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1148 | | - |
1149 | int distx = (fx & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int distx = (fx & 0x0000ffff) >> 8; | - |
1150 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1151 | | - |
1152 | 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); | - |
1153 | 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); | - |
1154 | *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); | - |
1155 | | - |
1156 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1157 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
1158 | } | 0 |
1159 | } else { //scale down | 0 |
1160 | int y1 = (fy >> 16); executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1161 | int y2; executed (the execution status of this line is deduced): int y2; | - |
1162 | 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); | - |
1163 | 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); | - |
1164 | 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); | - |
1165 | int disty = (fy & 0x0000ffff) >> 12; executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 12; | - |
1166 | | - |
1167 | if (blendType != BlendTransformedBilinearTiled) { partially evaluated: blendType != BlendTransformedBilinearTiled yes Evaluation Count:192 | no Evaluation Count:0 |
| 0-192 |
1168 | #define BILINEAR_DOWNSCALE_BOUNDS_PROLOG \ | - |
1169 | while (b < end) { \ | - |
1170 | int x1 = (fx >> 16); \ | - |
1171 | int x2; \ | - |
1172 | fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); \ | - |
1173 | if (x1 != x2) \ | - |
1174 | break; \ | - |
1175 | uint tl = s1[x1]; \ | - |
1176 | uint tr = s1[x2]; \ | - |
1177 | uint bl = s2[x1]; \ | - |
1178 | uint br = s2[x2]; \ | - |
1179 | int distx = (fx & 0x0000ffff) >> 12; \ | - |
1180 | *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); \ | - |
1181 | fx += fdx; \ | - |
1182 | ++b; \ | - |
1183 | } \ | - |
1184 | uint *boundedEnd; \ | - |
1185 | if (fdx > 0) \ | - |
1186 | boundedEnd = qMin(end, buffer + uint((image_x2 - (fx >> 16)) / data->m11)); \ | - |
1187 | else \ | - |
1188 | boundedEnd = qMin(end, buffer + uint((image_x1 - (fx >> 16)) / data->m11)); \ | - |
1189 | boundedEnd -= 3; | - |
1190 | | - |
1191 | #if defined(__SSE2__) | - |
1192 | 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 |
1193 | | - |
1194 | const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); executed (the execution status of this line is deduced): const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); | - |
1195 | 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); | - |
1196 | 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); | - |
1197 | __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); | - |
1198 | | - |
1199 | 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); | - |
1200 | | - |
1201 | 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]; }; | - |
1202 | Vect_buffer v_fx; executed (the execution status of this line is deduced): Vect_buffer v_fx; | - |
1203 | | - |
1204 | for (int i = 0; i < 4; i++) { evaluated: i < 4 yes Evaluation Count:768 | yes Evaluation Count:192 |
| 192-768 |
1205 | v_fx.i[i] = fx; executed (the execution status of this line is deduced): v_fx.i[i] = fx; | - |
1206 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1207 | } executed: } Execution Count:768 | 768 |
1208 | | - |
1209 | while (b < boundedEnd) { evaluated: b < boundedEnd yes Evaluation Count:4928 | yes Evaluation Count:192 |
| 192-4928 |
1210 | | - |
1211 | Vect_buffer tl, tr, bl, br; executed (the execution status of this line is deduced): Vect_buffer tl, tr, bl, br; | - |
1212 | | - |
1213 | for (int i = 0; i < 4; i++) { evaluated: i < 4 yes Evaluation Count:19712 | yes Evaluation Count:4928 |
| 4928-19712 |
1214 | int x1 = v_fx.i[i] >> 16; executed (the execution status of this line is deduced): int x1 = v_fx.i[i] >> 16; | - |
1215 | 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; | - |
1216 | const uint *addr_tr = addr_tl + 1; executed (the execution status of this line is deduced): const uint *addr_tr = addr_tl + 1; | - |
1217 | tl.i[i] = *addr_tl; executed (the execution status of this line is deduced): tl.i[i] = *addr_tl; | - |
1218 | tr.i[i] = *addr_tr; executed (the execution status of this line is deduced): tr.i[i] = *addr_tr; | - |
1219 | bl.i[i] = *(addr_tl+secondLine); executed (the execution status of this line is deduced): bl.i[i] = *(addr_tl+secondLine); | - |
1220 | br.i[i] = *(addr_tr+secondLine); executed (the execution status of this line is deduced): br.i[i] = *(addr_tr+secondLine); | - |
1221 | } executed: } Execution Count:19712 | 19712 |
1222 | __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); | - |
1223 | 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))); | - |
1224 | 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))); | - |
1225 | | - |
1226 | 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)); }; | - |
1227 | b+=4; executed (the execution status of this line is deduced): b+=4; | - |
1228 | 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); | - |
1229 | } executed: } Execution Count:4928 | 4928 |
1230 | fx = v_fx.i[0]; executed (the execution status of this line is deduced): fx = v_fx.i[0]; | - |
1231 | #elif defined(__ARM_NEON__) | - |
1232 | BILINEAR_DOWNSCALE_BOUNDS_PROLOG | - |
1233 | | - |
1234 | const int16x8_t colorMask = vdupq_n_s16(0x00ff); | - |
1235 | const int16x8_t invColorMask = vmvnq_s16(colorMask); | - |
1236 | const int16x8_t v_256 = vdupq_n_s16(256); | - |
1237 | const int16x8_t v_disty = vdupq_n_s16(disty); | - |
1238 | const int16x8_t v_disty_ = vshlq_n_s16(v_disty, 4); | - |
1239 | int32x4_t v_fdx = vdupq_n_s32(fdx*4); | - |
1240 | | - |
1241 | ptrdiff_t secondLine = reinterpret_cast<const uint *>(s2) - reinterpret_cast<const uint *>(s1); | - |
1242 | | - |
1243 | union Vect_buffer { int32x4_t vect; quint32 i[4]; }; | - |
1244 | Vect_buffer v_fx; | - |
1245 | | - |
1246 | for (int i = 0; i < 4; i++) { | - |
1247 | v_fx.i[i] = fx; | - |
1248 | fx += fdx; | - |
1249 | } | - |
1250 | | - |
1251 | const int32x4_t v_ffff_mask = vdupq_n_s32(0x0000ffff); | - |
1252 | | - |
1253 | while (b < boundedEnd) { | - |
1254 | | - |
1255 | Vect_buffer tl, tr, bl, br; | - |
1256 | | - |
1257 | Vect_buffer v_fx_shifted; | - |
1258 | v_fx_shifted.vect = vshrq_n_s32(v_fx.vect, 16); | - |
1259 | | - |
1260 | int32x4_t v_distx = vshrq_n_s32(vandq_s32(v_fx.vect, v_ffff_mask), 12); | - |
1261 | | - |
1262 | for (int i = 0; i < 4; i++) { | - |
1263 | int x1 = v_fx_shifted.i[i]; | - |
1264 | const uint *addr_tl = reinterpret_cast<const uint *>(s1) + x1; | - |
1265 | const uint *addr_tr = addr_tl + 1; | - |
1266 | tl.i[i] = *addr_tl; | - |
1267 | tr.i[i] = *addr_tr; | - |
1268 | bl.i[i] = *(addr_tl+secondLine); | - |
1269 | br.i[i] = *(addr_tr+secondLine); | - |
1270 | } | - |
1271 | | - |
1272 | v_distx = vorrq_s32(v_distx, vshlq_n_s32(v_distx, 16)); | - |
1273 | | - |
1274 | 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); | - |
1275 | b+=4; | - |
1276 | v_fx.vect = vaddq_s32(v_fx.vect, v_fdx); | - |
1277 | } | - |
1278 | fx = v_fx.i[0]; | - |
1279 | #endif | - |
1280 | } executed: } Execution Count:192 | 192 |
1281 | | - |
1282 | while (b < end) { evaluated: b < end yes Evaluation Count:768 | yes Evaluation Count:192 |
| 192-768 |
1283 | int x1 = (fx >> 16); executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1284 | int x2; executed (the execution status of this line is deduced): int x2; | - |
1285 | 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); | - |
1286 | uint tl = s1[x1]; executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1287 | uint tr = s1[x2]; executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1288 | uint bl = s2[x1]; executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1289 | uint br = s2[x2]; executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1290 | int distx = (fx & 0x0000ffff) >> 12; executed (the execution status of this line is deduced): int distx = (fx & 0x0000ffff) >> 12; | - |
1291 | *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); | - |
1292 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1293 | ++b; executed (the execution status of this line is deduced): ++b; | - |
1294 | } executed: } Execution Count:768 | 768 |
1295 | } executed: } Execution Count:192 | 192 |
1296 | } else { //rotation | - |
1297 | 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 |
1298 | //if we are zooming more than 8 times, we use 8bit precision for the position. | - |
1299 | while (b < end) { | 0 |
1300 | int x1 = (fx >> 16); never executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1301 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1302 | int y1 = (fy >> 16); never executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1303 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1304 | | - |
1305 | 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); | - |
1306 | 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); | - |
1307 | | - |
1308 | 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); | - |
1309 | 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); | - |
1310 | | - |
1311 | uint tl = s1[x1]; never executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1312 | uint tr = s1[x2]; never executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1313 | uint bl = s2[x1]; never executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1314 | uint br = s2[x2]; never executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1315 | | - |
1316 | int distx = (fx & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int distx = (fx & 0x0000ffff) >> 8; | - |
1317 | int disty = (fy & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1318 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1319 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1320 | | - |
1321 | 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); | - |
1322 | 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); | - |
1323 | *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); | - |
1324 | | - |
1325 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1326 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
1327 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
1328 | } | 0 |
1329 | } else { | 0 |
1330 | //we are zooming less than 8x, use 4bit precision | - |
1331 | while (b < end) { evaluated: b < end yes Evaluation Count:66174 | yes Evaluation Count:612 |
| 612-66174 |
1332 | int x1 = (fx >> 16); executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1333 | int x2; executed (the execution status of this line is deduced): int x2; | - |
1334 | int y1 = (fy >> 16); executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1335 | int y2; executed (the execution status of this line is deduced): int y2; | - |
1336 | | - |
1337 | 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); | - |
1338 | 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); | - |
1339 | | - |
1340 | 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); | - |
1341 | 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); | - |
1342 | | - |
1343 | uint tl = s1[x1]; executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1344 | uint tr = s1[x2]; executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1345 | uint bl = s2[x1]; executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1346 | uint br = s2[x2]; executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1347 | | - |
1348 | int distx = (fx & 0x0000ffff) >> 12; executed (the execution status of this line is deduced): int distx = (fx & 0x0000ffff) >> 12; | - |
1349 | int disty = (fy & 0x0000ffff) >> 12; executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 12; | - |
1350 | | - |
1351 | *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); | - |
1352 | | - |
1353 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1354 | fy += fdy; executed (the execution status of this line is deduced): fy += fdy; | - |
1355 | ++b; executed (the execution status of this line is deduced): ++b; | - |
1356 | } executed: } Execution Count:66174 | 66174 |
1357 | } executed: } Execution Count:612 | 612 |
1358 | } | - |
1359 | } else { | - |
1360 | const qreal fdx = data->m11; executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
1361 | const qreal fdy = data->m12; executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
1362 | const qreal fdw = data->m13; executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
1363 | | - |
1364 | 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; | - |
1365 | 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; | - |
1366 | 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; | - |
1367 | | - |
1368 | while (b < end) { evaluated: b < end yes Evaluation Count:72513 | yes Evaluation Count:583 |
| 583-72513 |
1369 | const qreal iw = fw == 0 ? 1 : 1 / fw; partially evaluated: fw == 0 no Evaluation Count:0 | yes Evaluation Count:72513 |
| 0-72513 |
1370 | 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); | - |
1371 | 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); | - |
1372 | | - |
1373 | int x1 = int(px) - (px < 0); executed (the execution status of this line is deduced): int x1 = int(px) - (px < 0); | - |
1374 | int x2; executed (the execution status of this line is deduced): int x2; | - |
1375 | int y1 = int(py) - (py < 0); executed (the execution status of this line is deduced): int y1 = int(py) - (py < 0); | - |
1376 | int y2; executed (the execution status of this line is deduced): int y2; | - |
1377 | | - |
1378 | int distx = int((px - x1) * 256); executed (the execution status of this line is deduced): int distx = int((px - x1) * 256); | - |
1379 | int disty = int((py - y1) * 256); executed (the execution status of this line is deduced): int disty = int((py - y1) * 256); | - |
1380 | int idistx = 256 - distx; executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1381 | int idisty = 256 - disty; executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1382 | | - |
1383 | 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); | - |
1384 | 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); | - |
1385 | | - |
1386 | 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); | - |
1387 | 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); | - |
1388 | | - |
1389 | uint tl = s1[x1]; executed (the execution status of this line is deduced): uint tl = s1[x1]; | - |
1390 | uint tr = s1[x2]; executed (the execution status of this line is deduced): uint tr = s1[x2]; | - |
1391 | uint bl = s2[x1]; executed (the execution status of this line is deduced): uint bl = s2[x1]; | - |
1392 | uint br = s2[x2]; executed (the execution status of this line is deduced): uint br = s2[x2]; | - |
1393 | | - |
1394 | 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); | - |
1395 | 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); | - |
1396 | *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); | - |
1397 | | - |
1398 | fx += fdx; executed (the execution status of this line is deduced): fx += fdx; | - |
1399 | fy += fdy; executed (the execution status of this line is deduced): fy += fdy; | - |
1400 | fw += fdw; executed (the execution status of this line is deduced): fw += fdw; | - |
1401 | //force increment to avoid /0 | - |
1402 | if (!fw) { partially evaluated: !fw no Evaluation Count:0 | yes Evaluation Count:72513 |
| 0-72513 |
1403 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
1404 | } | 0 |
1405 | ++b; executed (the execution status of this line is deduced): ++b; | - |
1406 | } executed: } Execution Count:72513 | 72513 |
1407 | } executed: } Execution Count:583 | 583 |
1408 | | - |
1409 | return buffer; executed: return buffer; Execution Count:2189 | 2189 |
1410 | } | - |
1411 | | - |
1412 | // blendType = BlendTransformedBilinear or BlendTransformedBilinearTiled | - |
1413 | template<TextureBlendType blendType> | - |
1414 | static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *, | - |
1415 | const QSpanData *data, int y, int x, int length) | - |
1416 | { | - |
1417 | const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; never executed (the execution status of this line is deduced): const QPixelLayout *layout = &qPixelLayouts[data->texture.format]; | - |
1418 | const QRgb *clut = data->texture.colorTable ? data->texture.colorTable->constData() : 0; never evaluated: data->texture.colorTable | 0 |
1419 | | - |
1420 | int image_width = data->texture.width; never executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
1421 | int image_height = data->texture.height; never executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
1422 | | - |
1423 | int image_x1 = data->texture.x1; never executed (the execution status of this line is deduced): int image_x1 = data->texture.x1; | - |
1424 | int image_y1 = data->texture.y1; never executed (the execution status of this line is deduced): int image_y1 = data->texture.y1; | - |
1425 | int image_x2 = data->texture.x2 - 1; never executed (the execution status of this line is deduced): int image_x2 = data->texture.x2 - 1; | - |
1426 | int image_y2 = data->texture.y2 - 1; never executed (the execution status of this line is deduced): int image_y2 = data->texture.y2 - 1; | - |
1427 | | - |
1428 | const qreal cx = x + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cx = x + qreal(0.5); | - |
1429 | const qreal cy = y + qreal(0.5); never executed (the execution status of this line is deduced): const qreal cy = y + qreal(0.5); | - |
1430 | | - |
1431 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
1432 | // The increment pr x in the scanline | - |
1433 | int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
1434 | int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
1435 | | - |
1436 | 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); | - |
1437 | 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); | - |
1438 | | - |
1439 | fx -= half_point; never executed (the execution status of this line is deduced): fx -= half_point; | - |
1440 | fy -= half_point; never executed (the execution status of this line is deduced): fy -= half_point; | - |
1441 | | - |
1442 | if (fdy == 0) { //simple scale, no rotation never evaluated: fdy == 0 | 0 |
1443 | int y1 = (fy >> 16); never executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1444 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1445 | 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); | - |
1446 | const uchar *s1 = data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const uchar *s1 = data->texture.scanLine(y1); | - |
1447 | const uchar *s2 = data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const uchar *s2 = data->texture.scanLine(y2); | - |
1448 | | - |
1449 | if (fdx <= fixed_scale && fdx > 0) { // scale up on X never evaluated: fdx <= fixed_scale never evaluated: fdx > 0 | 0 |
1450 | int disty = (fy & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1451 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1452 | int x = fx >> 16; never executed (the execution status of this line is deduced): int x = fx >> 16; | - |
1453 | | - |
1454 | // The idea is first to do the interpolation between the row s1 and the row s2 | - |
1455 | // into an intermediate buffer, then we interpolate between two pixel of this buffer. | - |
1456 | FetchPixelsFunc fetch = qFetchPixels[layout->bpp]; never executed (the execution status of this line is deduced): FetchPixelsFunc fetch = qFetchPixels[layout->bpp]; | - |
1457 | uint buf1[buffer_size + 2]; never executed (the execution status of this line is deduced): uint buf1[buffer_size + 2]; | - |
1458 | uint buf2[buffer_size + 2]; never executed (the execution status of this line is deduced): uint buf2[buffer_size + 2]; | - |
1459 | const uint *ptr1; never executed (the execution status of this line is deduced): const uint *ptr1; | - |
1460 | const uint *ptr2; never executed (the execution status of this line is deduced): const uint *ptr2; | - |
1461 | | - |
1462 | 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; | - |
1463 | 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(); | - |
1464 | | - |
1465 | if (blendType == BlendTransformedBilinearTiled) { never evaluated: blendType == BlendTransformedBilinearTiled | 0 |
1466 | x %= image_width; never executed (the execution status of this line is deduced): x %= image_width; | - |
1467 | if (x < 0) | 0 |
1468 | x += image_width; never executed: x += image_width; | 0 |
1469 | int len1 = qMin(count, image_width - x); never executed (the execution status of this line is deduced): int len1 = qMin(count, image_width - x); | - |
1470 | int len2 = qMin(x, count - len1); never executed (the execution status of this line is deduced): int len2 = qMin(x, count - len1); | - |
1471 | | - |
1472 | ptr1 = fetch(buf1, s1, x, len1); never executed (the execution status of this line is deduced): ptr1 = fetch(buf1, s1, x, len1); | - |
1473 | 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); | - |
1474 | ptr2 = fetch(buf2, s2, x, len1); never executed (the execution status of this line is deduced): ptr2 = fetch(buf2, s2, x, len1); | - |
1475 | 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); | - |
1476 | for (int i = 0; i < len1; ++i) { never evaluated: i < len1 | 0 |
1477 | uint t = ptr1[i]; never executed (the execution status of this line is deduced): uint t = ptr1[i]; | - |
1478 | uint b = ptr2[i]; never executed (the execution status of this line is deduced): uint b = ptr2[i]; | - |
1479 | 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; | - |
1480 | 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; | - |
1481 | } | 0 |
1482 | | - |
1483 | if (len2) { | 0 |
1484 | ptr1 = fetch(buf1 + len1, s1, 0, len2); never executed (the execution status of this line is deduced): ptr1 = fetch(buf1 + len1, s1, 0, len2); | - |
1485 | 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); | - |
1486 | ptr2 = fetch(buf2 + len1, s2, 0, len2); never executed (the execution status of this line is deduced): ptr2 = fetch(buf2 + len1, s2, 0, len2); | - |
1487 | 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); | - |
1488 | for (int i = 0; i < len2; ++i) { never evaluated: i < len2 | 0 |
1489 | uint t = ptr1[i]; never executed (the execution status of this line is deduced): uint t = ptr1[i]; | - |
1490 | uint b = ptr2[i]; never executed (the execution status of this line is deduced): uint b = ptr2[i]; | - |
1491 | 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; | - |
1492 | 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; | - |
1493 | } | 0 |
1494 | } | 0 |
1495 | for (int i = image_width; i < count; ++i) { never evaluated: i < count | 0 |
1496 | buf1[i] = buf1[i - image_width]; never executed (the execution status of this line is deduced): buf1[i] = buf1[i - image_width]; | - |
1497 | buf2[i] = buf2[i - image_width]; never executed (the execution status of this line is deduced): buf2[i] = buf2[i - image_width]; | - |
1498 | } | 0 |
1499 | } else { | 0 |
1500 | int start = qMax(x, image_x1); never executed (the execution status of this line is deduced): int start = qMax(x, image_x1); | - |
1501 | 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); | - |
1502 | int len = qMax(1, end - start); never executed (the execution status of this line is deduced): int len = qMax(1, end - start); | - |
1503 | int leading = start - x; never executed (the execution status of this line is deduced): int leading = start - x; | - |
1504 | | - |
1505 | ptr1 = fetch(buf1 + leading, s1, start, len); never executed (the execution status of this line is deduced): ptr1 = fetch(buf1 + leading, s1, start, len); | - |
1506 | 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); | - |
1507 | ptr2 = fetch(buf2 + leading, s2, start, len); never executed (the execution status of this line is deduced): ptr2 = fetch(buf2 + leading, s2, start, len); | - |
1508 | 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); | - |
1509 | | - |
1510 | for (int i = 0; i < len; ++i) { | 0 |
1511 | uint t = ptr1[i]; never executed (the execution status of this line is deduced): uint t = ptr1[i]; | - |
1512 | uint b = ptr2[i]; never executed (the execution status of this line is deduced): uint b = ptr2[i]; | - |
1513 | 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; | - |
1514 | 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; | - |
1515 | } | 0 |
1516 | | - |
1517 | for (int i = 0; i < leading; ++i) { never evaluated: i < leading | 0 |
1518 | buf1[i] = buf1[leading]; never executed (the execution status of this line is deduced): buf1[i] = buf1[leading]; | - |
1519 | buf2[i] = buf2[leading]; never executed (the execution status of this line is deduced): buf2[i] = buf2[leading]; | - |
1520 | } | 0 |
1521 | for (int i = leading + len; i < count; ++i) { never evaluated: i < count | 0 |
1522 | buf1[i] = buf1[i - 1]; never executed (the execution status of this line is deduced): buf1[i] = buf1[i - 1]; | - |
1523 | buf2[i] = buf2[i - 1]; never executed (the execution status of this line is deduced): buf2[i] = buf2[i - 1]; | - |
1524 | } | 0 |
1525 | } | 0 |
1526 | | - |
1527 | // Now interpolate the values from the intermediate_buffer to get the final result. | - |
1528 | fx &= fixed_scale - 1; never executed (the execution status of this line is deduced): fx &= fixed_scale - 1; | - |
1529 | Q_ASSERT((fx >> 16) == 0); never executed (the execution status of this line is deduced): qt_noop(); | - |
1530 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
1531 | register int x1 = (fx >> 16); never executed (the execution status of this line is deduced): register int x1 = (fx >> 16); | - |
1532 | register int x2 = x1 + 1; never executed (the execution status of this line is deduced): register int x2 = x1 + 1; | - |
1533 | Q_ASSERT(x1 >= 0); never executed (the execution status of this line is deduced): qt_noop(); | - |
1534 | Q_ASSERT(x2 < count); never executed (the execution status of this line is deduced): qt_noop(); | - |
1535 | | - |
1536 | register int distx = (fx & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): register int distx = (fx & 0x0000ffff) >> 8; | - |
1537 | register int idistx = 256 - distx; never executed (the execution status of this line is deduced): register int idistx = 256 - distx; | - |
1538 | 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; | - |
1539 | 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; | - |
1540 | buffer[i] = rb | ag; never executed (the execution status of this line is deduced): buffer[i] = rb | ag; | - |
1541 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1542 | } | 0 |
1543 | } else { | 0 |
1544 | FetchPixelFunc fetch = qFetchPixel[layout->bpp]; never executed (the execution status of this line is deduced): FetchPixelFunc fetch = qFetchPixel[layout->bpp]; | - |
1545 | uint buf1[buffer_size]; never executed (the execution status of this line is deduced): uint buf1[buffer_size]; | - |
1546 | uint buf2[buffer_size]; never executed (the execution status of this line is deduced): uint buf2[buffer_size]; | - |
1547 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
1548 | while (length) { | 0 |
1549 | int len = qMin(length, buffer_size / 2); never executed (the execution status of this line is deduced): int len = qMin(length, buffer_size / 2); | - |
1550 | int fracX = fx; never executed (the execution status of this line is deduced): int fracX = fx; | - |
1551 | for (int i = 0; i < len; ++i) { | 0 |
1552 | int x1 = (fx >> 16); never executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1553 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1554 | 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); | - |
1555 | | - |
1556 | buf1[i * 2 + 0] = fetch(s1, x1); never executed (the execution status of this line is deduced): buf1[i * 2 + 0] = fetch(s1, x1); | - |
1557 | buf1[i * 2 + 1] = fetch(s1, x2); never executed (the execution status of this line is deduced): buf1[i * 2 + 1] = fetch(s1, x2); | - |
1558 | buf2[i * 2 + 0] = fetch(s2, x1); never executed (the execution status of this line is deduced): buf2[i * 2 + 0] = fetch(s2, x1); | - |
1559 | buf2[i * 2 + 1] = fetch(s2, x2); never executed (the execution status of this line is deduced): buf2[i * 2 + 1] = fetch(s2, x2); | - |
1560 | | - |
1561 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1562 | } | 0 |
1563 | 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); | - |
1564 | 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); | - |
1565 | | - |
1566 | 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 |
1567 | int disty = (fy & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 8; | - |
1568 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1569 | for (int i = 0; i < len; ++i) { | 0 |
1570 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1571 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1572 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1573 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1574 | int distx = (fracX & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int distx = (fracX & 0x0000ffff) >> 8; | - |
1575 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1576 | 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); | - |
1577 | 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); | - |
1578 | 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); | - |
1579 | fracX += fdx; never executed (the execution status of this line is deduced): fracX += fdx; | - |
1580 | } | 0 |
1581 | } else { //scale down | 0 |
1582 | int disty = (fy & 0x0000ffff) >> 12; never executed (the execution status of this line is deduced): int disty = (fy & 0x0000ffff) >> 12; | - |
1583 | for (int i = 0; i < len; ++i) { | 0 |
1584 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1585 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1586 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1587 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1588 | int distx = (fracX & 0x0000ffff) >> 12; never executed (the execution status of this line is deduced): int distx = (fracX & 0x0000ffff) >> 12; | - |
1589 | 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); | - |
1590 | fracX += fdx; never executed (the execution status of this line is deduced): fracX += fdx; | - |
1591 | } | 0 |
1592 | } | 0 |
1593 | length -= len; never executed (the execution status of this line is deduced): length -= len; | - |
1594 | b += len; never executed (the execution status of this line is deduced): b += len; | - |
1595 | } | 0 |
1596 | } | 0 |
1597 | } else { //rotation | - |
1598 | FetchPixelFunc fetch = qFetchPixel[layout->bpp]; never executed (the execution status of this line is deduced): FetchPixelFunc fetch = qFetchPixel[layout->bpp]; | - |
1599 | uint buf1[buffer_size]; never executed (the execution status of this line is deduced): uint buf1[buffer_size]; | - |
1600 | uint buf2[buffer_size]; never executed (the execution status of this line is deduced): uint buf2[buffer_size]; | - |
1601 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
1602 | | - |
1603 | while (length) { | 0 |
1604 | int len = qMin(length, buffer_size / 2); never executed (the execution status of this line is deduced): int len = qMin(length, buffer_size / 2); | - |
1605 | int fracX = fx; never executed (the execution status of this line is deduced): int fracX = fx; | - |
1606 | int fracY = fy; never executed (the execution status of this line is deduced): int fracY = fy; | - |
1607 | for (int i = 0; i < len; ++i) { | 0 |
1608 | int x1 = (fx >> 16); never executed (the execution status of this line is deduced): int x1 = (fx >> 16); | - |
1609 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1610 | int y1 = (fy >> 16); never executed (the execution status of this line is deduced): int y1 = (fy >> 16); | - |
1611 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1612 | 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); | - |
1613 | 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); | - |
1614 | | - |
1615 | const uchar *s1 = data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const uchar *s1 = data->texture.scanLine(y1); | - |
1616 | const uchar *s2 = data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const uchar *s2 = data->texture.scanLine(y2); | - |
1617 | | - |
1618 | buf1[i * 2 + 0] = fetch(s1, x1); never executed (the execution status of this line is deduced): buf1[i * 2 + 0] = fetch(s1, x1); | - |
1619 | buf1[i * 2 + 1] = fetch(s1, x2); never executed (the execution status of this line is deduced): buf1[i * 2 + 1] = fetch(s1, x2); | - |
1620 | buf2[i * 2 + 0] = fetch(s2, x1); never executed (the execution status of this line is deduced): buf2[i * 2 + 0] = fetch(s2, x1); | - |
1621 | buf2[i * 2 + 1] = fetch(s2, x2); never executed (the execution status of this line is deduced): buf2[i * 2 + 1] = fetch(s2, x2); | - |
1622 | | - |
1623 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1624 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
1625 | } | 0 |
1626 | 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); | - |
1627 | 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); | - |
1628 | | - |
1629 | if (fabs(data->m11) > 8 || fabs(data->m22) > 8) { never evaluated: fabs(data->m11) > 8 never evaluated: fabs(data->m22) > 8 | 0 |
1630 | //if we are zooming more than 8 times, we use 8bit precision for the position. | - |
1631 | for (int i = 0; i < len; ++i) { | 0 |
1632 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1633 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1634 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1635 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1636 | | - |
1637 | int distx = (fracX & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int distx = (fracX & 0x0000ffff) >> 8; | - |
1638 | int disty = (fracY & 0x0000ffff) >> 8; never executed (the execution status of this line is deduced): int disty = (fracY & 0x0000ffff) >> 8; | - |
1639 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1640 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1641 | | - |
1642 | 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); | - |
1643 | 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); | - |
1644 | 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); | - |
1645 | fracX += fdx; never executed (the execution status of this line is deduced): fracX += fdx; | - |
1646 | fracY += fdy; never executed (the execution status of this line is deduced): fracY += fdy; | - |
1647 | } | 0 |
1648 | } else { | 0 |
1649 | //we are zooming less than 8x, use 4bit precision | - |
1650 | for (int i = 0; i < len; ++i) { | 0 |
1651 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1652 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1653 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1654 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1655 | | - |
1656 | int distx = (fracX & 0x0000ffff) >> 12; never executed (the execution status of this line is deduced): int distx = (fracX & 0x0000ffff) >> 12; | - |
1657 | int disty = (fracY & 0x0000ffff) >> 12; never executed (the execution status of this line is deduced): int disty = (fracY & 0x0000ffff) >> 12; | - |
1658 | | - |
1659 | 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); | - |
1660 | fracX += fdx; never executed (the execution status of this line is deduced): fracX += fdx; | - |
1661 | fracY += fdy; never executed (the execution status of this line is deduced): fracY += fdy; | - |
1662 | } | 0 |
1663 | } | 0 |
1664 | | - |
1665 | length -= len; never executed (the execution status of this line is deduced): length -= len; | - |
1666 | b += len; never executed (the execution status of this line is deduced): b += len; | - |
1667 | } | 0 |
1668 | } | 0 |
1669 | } else { | - |
1670 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
1671 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
1672 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
1673 | | - |
1674 | 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; | - |
1675 | 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; | - |
1676 | 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; | - |
1677 | | - |
1678 | FetchPixelFunc fetch = qFetchPixel[layout->bpp]; never executed (the execution status of this line is deduced): FetchPixelFunc fetch = qFetchPixel[layout->bpp]; | - |
1679 | uint buf1[buffer_size]; never executed (the execution status of this line is deduced): uint buf1[buffer_size]; | - |
1680 | uint buf2[buffer_size]; never executed (the execution status of this line is deduced): uint buf2[buffer_size]; | - |
1681 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
1682 | | - |
1683 | int distxs[buffer_size / 2]; never executed (the execution status of this line is deduced): int distxs[buffer_size / 2]; | - |
1684 | int distys[buffer_size / 2]; never executed (the execution status of this line is deduced): int distys[buffer_size / 2]; | - |
1685 | | - |
1686 | while (length) { | 0 |
1687 | int len = qMin(length, buffer_size / 2); never executed (the execution status of this line is deduced): int len = qMin(length, buffer_size / 2); | - |
1688 | for (int i = 0; i < len; ++i) { | 0 |
1689 | const qreal iw = fw == 0 ? 1 : 1 / fw; | 0 |
1690 | 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); | - |
1691 | 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); | - |
1692 | | - |
1693 | int x1 = int(px) - (px < 0); never executed (the execution status of this line is deduced): int x1 = int(px) - (px < 0); | - |
1694 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
1695 | int y1 = int(py) - (py < 0); never executed (the execution status of this line is deduced): int y1 = int(py) - (py < 0); | - |
1696 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
1697 | | - |
1698 | distxs[i] = int((px - x1) * 256); never executed (the execution status of this line is deduced): distxs[i] = int((px - x1) * 256); | - |
1699 | distys[i] = int((py - y1) * 256); never executed (the execution status of this line is deduced): distys[i] = int((py - y1) * 256); | - |
1700 | | - |
1701 | 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); | - |
1702 | 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); | - |
1703 | | - |
1704 | const uchar *s1 = data->texture.scanLine(y1); never executed (the execution status of this line is deduced): const uchar *s1 = data->texture.scanLine(y1); | - |
1705 | const uchar *s2 = data->texture.scanLine(y2); never executed (the execution status of this line is deduced): const uchar *s2 = data->texture.scanLine(y2); | - |
1706 | | - |
1707 | buf1[i * 2 + 0] = fetch(s1, x1); never executed (the execution status of this line is deduced): buf1[i * 2 + 0] = fetch(s1, x1); | - |
1708 | buf1[i * 2 + 1] = fetch(s1, x2); never executed (the execution status of this line is deduced): buf1[i * 2 + 1] = fetch(s1, x2); | - |
1709 | buf2[i * 2 + 0] = fetch(s2, x1); never executed (the execution status of this line is deduced): buf2[i * 2 + 0] = fetch(s2, x1); | - |
1710 | buf2[i * 2 + 1] = fetch(s2, x2); never executed (the execution status of this line is deduced): buf2[i * 2 + 1] = fetch(s2, x2); | - |
1711 | | - |
1712 | fx += fdx; never executed (the execution status of this line is deduced): fx += fdx; | - |
1713 | fy += fdy; never executed (the execution status of this line is deduced): fy += fdy; | - |
1714 | fw += fdw; never executed (the execution status of this line is deduced): fw += fdw; | - |
1715 | //force increment to avoid /0 | - |
1716 | if (!fw) | 0 |
1717 | fw += fdw; never executed: fw += fdw; | 0 |
1718 | } | 0 |
1719 | | - |
1720 | 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); | - |
1721 | 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); | - |
1722 | | - |
1723 | for (int i = 0; i < len; ++i) { | 0 |
1724 | int distx = distxs[i]; never executed (the execution status of this line is deduced): int distx = distxs[i]; | - |
1725 | int disty = distys[i]; never executed (the execution status of this line is deduced): int disty = distys[i]; | - |
1726 | int idistx = 256 - distx; never executed (the execution status of this line is deduced): int idistx = 256 - distx; | - |
1727 | int idisty = 256 - disty; never executed (the execution status of this line is deduced): int idisty = 256 - disty; | - |
1728 | | - |
1729 | uint tl = buf1[i * 2 + 0]; never executed (the execution status of this line is deduced): uint tl = buf1[i * 2 + 0]; | - |
1730 | uint tr = buf1[i * 2 + 1]; never executed (the execution status of this line is deduced): uint tr = buf1[i * 2 + 1]; | - |
1731 | uint bl = buf2[i * 2 + 0]; never executed (the execution status of this line is deduced): uint bl = buf2[i * 2 + 0]; | - |
1732 | uint br = buf2[i * 2 + 1]; never executed (the execution status of this line is deduced): uint br = buf2[i * 2 + 1]; | - |
1733 | | - |
1734 | 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); | - |
1735 | 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); | - |
1736 | 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); | - |
1737 | } | 0 |
1738 | length -= len; never executed (the execution status of this line is deduced): length -= len; | - |
1739 | b += len; never executed (the execution status of this line is deduced): b += len; | - |
1740 | } | 0 |
1741 | } | 0 |
1742 | | - |
1743 | return buffer; never executed: return buffer; | 0 |
1744 | } | - |
1745 | | - |
1746 | static const SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = { | - |
1747 | // Untransformed | - |
1748 | { | - |
1749 | 0, // Invalid | - |
1750 | fetchUntransformed, // Mono | - |
1751 | fetchUntransformed, // MonoLsb | - |
1752 | fetchUntransformed, // Indexed8 | - |
1753 | fetchUntransformedARGB32PM, // RGB32 | - |
1754 | fetchUntransformed, // ARGB32 | - |
1755 | fetchUntransformedARGB32PM, // ARGB32_Premultiplied | - |
1756 | fetchUntransformedRGB16, // RGB16 | - |
1757 | fetchUntransformed, // ARGB8565_Premultiplied | - |
1758 | fetchUntransformed, // RGB666 | - |
1759 | fetchUntransformed, // ARGB6666_Premultiplied | - |
1760 | fetchUntransformed, // RGB555 | - |
1761 | fetchUntransformed, // ARGB8555_Premultiplied | - |
1762 | fetchUntransformed, // RGB888 | - |
1763 | fetchUntransformed, // RGB444 | - |
1764 | fetchUntransformed // ARGB4444_Premultiplied | - |
1765 | }, | - |
1766 | // Tiled | - |
1767 | { | - |
1768 | 0, // Invalid | - |
1769 | fetchUntransformed, // Mono | - |
1770 | fetchUntransformed, // MonoLsb | - |
1771 | fetchUntransformed, // Indexed8 | - |
1772 | fetchUntransformedARGB32PM, // RGB32 | - |
1773 | fetchUntransformed, // ARGB32 | - |
1774 | fetchUntransformedARGB32PM, // ARGB32_Premultiplied | - |
1775 | fetchUntransformedRGB16, // RGB16 | - |
1776 | fetchUntransformed, // ARGB8565_Premultiplied | - |
1777 | fetchUntransformed, // RGB666 | - |
1778 | fetchUntransformed, // ARGB6666_Premultiplied | - |
1779 | fetchUntransformed, // RGB555 | - |
1780 | fetchUntransformed, // ARGB8555_Premultiplied | - |
1781 | fetchUntransformed, // RGB888 | - |
1782 | fetchUntransformed, // RGB444 | - |
1783 | fetchUntransformed // ARGB4444_Premultiplied | - |
1784 | }, | - |
1785 | // Transformed | - |
1786 | { | - |
1787 | 0, // Invalid | - |
1788 | fetchTransformed<BlendTransformed>, // Mono | - |
1789 | fetchTransformed<BlendTransformed>, // MonoLsb | - |
1790 | fetchTransformed<BlendTransformed>, // Indexed8 | - |
1791 | fetchTransformedARGB32PM<BlendTransformed>, // RGB32 | - |
1792 | fetchTransformed<BlendTransformed>, // ARGB32 | - |
1793 | fetchTransformedARGB32PM<BlendTransformed>, // ARGB32_Premultiplied | - |
1794 | fetchTransformed<BlendTransformed>, // RGB16 | - |
1795 | fetchTransformed<BlendTransformed>, // ARGB8565_Premultiplied | - |
1796 | fetchTransformed<BlendTransformed>, // RGB666 | - |
1797 | fetchTransformed<BlendTransformed>, // ARGB6666_Premultiplied | - |
1798 | fetchTransformed<BlendTransformed>, // RGB555 | - |
1799 | fetchTransformed<BlendTransformed>, // ARGB8555_Premultiplied | - |
1800 | fetchTransformed<BlendTransformed>, // RGB888 | - |
1801 | fetchTransformed<BlendTransformed>, // RGB444 | - |
1802 | fetchTransformed<BlendTransformed>, // ARGB4444_Premultiplied | - |
1803 | }, | - |
1804 | { | - |
1805 | 0, // TransformedTiled | - |
1806 | fetchTransformed<BlendTransformedTiled>, // Mono | - |
1807 | fetchTransformed<BlendTransformedTiled>, // MonoLsb | - |
1808 | fetchTransformed<BlendTransformedTiled>, // Indexed8 | - |
1809 | fetchTransformedARGB32PM<BlendTransformedTiled>, // RGB32 | - |
1810 | fetchTransformed<BlendTransformedTiled>, // ARGB32 | - |
1811 | fetchTransformedARGB32PM<BlendTransformedTiled>, // ARGB32_Premultiplied | - |
1812 | fetchTransformed<BlendTransformedTiled>, // RGB16 | - |
1813 | fetchTransformed<BlendTransformedTiled>, // ARGB8565_Premultiplied | - |
1814 | fetchTransformed<BlendTransformedTiled>, // RGB666 | - |
1815 | fetchTransformed<BlendTransformedTiled>, // ARGB6666_Premultiplied | - |
1816 | fetchTransformed<BlendTransformedTiled>, // RGB555 | - |
1817 | fetchTransformed<BlendTransformedTiled>, // ARGB8555_Premultiplied | - |
1818 | fetchTransformed<BlendTransformedTiled>, // RGB888 | - |
1819 | fetchTransformed<BlendTransformedTiled>, // RGB444 | - |
1820 | fetchTransformed<BlendTransformedTiled>, // ARGB4444_Premultiplied | - |
1821 | }, | - |
1822 | { | - |
1823 | 0, // Bilinear | - |
1824 | fetchTransformedBilinear<BlendTransformedBilinear>, // Mono | - |
1825 | fetchTransformedBilinear<BlendTransformedBilinear>, // MonoLsb | - |
1826 | fetchTransformedBilinear<BlendTransformedBilinear>, // Indexed8 | - |
1827 | fetchTransformedBilinearARGB32PM<BlendTransformedBilinear>, // RGB32 | - |
1828 | fetchTransformedBilinear<BlendTransformedBilinear>, // ARGB32 | - |
1829 | fetchTransformedBilinearARGB32PM<BlendTransformedBilinear>, // ARGB32_Premultiplied | - |
1830 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB16 | - |
1831 | fetchTransformedBilinear<BlendTransformedBilinear>, // ARGB8565_Premultiplied | - |
1832 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB666 | - |
1833 | fetchTransformedBilinear<BlendTransformedBilinear>, // ARGB6666_Premultiplied | - |
1834 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB555 | - |
1835 | fetchTransformedBilinear<BlendTransformedBilinear>, // ARGB8555_Premultiplied | - |
1836 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB888 | - |
1837 | fetchTransformedBilinear<BlendTransformedBilinear>, // RGB444 | - |
1838 | fetchTransformedBilinear<BlendTransformedBilinear> // ARGB4444_Premultiplied | - |
1839 | }, | - |
1840 | { | - |
1841 | 0, // BilinearTiled | - |
1842 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // Mono | - |
1843 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // MonoLsb | - |
1844 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // Indexed8 | - |
1845 | fetchTransformedBilinearARGB32PM<BlendTransformedBilinearTiled>, // RGB32 | - |
1846 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // ARGB32 | - |
1847 | fetchTransformedBilinearARGB32PM<BlendTransformedBilinearTiled>, // ARGB32_Premultiplied | - |
1848 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB16 | - |
1849 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // ARGB8565_Premultiplied | - |
1850 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB666 | - |
1851 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // ARGB6666_Premultiplied | - |
1852 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB555 | - |
1853 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // ARGB8555_Premultiplied | - |
1854 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB888 | - |
1855 | fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB444 | - |
1856 | fetchTransformedBilinear<BlendTransformedBilinearTiled> // ARGB4444_Premultiplied | - |
1857 | }, | - |
1858 | }; | - |
1859 | | - |
1860 | #define FIXPT_BITS 8 | - |
1861 | #define FIXPT_SIZE (1<<FIXPT_BITS) | - |
1862 | | - |
1863 | static uint qt_gradient_pixel_fixed(const QGradientData *data, int fixed_pos) | - |
1864 | { | - |
1865 | 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; | - |
1866 | return data->colorTable[qt_gradient_clamp(data, ipos)]; executed: return data->colorTable[qt_gradient_clamp(data, ipos)]; Execution Count:380193 | 380193 |
1867 | } | - |
1868 | | - |
1869 | static void QT_FASTCALL getLinearGradientValues(LinearGradientValues *v, const QSpanData *data) | - |
1870 | { | - |
1871 | 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; | - |
1872 | 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; | - |
1873 | 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; | - |
1874 | v->off = 0; executed (the execution status of this line is deduced): v->off = 0; | - |
1875 | if (v->l != 0) { partially evaluated: v->l != 0 yes Evaluation Count:16262 | no Evaluation Count:0 |
| 0-16262 |
1876 | v->dx /= v->l; executed (the execution status of this line is deduced): v->dx /= v->l; | - |
1877 | v->dy /= v->l; executed (the execution status of this line is deduced): v->dy /= v->l; | - |
1878 | 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; | - |
1879 | } executed: } Execution Count:16262 | 16262 |
1880 | } executed: } Execution Count:16294 | 16294 |
1881 | | - |
1882 | static const uint * QT_FASTCALL qt_fetch_linear_gradient(uint *buffer, const Operator *op, const QSpanData *data, | - |
1883 | int y, int x, int length) | - |
1884 | { | - |
1885 | const uint *b = buffer; executed (the execution status of this line is deduced): const uint *b = buffer; | - |
1886 | qreal t, inc; executed (the execution status of this line is deduced): qreal t, inc; | - |
1887 | | - |
1888 | bool affine = true; executed (the execution status of this line is deduced): bool affine = true; | - |
1889 | qreal rx=0, ry=0; executed (the execution status of this line is deduced): qreal rx=0, ry=0; | - |
1890 | if (op->linear.l == 0) { partially evaluated: op->linear.l == 0 no Evaluation Count:0 | yes Evaluation Count:19446 |
| 0-19446 |
1891 | t = inc = 0; never executed (the execution status of this line is deduced): t = inc = 0; | - |
1892 | } else { | 0 |
1893 | 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; | - |
1894 | 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; | - |
1895 | 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; | - |
1896 | 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; | - |
1897 | affine = !data->m13 && !data->m23; partially evaluated: !data->m13 yes Evaluation Count:19438 | no Evaluation Count:0 |
partially evaluated: !data->m23 yes Evaluation Count:19458 | no Evaluation Count:0 |
| 0-19458 |
1898 | | - |
1899 | if (affine) { partially evaluated: affine yes Evaluation Count:19461 | no Evaluation Count:0 |
| 0-19461 |
1900 | t *= (GRADIENT_STOPTABLE_SIZE - 1); executed (the execution status of this line is deduced): t *= (1024 - 1); | - |
1901 | inc *= (GRADIENT_STOPTABLE_SIZE - 1); executed (the execution status of this line is deduced): inc *= (1024 - 1); | - |
1902 | } executed: } Execution Count:19457 | 19457 |
1903 | } executed: } Execution Count:19462 | 19462 |
1904 | | - |
1905 | const uint *end = buffer + length; executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
1906 | if (affine) { partially evaluated: affine yes Evaluation Count:19456 | no Evaluation Count:0 |
| 0-19456 |
1907 | if (inc > qreal(-1e-5) && inc < qreal(1e-5)) { partially evaluated: inc > qreal(-1e-5) yes Evaluation Count:19463 | no Evaluation Count:0 |
partially evaluated: inc < qreal(1e-5) no Evaluation Count:0 | yes Evaluation Count:19484 |
| 0-19484 |
1908 | 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);; | - |
1909 | } else { | 0 |
1910 | if (t+inc*length < qreal(INT_MAX >> (FIXPT_BITS + 1)) && partially evaluated: t+inc*length < qreal(2147483647 >> (8 + 1)) yes Evaluation Count:19473 | no Evaluation Count:0 |
| 0-19473 |
1911 | t+inc*length > qreal(INT_MIN >> (FIXPT_BITS + 1))) { partially evaluated: t+inc*length > qreal((-2147483647 - 1) >> (8 + 1)) yes Evaluation Count:19486 | no Evaluation Count:0 |
| 0-19486 |
1912 | // we can use fixed point math | - |
1913 | int t_fixed = int(t * FIXPT_SIZE); executed (the execution status of this line is deduced): int t_fixed = int(t * (1<<8)); | - |
1914 | int inc_fixed = int(inc * FIXPT_SIZE); executed (the execution status of this line is deduced): int inc_fixed = int(inc * (1<<8)); | - |
1915 | while (buffer < end) { evaluated: buffer < end yes Evaluation Count:374027 | yes Evaluation Count:19475 |
| 19475-374027 |
1916 | *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); | - |
1917 | t_fixed += inc_fixed; executed (the execution status of this line is deduced): t_fixed += inc_fixed; | - |
1918 | ++buffer; executed (the execution status of this line is deduced): ++buffer; | - |
1919 | } executed: } Execution Count:374017 | 374017 |
1920 | } else { executed: } Execution Count:19478 | 19478 |
1921 | // we have to fall back to float math | - |
1922 | while (buffer < end) { never evaluated: buffer < end | 0 |
1923 | *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); | - |
1924 | t += inc; never executed (the execution status of this line is deduced): t += inc; | - |
1925 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
1926 | } | 0 |
1927 | } | 0 |
1928 | } | - |
1929 | } else { // fall back to float math here as well | - |
1930 | 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; | - |
1931 | while (buffer < end) { never evaluated: buffer < end | 0 |
1932 | qreal x = rx/rw; never executed (the execution status of this line is deduced): qreal x = rx/rw; | - |
1933 | qreal y = ry/rw; never executed (the execution status of this line is deduced): qreal y = ry/rw; | - |
1934 | 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; | - |
1935 | | - |
1936 | *buffer = qt_gradient_pixel(&data->gradient, t); never executed (the execution status of this line is deduced): *buffer = qt_gradient_pixel(&data->gradient, t); | - |
1937 | rx += data->m11; never executed (the execution status of this line is deduced): rx += data->m11; | - |
1938 | ry += data->m12; never executed (the execution status of this line is deduced): ry += data->m12; | - |
1939 | rw += data->m13; never executed (the execution status of this line is deduced): rw += data->m13; | - |
1940 | if (!rw) { | 0 |
1941 | rw += data->m13; never executed (the execution status of this line is deduced): rw += data->m13; | - |
1942 | } | 0 |
1943 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
1944 | } | 0 |
1945 | } | 0 |
1946 | | - |
1947 | return b; executed: return b; Execution Count:19479 | 19479 |
1948 | } | - |
1949 | | - |
1950 | static void QT_FASTCALL getRadialGradientValues(RadialGradientValues *v, const QSpanData *data) | - |
1951 | { | - |
1952 | 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; | - |
1953 | 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; | - |
1954 | | - |
1955 | 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; | - |
1956 | 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; | - |
1957 | | - |
1958 | 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; | - |
1959 | v->inv2a = 1 / (2 * v->a); executed (the execution status of this line is deduced): v->inv2a = 1 / (2 * v->a); | - |
1960 | | - |
1961 | 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:17 |
partially evaluated: v->a <= 0 no Evaluation Count:0 | yes Evaluation Count:17 |
| 0-17 |
1962 | } executed: } Execution Count:17 | 17 |
1963 | | - |
1964 | class RadialFetchPlain | - |
1965 | { | - |
1966 | public: | - |
1967 | static inline void fetch(uint *buffer, uint *end, const Operator *op, const QSpanData *data, qreal det, | - |
1968 | qreal delta_det, qreal delta_delta_det, qreal b, qreal delta_b) | - |
1969 | { | - |
1970 | if (op->radial.extended) { never evaluated: op->radial.extended | 0 |
1971 | while (buffer < end) { never evaluated: buffer < end | 0 |
1972 | quint32 result = 0; never executed (the execution status of this line is deduced): quint32 result = 0; | - |
1973 | if (det >= 0) { never evaluated: det >= 0 | 0 |
1974 | qreal w = qSqrt(det) - b; never executed (the execution status of this line is deduced): qreal w = qSqrt(det) - b; | - |
1975 | if (data->gradient.radial.focal.radius + op->radial.dr * w >= 0) never evaluated: data->gradient.radial.focal.radius + op->radial.dr * w >= 0 | 0 |
1976 | result = qt_gradient_pixel(&data->gradient, w); never executed: result = qt_gradient_pixel(&data->gradient, w); | 0 |
1977 | } | 0 |
1978 | | - |
1979 | *buffer = result; never executed (the execution status of this line is deduced): *buffer = result; | - |
1980 | | - |
1981 | det += delta_det; never executed (the execution status of this line is deduced): det += delta_det; | - |
1982 | delta_det += delta_delta_det; never executed (the execution status of this line is deduced): delta_det += delta_delta_det; | - |
1983 | b += delta_b; never executed (the execution status of this line is deduced): b += delta_b; | - |
1984 | | - |
1985 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
1986 | } | 0 |
1987 | } else { | 0 |
1988 | while (buffer < end) { never evaluated: buffer < end | 0 |
1989 | *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); | - |
1990 | | - |
1991 | det += delta_det; never executed (the execution status of this line is deduced): det += delta_det; | - |
1992 | delta_det += delta_delta_det; never executed (the execution status of this line is deduced): delta_det += delta_delta_det; | - |
1993 | b += delta_b; never executed (the execution status of this line is deduced): b += delta_b; | - |
1994 | } | 0 |
1995 | } | 0 |
1996 | } | - |
1997 | }; | - |
1998 | | - |
1999 | const uint * QT_FASTCALL qt_fetch_radial_gradient_plain(uint *buffer, const Operator *op, const QSpanData *data, | - |
2000 | int y, int x, int length) | - |
2001 | { | - |
2002 | 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 |
2003 | } | - |
2004 | | - |
2005 | static SourceFetchProc qt_fetch_radial_gradient = qt_fetch_radial_gradient_plain; | - |
2006 | | - |
2007 | static const uint * QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Operator *, const QSpanData *data, | - |
2008 | int y, int x, int length) | - |
2009 | { | - |
2010 | const uint *b = buffer; never executed (the execution status of this line is deduced): const uint *b = buffer; | - |
2011 | 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)) | - |
2012 | + 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)); | - |
2013 | 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)) | - |
2014 | + 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)); | - |
2015 | bool affine = !data->m13 && !data->m23; never evaluated: !data->m13 never evaluated: !data->m23 | 0 |
2016 | | - |
2017 | const uint *end = buffer + length; never executed (the execution status of this line is deduced): const uint *end = buffer + length; | - |
2018 | if (affine) { | 0 |
2019 | rx -= data->gradient.conical.center.x; never executed (the execution status of this line is deduced): rx -= data->gradient.conical.center.x; | - |
2020 | ry -= data->gradient.conical.center.y; never executed (the execution status of this line is deduced): ry -= data->gradient.conical.center.y; | - |
2021 | while (buffer < end) { never evaluated: buffer < end | 0 |
2022 | 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; | - |
2023 | | - |
2024 | *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)); | - |
2025 | | - |
2026 | rx += data->m11; never executed (the execution status of this line is deduced): rx += data->m11; | - |
2027 | ry += data->m12; never executed (the execution status of this line is deduced): ry += data->m12; | - |
2028 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
2029 | } | 0 |
2030 | } else { | 0 |
2031 | 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)) | - |
2032 | + 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)); | - |
2033 | if (!rw) | 0 |
2034 | rw = 1; | 0 |
2035 | while (buffer < end) { never evaluated: buffer < end | 0 |
2036 | 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, | - |
2037 | rx/rw - data->gradient.conical.center.y) never executed (the execution status of this line is deduced): rx/rw - data->gradient.conical.center.y) | - |
2038 | + data->gradient.conical.angle; never executed (the execution status of this line is deduced): + data->gradient.conical.angle; | - |
2039 | | - |
2040 | *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)); | - |
2041 | | - |
2042 | rx += data->m11; never executed (the execution status of this line is deduced): rx += data->m11; | - |
2043 | ry += data->m12; never executed (the execution status of this line is deduced): ry += data->m12; | - |
2044 | rw += data->m13; never executed (the execution status of this line is deduced): rw += data->m13; | - |
2045 | if (!rw) { | 0 |
2046 | rw += data->m13; never executed (the execution status of this line is deduced): rw += data->m13; | - |
2047 | } | 0 |
2048 | ++buffer; never executed (the execution status of this line is deduced): ++buffer; | - |
2049 | } | 0 |
2050 | } | 0 |
2051 | return b; never executed: return b; | 0 |
2052 | } | - |
2053 | | - |
2054 | #if defined(Q_CC_RVCT) | - |
2055 | // Force ARM code generation for comp_func_* -methods | - |
2056 | # pragma push | - |
2057 | # pragma arm | - |
2058 | # if defined(Q_PROCESSOR_ARM_V6) | - |
2059 | static __forceinline void preload(const uint *start) | - |
2060 | { | - |
2061 | asm( "pld [start]" ); | - |
2062 | } | - |
2063 | static const uint L2CacheLineLength = 32; | - |
2064 | static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint); | - |
2065 | # define PRELOAD_INIT(x) preload(x); | - |
2066 | # define PRELOAD_INIT2(x,y) PRELOAD_INIT(x) PRELOAD_INIT(y) | - |
2067 | # define PRELOAD_COND(x) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); | - |
2068 | // Two consecutive preloads stall, so space them out a bit by using different modulus. | - |
2069 | # define PRELOAD_COND2(x,y) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); \ | - |
2070 | if (((uint)&y[i])%L2CacheLineLength == 16) preload(&y[i] + L2CacheLineLengthInInts); | - |
2071 | # endif // Q_PROCESSOR_ARM_V6 | - |
2072 | #endif // Q_CC_RVCT | - |
2073 | | - |
2074 | #if !defined(Q_CC_RVCT) || !defined(Q_PROCESSOR_ARM_V6) | - |
2075 | # define PRELOAD_INIT(x) | - |
2076 | # define PRELOAD_INIT2(x,y) | - |
2077 | # define PRELOAD_COND(x) | - |
2078 | # define PRELOAD_COND2(x,y) | - |
2079 | #endif | - |
2080 | | - |
2081 | /* The constant alpha factor describes an alpha factor that gets applied | - |
2082 | to the result of the composition operation combining it with the destination. | - |
2083 | | - |
2084 | The intent is that if const_alpha == 0. we get back dest, and if const_alpha == 1. | - |
2085 | we get the unmodified operation | - |
2086 | | - |
2087 | result = src op dest | - |
2088 | dest = result * const_alpha + dest * (1. - const_alpha) | - |
2089 | | - |
2090 | This means that in the comments below, the first line is the const_alpha==255 case, the | - |
2091 | second line the general one. | - |
2092 | | - |
2093 | In the lines below: | - |
2094 | s == src, sa == alpha(src), sia = 1 - alpha(src) | - |
2095 | d == dest, da == alpha(dest), dia = 1 - alpha(dest) | - |
2096 | ca = const_alpha, cia = 1 - const_alpha | - |
2097 | | - |
2098 | The methods exist in two variants. One where we have a constant source, the other | - |
2099 | where the source is an array of pixels. | - |
2100 | */ | - |
2101 | | - |
2102 | /* | - |
2103 | result = 0 | - |
2104 | d = d * cia | - |
2105 | */ | - |
2106 | #define comp_func_Clear_impl(dest, length, const_alpha)\ | - |
2107 | {\ | - |
2108 | if (const_alpha == 255) {\ | - |
2109 | QT_MEMFILL_UINT(dest, length, 0);\ | - |
2110 | } else {\ | - |
2111 | int ialpha = 255 - const_alpha;\ | - |
2112 | PRELOAD_INIT(dest)\ | - |
2113 | for (int i = 0; i < length; ++i) {\ | - |
2114 | PRELOAD_COND(dest)\ | - |
2115 | dest[i] = BYTE_MUL(dest[i], ialpha);\ | - |
2116 | }\ | - |
2117 | }\ | - |
2118 | } | - |
2119 | | - |
2120 | void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha) | - |
2121 | { | - |
2122 | comp_func_Clear_impl(dest, length, const_alpha); never executed: } never executed: } never executed: } never evaluated: const_alpha == 255 never evaluated: i < length | 0 |
2123 | } | - |
2124 | | - |
2125 | void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, 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 | /* | - |
2131 | result = s | - |
2132 | dest = s * ca + d * cia | - |
2133 | */ | - |
2134 | void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha) | - |
2135 | { | - |
2136 | if (const_alpha == 255) { evaluated: const_alpha == 255 yes Evaluation Count:158770 | yes Evaluation Count:65302 |
| 65302-158770 |
2137 | QT_MEMFILL_UINT(dest, length, color); executed (the execution status of this line is deduced): qt_memfill<quint32>(dest, color, length);; | - |
2138 | } else { executed: } Execution Count:158770 | 158770 |
2139 | int ialpha = 255 - const_alpha; executed (the execution status of this line is deduced): int ialpha = 255 - const_alpha; | - |
2140 | color = BYTE_MUL(color, const_alpha); executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2141 | PRELOAD_INIT(dest) | - |
2142 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:65302 | yes Evaluation Count:65302 |
| 65302 |
2143 | PRELOAD_COND(dest) | - |
2144 | 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); | - |
2145 | } executed: } Execution Count:65302 | 65302 |
2146 | } executed: } Execution Count:65302 | 65302 |
2147 | } | - |
2148 | | - |
2149 | void QT_FASTCALL comp_func_Source(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2150 | { | - |
2151 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2152 | ::memcpy(dest, src, length * sizeof(uint)); never executed (the execution status of this line is deduced): ::memcpy(dest, src, length * sizeof(uint)); | - |
2153 | } else { | 0 |
2154 | int ialpha = 255 - const_alpha; never executed (the execution status of this line is deduced): int ialpha = 255 - const_alpha; | - |
2155 | PRELOAD_INIT2(dest, src) | - |
2156 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2157 | PRELOAD_COND2(dest, src) | - |
2158 | 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); | - |
2159 | } | 0 |
2160 | } | 0 |
2161 | } | - |
2162 | | - |
2163 | void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint) | - |
2164 | { | - |
2165 | } | - |
2166 | | - |
2167 | void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint) | - |
2168 | { | - |
2169 | } | - |
2170 | | - |
2171 | /* | - |
2172 | result = s + d * sia | - |
2173 | dest = (s + d * sia) * ca + d * cia | - |
2174 | = s * ca + d * (sia * ca + cia) | - |
2175 | = s * ca + d * (1 - sa*ca) | - |
2176 | */ | - |
2177 | void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha) | - |
2178 | { | - |
2179 | if ((const_alpha & qAlpha(color)) == 255) { never evaluated: (const_alpha & qAlpha(color)) == 255 | 0 |
2180 | QT_MEMFILL_UINT(dest, length, color); never executed (the execution status of this line is deduced): qt_memfill<quint32>(dest, color, length);; | - |
2181 | } else { | 0 |
2182 | if (const_alpha != 255) never evaluated: const_alpha != 255 | 0 |
2183 | color = BYTE_MUL(color, const_alpha); never executed: color = BYTE_MUL(color, const_alpha); | 0 |
2184 | PRELOAD_INIT(dest) | - |
2185 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2186 | PRELOAD_COND(dest) | - |
2187 | 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)); | - |
2188 | } | 0 |
2189 | } | 0 |
2190 | } | - |
2191 | | - |
2192 | void QT_FASTCALL comp_func_SourceOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2193 | { | - |
2194 | PRELOAD_INIT2(dest, src) | - |
2195 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2196 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2197 | PRELOAD_COND2(dest, src) | - |
2198 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2199 | if (s >= 0xff000000) never evaluated: s >= 0xff000000 | 0 |
2200 | dest[i] = s; never executed: dest[i] = s; | 0 |
2201 | else if (s != 0) | 0 |
2202 | dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s)); never executed: dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s)); | 0 |
2203 | } | - |
2204 | } else { | 0 |
2205 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2206 | PRELOAD_COND2(dest, src) | - |
2207 | 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); | - |
2208 | 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)); | - |
2209 | } | 0 |
2210 | } | 0 |
2211 | } | - |
2212 | | - |
2213 | /* | - |
2214 | result = d + s * dia | - |
2215 | dest = (d + s * dia) * ca + d * cia | - |
2216 | = d + s * dia * ca | - |
2217 | */ | - |
2218 | void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha) | - |
2219 | { | - |
2220 | if (const_alpha != 255) never evaluated: const_alpha != 255 | 0 |
2221 | color = BYTE_MUL(color, const_alpha); never executed: color = BYTE_MUL(color, const_alpha); | 0 |
2222 | PRELOAD_INIT(dest) | - |
2223 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2224 | PRELOAD_COND(dest) | - |
2225 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2226 | 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)); | - |
2227 | } | 0 |
2228 | } | 0 |
2229 | | - |
2230 | void QT_FASTCALL comp_func_DestinationOver(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2231 | { | - |
2232 | PRELOAD_INIT2(dest, src) | - |
2233 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2234 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2235 | PRELOAD_COND2(dest, src) | - |
2236 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2237 | 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)); | - |
2238 | } | 0 |
2239 | } else { | 0 |
2240 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2241 | PRELOAD_COND2(dest, src) | - |
2242 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2243 | 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); | - |
2244 | 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)); | - |
2245 | } | 0 |
2246 | } | 0 |
2247 | } | - |
2248 | | - |
2249 | /* | - |
2250 | result = s * da | - |
2251 | dest = s * da * ca + d * cia | - |
2252 | */ | - |
2253 | void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha) | - |
2254 | { | - |
2255 | PRELOAD_INIT(dest) | - |
2256 | if (const_alpha == 255) { partially evaluated: const_alpha == 255 yes Evaluation Count:2663 | no Evaluation Count:0 |
| 0-2663 |
2257 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:441657 | yes Evaluation Count:2663 |
| 2663-441657 |
2258 | PRELOAD_COND(dest) | - |
2259 | 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])); | - |
2260 | } executed: } Execution Count:441657 | 441657 |
2261 | } else { executed: } Execution Count:2663 | 2663 |
2262 | color = BYTE_MUL(color, const_alpha); never executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2263 | uint cia = 255 - const_alpha; never executed (the execution status of this line is deduced): uint cia = 255 - const_alpha; | - |
2264 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2265 | PRELOAD_COND(dest) | - |
2266 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2267 | 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); | - |
2268 | } | 0 |
2269 | } | 0 |
2270 | } | - |
2271 | | - |
2272 | void QT_FASTCALL comp_func_SourceIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2273 | { | - |
2274 | PRELOAD_INIT2(dest, src) | - |
2275 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2276 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2277 | PRELOAD_COND2(dest, src) | - |
2278 | 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])); | - |
2279 | } | 0 |
2280 | } else { | 0 |
2281 | uint cia = 255 - const_alpha; never executed (the execution status of this line is deduced): uint cia = 255 - const_alpha; | - |
2282 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2283 | PRELOAD_COND2(dest, src) | - |
2284 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2285 | 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); | - |
2286 | 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); | - |
2287 | } | 0 |
2288 | } | 0 |
2289 | } | - |
2290 | | - |
2291 | /* | - |
2292 | result = d * sa | - |
2293 | dest = d * sa * ca + d * cia | - |
2294 | = d * (sa * ca + cia) | - |
2295 | */ | - |
2296 | void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha) | - |
2297 | { | - |
2298 | uint a = qAlpha(color); never executed (the execution status of this line is deduced): uint a = qAlpha(color); | - |
2299 | if (const_alpha != 255) { never evaluated: const_alpha != 255 | 0 |
2300 | 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; | - |
2301 | } | 0 |
2302 | PRELOAD_INIT(dest) | - |
2303 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2304 | PRELOAD_COND(dest) | - |
2305 | dest[i] = BYTE_MUL(dest[i], a); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], a); | - |
2306 | } | 0 |
2307 | } | 0 |
2308 | | - |
2309 | void QT_FASTCALL comp_func_DestinationIn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2310 | { | - |
2311 | PRELOAD_INIT2(dest, src) | - |
2312 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2313 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2314 | PRELOAD_COND2(dest, src) | - |
2315 | 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])); | - |
2316 | } | 0 |
2317 | } else { | 0 |
2318 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2319 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2320 | PRELOAD_COND2(dest, src) | - |
2321 | 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; | - |
2322 | dest[i] = BYTE_MUL(dest[i], a); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], a); | - |
2323 | } | 0 |
2324 | } | 0 |
2325 | } | - |
2326 | | - |
2327 | /* | - |
2328 | result = s * dia | - |
2329 | dest = s * dia * ca + d * cia | - |
2330 | */ | - |
2331 | | - |
2332 | void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha) | - |
2333 | { | - |
2334 | PRELOAD_INIT(dest) | - |
2335 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2336 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2337 | PRELOAD_COND(dest) | - |
2338 | 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])); | - |
2339 | } | 0 |
2340 | } else { | 0 |
2341 | color = BYTE_MUL(color, const_alpha); never executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2342 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2343 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2344 | PRELOAD_COND(dest) | - |
2345 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2346 | 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); | - |
2347 | } | 0 |
2348 | } | 0 |
2349 | } | - |
2350 | | - |
2351 | void QT_FASTCALL comp_func_SourceOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2352 | { | - |
2353 | PRELOAD_INIT2(dest, src) | - |
2354 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2355 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2356 | PRELOAD_COND2(dest, src) | - |
2357 | 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])); | - |
2358 | } | 0 |
2359 | } else { | 0 |
2360 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2361 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2362 | PRELOAD_COND2(dest, src) | - |
2363 | 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); | - |
2364 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2365 | 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); | - |
2366 | } | 0 |
2367 | } | 0 |
2368 | } | - |
2369 | | - |
2370 | /* | - |
2371 | result = d * sia | - |
2372 | dest = d * sia * ca + d * cia | - |
2373 | = d * (sia * ca + cia) | - |
2374 | */ | - |
2375 | void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha) | - |
2376 | { | - |
2377 | uint a = qAlpha(~color); never executed (the execution status of this line is deduced): uint a = qAlpha(~color); | - |
2378 | if (const_alpha != 255) never evaluated: const_alpha != 255 | 0 |
2379 | a = BYTE_MUL(a, const_alpha) + 255 - const_alpha; never executed: a = BYTE_MUL(a, const_alpha) + 255 - const_alpha; | 0 |
2380 | PRELOAD_INIT(dest) | - |
2381 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2382 | PRELOAD_COND(dest) | - |
2383 | dest[i] = BYTE_MUL(dest[i], a); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], a); | - |
2384 | } | 0 |
2385 | } | 0 |
2386 | | - |
2387 | void QT_FASTCALL comp_func_DestinationOut(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2388 | { | - |
2389 | PRELOAD_INIT2(dest, src) | - |
2390 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2391 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2392 | PRELOAD_COND2(dest, src) | - |
2393 | 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])); | - |
2394 | } | 0 |
2395 | } else { | 0 |
2396 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2397 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2398 | PRELOAD_COND2(dest, src) | - |
2399 | 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; | - |
2400 | dest[i] = BYTE_MUL(dest[i], sia); never executed (the execution status of this line is deduced): dest[i] = BYTE_MUL(dest[i], sia); | - |
2401 | } | 0 |
2402 | } | 0 |
2403 | } | - |
2404 | | - |
2405 | /* | - |
2406 | result = s*da + d*sia | - |
2407 | dest = s*da*ca + d*sia*ca + d *cia | - |
2408 | = s*ca * da + d * (sia*ca + cia) | - |
2409 | = s*ca * da + d * (1 - sa*ca) | - |
2410 | */ | - |
2411 | void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha) | - |
2412 | { | - |
2413 | if (const_alpha != 255) { partially evaluated: const_alpha != 255 no Evaluation Count:0 | yes Evaluation Count:79 |
| 0-79 |
2414 | color = BYTE_MUL(color, const_alpha); never executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2415 | } | 0 |
2416 | uint sia = qAlpha(~color); executed (the execution status of this line is deduced): uint sia = qAlpha(~color); | - |
2417 | PRELOAD_INIT(dest) | - |
2418 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:1203 | yes Evaluation Count:79 |
| 79-1203 |
2419 | PRELOAD_COND(dest) | - |
2420 | 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); | - |
2421 | } executed: } Execution Count:1203 | 1203 |
2422 | } executed: } Execution Count:79 | 79 |
2423 | | - |
2424 | void QT_FASTCALL comp_func_SourceAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2425 | { | - |
2426 | PRELOAD_INIT2(dest, src) | - |
2427 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2428 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2429 | PRELOAD_COND2(dest, src) | - |
2430 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2431 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2432 | 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)); | - |
2433 | } | 0 |
2434 | } else { | 0 |
2435 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2436 | PRELOAD_COND2(dest, src) | - |
2437 | 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); | - |
2438 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2439 | 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)); | - |
2440 | } | 0 |
2441 | } | 0 |
2442 | } | - |
2443 | | - |
2444 | /* | - |
2445 | result = d*sa + s*dia | - |
2446 | dest = d*sa*ca + s*dia*ca + d *cia | - |
2447 | = s*ca * dia + d * (sa*ca + cia) | - |
2448 | */ | - |
2449 | void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha) | - |
2450 | { | - |
2451 | uint a = qAlpha(color); never executed (the execution status of this line is deduced): uint a = qAlpha(color); | - |
2452 | if (const_alpha != 255) { never evaluated: const_alpha != 255 | 0 |
2453 | color = BYTE_MUL(color, const_alpha); never executed (the execution status of this line is deduced): color = BYTE_MUL(color, const_alpha); | - |
2454 | a = qAlpha(color) + 255 - const_alpha; never executed (the execution status of this line is deduced): a = qAlpha(color) + 255 - const_alpha; | - |
2455 | } | 0 |
2456 | PRELOAD_INIT(dest) | - |
2457 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2458 | PRELOAD_COND(dest) | - |
2459 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2460 | 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)); | - |
2461 | } | 0 |
2462 | } | 0 |
2463 | | - |
2464 | void QT_FASTCALL comp_func_DestinationAtop(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2465 | { | - |
2466 | PRELOAD_INIT2(dest, src) | - |
2467 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2468 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2469 | PRELOAD_COND2(dest, src) | - |
2470 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2471 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2472 | 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)); | - |
2473 | } | 0 |
2474 | } else { | 0 |
2475 | int cia = 255 - const_alpha; never executed (the execution status of this line is deduced): int cia = 255 - const_alpha; | - |
2476 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2477 | PRELOAD_COND2(dest, src) | - |
2478 | 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); | - |
2479 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2480 | uint a = qAlpha(s) + cia; never executed (the execution status of this line is deduced): uint a = qAlpha(s) + cia; | - |
2481 | 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)); | - |
2482 | } | 0 |
2483 | } | 0 |
2484 | } | - |
2485 | | - |
2486 | /* | - |
2487 | result = d*sia + s*dia | - |
2488 | dest = d*sia*ca + s*dia*ca + d *cia | - |
2489 | = s*ca * dia + d * (sia*ca + cia) | - |
2490 | = s*ca * dia + d * (1 - sa*ca) | - |
2491 | */ | - |
2492 | void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha) | - |
2493 | { | - |
2494 | if (const_alpha != 255) never evaluated: const_alpha != 255 | 0 |
2495 | color = BYTE_MUL(color, const_alpha); never executed: color = BYTE_MUL(color, const_alpha); | 0 |
2496 | uint sia = qAlpha(~color); never executed (the execution status of this line is deduced): uint sia = qAlpha(~color); | - |
2497 | | - |
2498 | PRELOAD_INIT(dest) | - |
2499 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2500 | PRELOAD_COND(dest) | - |
2501 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2502 | 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); | - |
2503 | } | 0 |
2504 | } | 0 |
2505 | | - |
2506 | void QT_FASTCALL comp_func_XOR(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2507 | { | - |
2508 | PRELOAD_INIT2(dest, src) | - |
2509 | if (const_alpha == 255) { never evaluated: const_alpha == 255 | 0 |
2510 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2511 | PRELOAD_COND2(dest, src) | - |
2512 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2513 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2514 | 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)); | - |
2515 | } | 0 |
2516 | } else { | 0 |
2517 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2518 | PRELOAD_COND2(dest, src) | - |
2519 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2520 | 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); | - |
2521 | 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)); | - |
2522 | } | 0 |
2523 | } | 0 |
2524 | } | - |
2525 | | - |
2526 | struct QFullCoverage { | - |
2527 | inline void store(uint *dest, const uint src) const | - |
2528 | { | - |
2529 | *dest = src; executed (the execution status of this line is deduced): *dest = src; | - |
2530 | } executed: } Execution Count:871472 | 871472 |
2531 | }; | - |
2532 | | - |
2533 | struct QPartialCoverage { | - |
2534 | inline QPartialCoverage(uint const_alpha) | - |
2535 | : ca(const_alpha) | - |
2536 | , ica(255 - const_alpha) | - |
2537 | { | - |
2538 | } | 0 |
2539 | | - |
2540 | inline void store(uint *dest, const uint src) const | - |
2541 | { | - |
2542 | *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); | - |
2543 | } | 0 |
2544 | | - |
2545 | private: | - |
2546 | const uint ca; | - |
2547 | const uint ica; | - |
2548 | }; | - |
2549 | | - |
2550 | static inline int mix_alpha(int da, int sa) | - |
2551 | { | - |
2552 | return 255 - ((255 - sa) * (255 - da) >> 8); executed: return 255 - ((255 - sa) * (255 - da) >> 8); Execution Count:701472 | 701472 |
2553 | } | - |
2554 | | - |
2555 | /* | - |
2556 | Dca' = Sca.Da + Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2557 | = Sca + Dca | - |
2558 | */ | - |
2559 | template <typename T> | - |
2560 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Plus_impl(uint *dest, int length, uint color, const T &coverage) | - |
2561 | { | - |
2562 | uint s = color; executed (the execution status of this line is deduced): uint s = color; | - |
2563 | | - |
2564 | PRELOAD_INIT(dest) | - |
2565 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:170000 | yes Evaluation Count:1700 |
| 1700-170000 |
2566 | PRELOAD_COND(dest) | - |
2567 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2568 | 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); | - |
2569 | coverage.store(&dest[i], d); executed (the execution status of this line is deduced): coverage.store(&dest[i], d); | - |
2570 | } executed: } Execution Count:170000 | 170000 |
2571 | } executed: } Execution Count:1700 | 1700 |
2572 | | - |
2573 | void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha) | - |
2574 | { | - |
2575 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:1700 | no Evaluation Count:0 |
| 0-1700 |
2576 | comp_func_solid_Plus_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Plus_impl(dest, length, color, QFullCoverage()); Execution Count:1700 | 1700 |
2577 | else | - |
2578 | 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 |
2579 | } | - |
2580 | | - |
2581 | template <typename T> | - |
2582 | 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) | - |
2583 | { | - |
2584 | PRELOAD_INIT2(dest, src) | - |
2585 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2586 | PRELOAD_COND2(dest, src) | - |
2587 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2588 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2589 | | - |
2590 | 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); | - |
2591 | | - |
2592 | coverage.store(&dest[i], d); never executed (the execution status of this line is deduced): coverage.store(&dest[i], d); | - |
2593 | } | 0 |
2594 | } | 0 |
2595 | | - |
2596 | void QT_FASTCALL comp_func_Plus(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2597 | { | - |
2598 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2599 | comp_func_Plus_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Plus_impl(dest, src, length, QFullCoverage()); | 0 |
2600 | else | - |
2601 | comp_func_Plus_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Plus_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2602 | } | - |
2603 | | - |
2604 | /* | - |
2605 | Dca' = Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2606 | */ | - |
2607 | static inline int multiply_op(int dst, int src, int da, int sa) | - |
2608 | { | - |
2609 | 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 |
2610 | } | - |
2611 | | - |
2612 | template <typename T> | - |
2613 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Multiply_impl(uint *dest, int length, uint color, const T &coverage) | - |
2614 | { | - |
2615 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2616 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2617 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2618 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2619 | | - |
2620 | PRELOAD_INIT(dest) | - |
2621 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
2622 | PRELOAD_COND(dest) | - |
2623 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2624 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2625 | | - |
2626 | #define OP(a, b) multiply_op(a, b, da, sa) | - |
2627 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = multiply_op(qRed(d), sr, da, sa); | - |
2628 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = multiply_op(qBlue(d), sb, da, sa); | - |
2629 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = multiply_op(qGreen(d), sg, da, sa); | - |
2630 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2631 | #undef OP | - |
2632 | | - |
2633 | 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)); | - |
2634 | } executed: } Execution Count:70000 | 70000 |
2635 | } executed: } Execution Count:700 | 700 |
2636 | | - |
2637 | void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha) | - |
2638 | { | - |
2639 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
2640 | comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
2641 | else | - |
2642 | 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 |
2643 | } | - |
2644 | | - |
2645 | template <typename T> | - |
2646 | 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) | - |
2647 | { | - |
2648 | PRELOAD_INIT2(dest, src) | - |
2649 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2650 | PRELOAD_COND2(dest, src) | - |
2651 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2652 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2653 | | - |
2654 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2655 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2656 | | - |
2657 | #define OP(a, b) multiply_op(a, b, da, sa) | - |
2658 | 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); | - |
2659 | 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); | - |
2660 | 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); | - |
2661 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2662 | #undef OP | - |
2663 | | - |
2664 | 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)); | - |
2665 | } | 0 |
2666 | } | 0 |
2667 | | - |
2668 | void QT_FASTCALL comp_func_Multiply(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2669 | { | - |
2670 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2671 | comp_func_Multiply_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Multiply_impl(dest, src, length, QFullCoverage()); | 0 |
2672 | else | - |
2673 | comp_func_Multiply_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Multiply_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2674 | } | - |
2675 | | - |
2676 | /* | - |
2677 | Dca' = (Sca.Da + Dca.Sa - Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2678 | = Sca + Dca - Sca.Dca | - |
2679 | */ | - |
2680 | template <typename T> | - |
2681 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Screen_impl(uint *dest, int length, uint color, const T &coverage) | - |
2682 | { | - |
2683 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2684 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2685 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2686 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2687 | | - |
2688 | PRELOAD_INIT(dest) | - |
2689 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:111472 | yes Evaluation Count:988 |
| 988-111472 |
2690 | PRELOAD_COND(dest) | - |
2691 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2692 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2693 | | - |
2694 | #define OP(a, b) 255 - qt_div_255((255-a) * (255-b)) | - |
2695 | 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)); | - |
2696 | 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)); | - |
2697 | 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)); | - |
2698 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2699 | #undef OP | - |
2700 | | - |
2701 | 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)); | - |
2702 | } executed: } Execution Count:111472 | 111472 |
2703 | } executed: } Execution Count:988 | 988 |
2704 | | - |
2705 | void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha) | - |
2706 | { | - |
2707 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:988 | no Evaluation Count:0 |
| 0-988 |
2708 | comp_func_solid_Screen_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Screen_impl(dest, length, color, QFullCoverage()); Execution Count:988 | 988 |
2709 | else | - |
2710 | 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 |
2711 | } | - |
2712 | | - |
2713 | template <typename T> | - |
2714 | 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) | - |
2715 | { | - |
2716 | PRELOAD_INIT2(dest, src) | - |
2717 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2718 | PRELOAD_COND2(dest, src) | - |
2719 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2720 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2721 | | - |
2722 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2723 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2724 | | - |
2725 | #define OP(a, b) 255 - (((255-a) * (255-b)) >> 8) | - |
2726 | 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); | - |
2727 | 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); | - |
2728 | 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); | - |
2729 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2730 | #undef OP | - |
2731 | | - |
2732 | 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)); | - |
2733 | } | 0 |
2734 | } | 0 |
2735 | | - |
2736 | void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha) | - |
2737 | { | - |
2738 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2739 | comp_func_Screen_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Screen_impl(dest, src, length, QFullCoverage()); | 0 |
2740 | else | - |
2741 | comp_func_Screen_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Screen_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2742 | } | - |
2743 | | - |
2744 | /* | - |
2745 | if 2.Dca < Da | - |
2746 | Dca' = 2.Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2747 | otherwise | - |
2748 | Dca' = Sa.Da - 2.(Da - Dca).(Sa - Sca) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2749 | */ | - |
2750 | static inline int overlay_op(int dst, int src, int da, int sa) | - |
2751 | { | - |
2752 | 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); | - |
2753 | if (2 * dst < da) evaluated: 2 * dst < da yes Evaluation Count:60000 | yes Evaluation Count:60000 |
| 60000 |
2754 | return qt_div_255(2 * src * dst + temp); executed: return qt_div_255(2 * src * dst + temp); Execution Count:60000 | 60000 |
2755 | else | - |
2756 | 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 |
2757 | } | - |
2758 | | - |
2759 | template <typename T> | - |
2760 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Overlay_impl(uint *dest, int length, uint color, const T &coverage) | - |
2761 | { | - |
2762 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2763 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2764 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2765 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2766 | | - |
2767 | PRELOAD_INIT(dest) | - |
2768 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:40000 | yes Evaluation Count:400 |
| 400-40000 |
2769 | PRELOAD_COND(dest) | - |
2770 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2771 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2772 | | - |
2773 | #define OP(a, b) overlay_op(a, b, da, sa) | - |
2774 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = overlay_op(qRed(d), sr, da, sa); | - |
2775 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = overlay_op(qBlue(d), sb, da, sa); | - |
2776 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = overlay_op(qGreen(d), sg, da, sa); | - |
2777 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2778 | #undef OP | - |
2779 | | - |
2780 | 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)); | - |
2781 | } executed: } Execution Count:40000 | 40000 |
2782 | } executed: } Execution Count:400 | 400 |
2783 | | - |
2784 | void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha) | - |
2785 | { | - |
2786 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:400 | no Evaluation Count:0 |
| 0-400 |
2787 | comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage()); Execution Count:400 | 400 |
2788 | else | - |
2789 | 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 |
2790 | } | - |
2791 | | - |
2792 | template <typename T> | - |
2793 | 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) | - |
2794 | { | - |
2795 | PRELOAD_INIT2(dest, src) | - |
2796 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2797 | PRELOAD_COND2(dest, src) | - |
2798 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2799 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2800 | | - |
2801 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2802 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2803 | | - |
2804 | #define OP(a, b) overlay_op(a, b, da, sa) | - |
2805 | 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); | - |
2806 | 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); | - |
2807 | 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); | - |
2808 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2809 | #undef OP | - |
2810 | | - |
2811 | 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)); | - |
2812 | } | 0 |
2813 | } | 0 |
2814 | | - |
2815 | void QT_FASTCALL comp_func_Overlay(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2816 | { | - |
2817 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2818 | comp_func_Overlay_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Overlay_impl(dest, src, length, QFullCoverage()); | 0 |
2819 | else | - |
2820 | comp_func_Overlay_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Overlay_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2821 | } | - |
2822 | | - |
2823 | /* | - |
2824 | Dca' = min(Sca.Da, Dca.Sa) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2825 | Da' = Sa + Da - Sa.Da | - |
2826 | */ | - |
2827 | static inline int darken_op(int dst, int src, int da, int sa) | - |
2828 | { | - |
2829 | 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 |
2830 | } | - |
2831 | | - |
2832 | template <typename T> | - |
2833 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Darken_impl(uint *dest, int length, uint color, const T &coverage) | - |
2834 | { | - |
2835 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2836 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2837 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2838 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2839 | | - |
2840 | PRELOAD_INIT(dest) | - |
2841 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
2842 | PRELOAD_COND(dest) | - |
2843 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2844 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2845 | | - |
2846 | #define OP(a, b) darken_op(a, b, da, sa) | - |
2847 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = darken_op(qRed(d), sr, da, sa); | - |
2848 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = darken_op(qBlue(d), sb, da, sa); | - |
2849 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = darken_op(qGreen(d), sg, da, sa); | - |
2850 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2851 | #undef OP | - |
2852 | | - |
2853 | 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)); | - |
2854 | } executed: } Execution Count:70000 | 70000 |
2855 | } executed: } Execution Count:700 | 700 |
2856 | | - |
2857 | void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha) | - |
2858 | { | - |
2859 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
2860 | comp_func_solid_Darken_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Darken_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
2861 | else | - |
2862 | 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 |
2863 | } | - |
2864 | | - |
2865 | template <typename T> | - |
2866 | 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) | - |
2867 | { | - |
2868 | PRELOAD_INIT2(dest, src) | - |
2869 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2870 | PRELOAD_COND2(dest, src) | - |
2871 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2872 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2873 | | - |
2874 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2875 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2876 | | - |
2877 | #define OP(a, b) darken_op(a, b, da, sa) | - |
2878 | 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); | - |
2879 | 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); | - |
2880 | 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); | - |
2881 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2882 | #undef OP | - |
2883 | | - |
2884 | 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)); | - |
2885 | } | 0 |
2886 | } | 0 |
2887 | | - |
2888 | void QT_FASTCALL comp_func_Darken(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2889 | { | - |
2890 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2891 | comp_func_Darken_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Darken_impl(dest, src, length, QFullCoverage()); | 0 |
2892 | else | - |
2893 | comp_func_Darken_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Darken_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2894 | } | - |
2895 | | - |
2896 | /* | - |
2897 | Dca' = max(Sca.Da, Dca.Sa) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2898 | Da' = Sa + Da - Sa.Da | - |
2899 | */ | - |
2900 | static inline int lighten_op(int dst, int src, int da, int sa) | - |
2901 | { | - |
2902 | 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 |
2903 | } | - |
2904 | | - |
2905 | template <typename T> | - |
2906 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Lighten_impl(uint *dest, int length, uint color, const T &coverage) | - |
2907 | { | - |
2908 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2909 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2910 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2911 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2912 | | - |
2913 | PRELOAD_INIT(dest) | - |
2914 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
2915 | PRELOAD_COND(dest) | - |
2916 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2917 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2918 | | - |
2919 | #define OP(a, b) lighten_op(a, b, da, sa) | - |
2920 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = lighten_op(qRed(d), sr, da, sa); | - |
2921 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = lighten_op(qBlue(d), sb, da, sa); | - |
2922 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = lighten_op(qGreen(d), sg, da, sa); | - |
2923 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2924 | #undef OP | - |
2925 | | - |
2926 | 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)); | - |
2927 | } executed: } Execution Count:70000 | 70000 |
2928 | } executed: } Execution Count:700 | 700 |
2929 | | - |
2930 | void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha) | - |
2931 | { | - |
2932 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
2933 | comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
2934 | else | - |
2935 | 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 |
2936 | } | - |
2937 | | - |
2938 | template <typename T> | - |
2939 | 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) | - |
2940 | { | - |
2941 | PRELOAD_INIT2(dest, src) | - |
2942 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
2943 | PRELOAD_COND2(dest, src) | - |
2944 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
2945 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
2946 | | - |
2947 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
2948 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
2949 | | - |
2950 | #define OP(a, b) lighten_op(a, b, da, sa) | - |
2951 | 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); | - |
2952 | 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); | - |
2953 | 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); | - |
2954 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
2955 | #undef OP | - |
2956 | | - |
2957 | 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)); | - |
2958 | } | 0 |
2959 | } | 0 |
2960 | | - |
2961 | void QT_FASTCALL comp_func_Lighten(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
2962 | { | - |
2963 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
2964 | comp_func_Lighten_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Lighten_impl(dest, src, length, QFullCoverage()); | 0 |
2965 | else | - |
2966 | comp_func_Lighten_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Lighten_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
2967 | } | - |
2968 | | - |
2969 | /* | - |
2970 | if Sca.Da + Dca.Sa >= Sa.Da | - |
2971 | Dca' = Sa.Da + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2972 | otherwise | - |
2973 | Dca' = Dca.Sa/(1-Sca/Sa) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
2974 | */ | - |
2975 | static inline int color_dodge_op(int dst, int src, int da, int sa) | - |
2976 | { | - |
2977 | const int sa_da = sa * da; executed (the execution status of this line is deduced): const int sa_da = sa * da; | - |
2978 | const int dst_sa = dst * sa; executed (the execution status of this line is deduced): const int dst_sa = dst * sa; | - |
2979 | const int src_da = src * da; executed (the execution status of this line is deduced): const int src_da = src * da; | - |
2980 | | - |
2981 | 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); | - |
2982 | if (src_da + dst_sa >= sa_da) evaluated: src_da + dst_sa >= sa_da yes Evaluation Count:90000 | yes Evaluation Count:60000 |
| 60000-90000 |
2983 | return qt_div_255(sa_da + temp); executed: return qt_div_255(sa_da + temp); Execution Count:90000 | 90000 |
2984 | else | - |
2985 | 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 |
2986 | } | - |
2987 | | - |
2988 | template <typename T> | - |
2989 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorDodge_impl(uint *dest, int length, uint color, const T &coverage) | - |
2990 | { | - |
2991 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
2992 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
2993 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
2994 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
2995 | | - |
2996 | PRELOAD_INIT(dest) | - |
2997 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:50000 | yes Evaluation Count:500 |
| 500-50000 |
2998 | PRELOAD_COND(dest) | - |
2999 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3000 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3001 | | - |
3002 | #define OP(a,b) color_dodge_op(a, b, da, sa) | - |
3003 | 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); | - |
3004 | 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); | - |
3005 | 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); | - |
3006 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3007 | #undef OP | - |
3008 | | - |
3009 | 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)); | - |
3010 | } executed: } Execution Count:50000 | 50000 |
3011 | } executed: } Execution Count:500 | 500 |
3012 | | - |
3013 | void QT_FASTCALL comp_func_solid_ColorDodge(uint *dest, int length, uint color, uint const_alpha) | - |
3014 | { | - |
3015 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:500 | no Evaluation Count:0 |
| 0-500 |
3016 | comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage()); Execution Count:500 | 500 |
3017 | else | - |
3018 | 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 |
3019 | } | - |
3020 | | - |
3021 | template <typename T> | - |
3022 | 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) | - |
3023 | { | - |
3024 | PRELOAD_INIT2(dest, src) | - |
3025 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3026 | PRELOAD_COND2(dest, src) | - |
3027 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3028 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3029 | | - |
3030 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3031 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3032 | | - |
3033 | #define OP(a, b) color_dodge_op(a, b, da, sa) | - |
3034 | 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); | - |
3035 | 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); | - |
3036 | 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); | - |
3037 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3038 | #undef OP | - |
3039 | | - |
3040 | 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)); | - |
3041 | } | 0 |
3042 | } | 0 |
3043 | | - |
3044 | void QT_FASTCALL comp_func_ColorDodge(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3045 | { | - |
3046 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3047 | comp_func_ColorDodge_impl(dest, src, length, QFullCoverage()); never executed: comp_func_ColorDodge_impl(dest, src, length, QFullCoverage()); | 0 |
3048 | else | - |
3049 | comp_func_ColorDodge_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_ColorDodge_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3050 | } | - |
3051 | | - |
3052 | /* | - |
3053 | if Sca.Da + Dca.Sa <= Sa.Da | - |
3054 | Dca' = Sca.(1 - Da) + Dca.(1 - Sa) | - |
3055 | otherwise | - |
3056 | Dca' = Sa.(Sca.Da + Dca.Sa - Sa.Da)/Sca + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3057 | */ | - |
3058 | static inline int color_burn_op(int dst, int src, int da, int sa) | - |
3059 | { | - |
3060 | const int src_da = src * da; executed (the execution status of this line is deduced): const int src_da = src * da; | - |
3061 | const int dst_sa = dst * sa; executed (the execution status of this line is deduced): const int dst_sa = dst * sa; | - |
3062 | const int sa_da = sa * da; executed (the execution status of this line is deduced): const int sa_da = sa * da; | - |
3063 | | - |
3064 | 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); | - |
3065 | | - |
3066 | 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 |
3067 | return qt_div_255(temp); executed: return qt_div_255(temp); Execution Count:60000 | 60000 |
3068 | 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 |
3069 | } | - |
3070 | | - |
3071 | template <typename T> | - |
3072 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorBurn_impl(uint *dest, int length, uint color, const T &coverage) | - |
3073 | { | - |
3074 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3075 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3076 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3077 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3078 | | - |
3079 | PRELOAD_INIT(dest) | - |
3080 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:50000 | yes Evaluation Count:500 |
| 500-50000 |
3081 | PRELOAD_COND(dest) | - |
3082 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3083 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3084 | | - |
3085 | #define OP(a, b) color_burn_op(a, b, da, sa) | - |
3086 | 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); | - |
3087 | 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); | - |
3088 | 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); | - |
3089 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3090 | #undef OP | - |
3091 | | - |
3092 | 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)); | - |
3093 | } executed: } Execution Count:50000 | 50000 |
3094 | } executed: } Execution Count:500 | 500 |
3095 | | - |
3096 | void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha) | - |
3097 | { | - |
3098 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:500 | no Evaluation Count:0 |
| 0-500 |
3099 | comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage()); Execution Count:500 | 500 |
3100 | else | - |
3101 | 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 |
3102 | } | - |
3103 | | - |
3104 | template <typename T> | - |
3105 | 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) | - |
3106 | { | - |
3107 | PRELOAD_INIT2(dest, src) | - |
3108 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3109 | PRELOAD_COND2(dest, src) | - |
3110 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3111 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3112 | | - |
3113 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3114 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3115 | | - |
3116 | #define OP(a, b) color_burn_op(a, b, da, sa) | - |
3117 | 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); | - |
3118 | 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); | - |
3119 | 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); | - |
3120 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3121 | #undef OP | - |
3122 | | - |
3123 | 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)); | - |
3124 | } | 0 |
3125 | } | 0 |
3126 | | - |
3127 | void QT_FASTCALL comp_func_ColorBurn(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3128 | { | - |
3129 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3130 | comp_func_ColorBurn_impl(dest, src, length, QFullCoverage()); never executed: comp_func_ColorBurn_impl(dest, src, length, QFullCoverage()); | 0 |
3131 | else | - |
3132 | comp_func_ColorBurn_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_ColorBurn_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3133 | } | - |
3134 | | - |
3135 | /* | - |
3136 | if 2.Sca < Sa | - |
3137 | Dca' = 2.Sca.Dca + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3138 | otherwise | - |
3139 | Dca' = Sa.Da - 2.(Da - Dca).(Sa - Sca) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3140 | */ | - |
3141 | static inline uint hardlight_op(int dst, int src, int da, int sa) | - |
3142 | { | - |
3143 | 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); | - |
3144 | | - |
3145 | if (2 * src < sa) evaluated: 2 * src < sa yes Evaluation Count:120000 | yes Evaluation Count:30000 |
| 30000-120000 |
3146 | return qt_div_255(2 * src * dst + temp); executed: return qt_div_255(2 * src * dst + temp); Execution Count:120000 | 120000 |
3147 | else | - |
3148 | 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 |
3149 | } | - |
3150 | | - |
3151 | template <typename T> | - |
3152 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_HardLight_impl(uint *dest, int length, uint color, const T &coverage) | - |
3153 | { | - |
3154 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3155 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3156 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3157 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3158 | | - |
3159 | PRELOAD_INIT(dest) | - |
3160 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:50000 | yes Evaluation Count:500 |
| 500-50000 |
3161 | PRELOAD_COND(dest) | - |
3162 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3163 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3164 | | - |
3165 | #define OP(a, b) hardlight_op(a, b, da, sa) | - |
3166 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = hardlight_op(qRed(d), sr, da, sa); | - |
3167 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = hardlight_op(qBlue(d), sb, da, sa); | - |
3168 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = hardlight_op(qGreen(d), sg, da, sa); | - |
3169 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3170 | #undef OP | - |
3171 | | - |
3172 | 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)); | - |
3173 | } executed: } Execution Count:50000 | 50000 |
3174 | } executed: } Execution Count:500 | 500 |
3175 | | - |
3176 | void QT_FASTCALL comp_func_solid_HardLight(uint *dest, int length, uint color, uint const_alpha) | - |
3177 | { | - |
3178 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:500 | no Evaluation Count:0 |
| 0-500 |
3179 | comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage()); Execution Count:500 | 500 |
3180 | else | - |
3181 | 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 |
3182 | } | - |
3183 | | - |
3184 | template <typename T> | - |
3185 | 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) | - |
3186 | { | - |
3187 | PRELOAD_INIT2(dest, src) | - |
3188 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3189 | PRELOAD_COND2(dest, src) | - |
3190 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3191 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3192 | | - |
3193 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3194 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3195 | | - |
3196 | #define OP(a, b) hardlight_op(a, b, da, sa) | - |
3197 | 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); | - |
3198 | 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); | - |
3199 | 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); | - |
3200 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3201 | #undef OP | - |
3202 | | - |
3203 | 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)); | - |
3204 | } | 0 |
3205 | } | 0 |
3206 | | - |
3207 | void QT_FASTCALL comp_func_HardLight(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3208 | { | - |
3209 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3210 | comp_func_HardLight_impl(dest, src, length, QFullCoverage()); never executed: comp_func_HardLight_impl(dest, src, length, QFullCoverage()); | 0 |
3211 | else | - |
3212 | comp_func_HardLight_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_HardLight_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3213 | } | - |
3214 | | - |
3215 | /* | - |
3216 | if 2.Sca <= Sa | - |
3217 | Dca' = Dca.(Sa + (2.Sca - Sa).(1 - Dca/Da)) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3218 | otherwise if 2.Sca > Sa and 4.Dca <= Da | - |
3219 | 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) | - |
3220 | otherwise if 2.Sca > Sa and 4.Dca > Da | - |
3221 | Dca' = Dca.Sa + Da.(2.Sca - Sa).((Dca/Da)^0.5 - Dca/Da) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3222 | */ | - |
3223 | static inline int soft_light_op(int dst, int src, int da, int sa) | - |
3224 | { | - |
3225 | const int src2 = src << 1; executed (the execution status of this line is deduced): const int src2 = src << 1; | - |
3226 | const int dst_np = da != 0 ? (255 * dst) / da : 0; partially evaluated: da != 0 yes Evaluation Count:150000 | no Evaluation Count:0 |
| 0-150000 |
3227 | 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; | - |
3228 | | - |
3229 | if (src2 < sa) evaluated: src2 < sa yes Evaluation Count:120000 | yes Evaluation Count:30000 |
| 30000-120000 |
3230 | 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 |
3231 | else if (4 * dst <= da) partially evaluated: 4 * dst <= da no Evaluation Count:0 | yes Evaluation Count:30000 |
| 0-30000 |
3232 | 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 |
3233 | else { | - |
3234 | # ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 | - |
3235 | return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025; | - |
3236 | # else | - |
3237 | 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 |
3238 | # endif | - |
3239 | } | - |
3240 | } | - |
3241 | | - |
3242 | template <typename T> | - |
3243 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_SoftLight_impl(uint *dest, int length, uint color, const T &coverage) | - |
3244 | { | - |
3245 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3246 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3247 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3248 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3249 | | - |
3250 | PRELOAD_INIT(dest) | - |
3251 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:50000 | yes Evaluation Count:500 |
| 500-50000 |
3252 | PRELOAD_COND(dest) | - |
3253 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3254 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3255 | | - |
3256 | #define OP(a, b) soft_light_op(a, b, da, sa) | - |
3257 | 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); | - |
3258 | 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); | - |
3259 | 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); | - |
3260 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3261 | #undef OP | - |
3262 | | - |
3263 | 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)); | - |
3264 | } executed: } Execution Count:50000 | 50000 |
3265 | } executed: } Execution Count:500 | 500 |
3266 | | - |
3267 | void QT_FASTCALL comp_func_solid_SoftLight(uint *dest, int length, uint color, uint const_alpha) | - |
3268 | { | - |
3269 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:500 | no Evaluation Count:0 |
| 0-500 |
3270 | comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage()); Execution Count:500 | 500 |
3271 | else | - |
3272 | 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 |
3273 | } | - |
3274 | | - |
3275 | template <typename T> | - |
3276 | 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) | - |
3277 | { | - |
3278 | PRELOAD_INIT2(dest, src) | - |
3279 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3280 | PRELOAD_COND2(dest, src) | - |
3281 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3282 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3283 | | - |
3284 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3285 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3286 | | - |
3287 | #define OP(a, b) soft_light_op(a, b, da, sa) | - |
3288 | 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); | - |
3289 | 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); | - |
3290 | 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); | - |
3291 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3292 | #undef OP | - |
3293 | | - |
3294 | 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)); | - |
3295 | } | 0 |
3296 | } | 0 |
3297 | | - |
3298 | void QT_FASTCALL comp_func_SoftLight(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3299 | { | - |
3300 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3301 | comp_func_SoftLight_impl(dest, src, length, QFullCoverage()); never executed: comp_func_SoftLight_impl(dest, src, length, QFullCoverage()); | 0 |
3302 | else | - |
3303 | comp_func_SoftLight_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_SoftLight_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3304 | } | - |
3305 | | - |
3306 | /* | - |
3307 | Dca' = abs(Dca.Sa - Sca.Da) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3308 | = Sca + Dca - 2.min(Sca.Da, Dca.Sa) | - |
3309 | */ | - |
3310 | static inline int difference_op(int dst, int src, int da, int sa) | - |
3311 | { | - |
3312 | 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 |
3313 | } | - |
3314 | | - |
3315 | template <typename T> | - |
3316 | Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Difference_impl(uint *dest, int length, uint color, const T &coverage) | - |
3317 | { | - |
3318 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3319 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3320 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3321 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3322 | | - |
3323 | PRELOAD_INIT(dest) | - |
3324 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
3325 | PRELOAD_COND(dest) | - |
3326 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3327 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3328 | | - |
3329 | #define OP(a, b) difference_op(a, b, da, sa) | - |
3330 | int r = OP( qRed(d), sr); executed (the execution status of this line is deduced): int r = difference_op(qRed(d), sr, da, sa); | - |
3331 | int b = OP( qBlue(d), sb); executed (the execution status of this line is deduced): int b = difference_op(qBlue(d), sb, da, sa); | - |
3332 | int g = OP(qGreen(d), sg); executed (the execution status of this line is deduced): int g = difference_op(qGreen(d), sg, da, sa); | - |
3333 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3334 | #undef OP | - |
3335 | | - |
3336 | 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)); | - |
3337 | } executed: } Execution Count:70000 | 70000 |
3338 | } executed: } Execution Count:700 | 700 |
3339 | | - |
3340 | void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha) | - |
3341 | { | - |
3342 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
3343 | comp_func_solid_Difference_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Difference_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
3344 | else | - |
3345 | 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 |
3346 | } | - |
3347 | | - |
3348 | template <typename T> | - |
3349 | 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) | - |
3350 | { | - |
3351 | PRELOAD_INIT2(dest, src) | - |
3352 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3353 | PRELOAD_COND2(dest, src) | - |
3354 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3355 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3356 | | - |
3357 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3358 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3359 | | - |
3360 | #define OP(a, b) difference_op(a, b, da, sa) | - |
3361 | 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); | - |
3362 | 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); | - |
3363 | 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); | - |
3364 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3365 | #undef OP | - |
3366 | | - |
3367 | 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)); | - |
3368 | } | 0 |
3369 | } | 0 |
3370 | | - |
3371 | void QT_FASTCALL comp_func_Difference(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3372 | { | - |
3373 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3374 | comp_func_Difference_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Difference_impl(dest, src, length, QFullCoverage()); | 0 |
3375 | else | - |
3376 | comp_func_Difference_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Difference_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3377 | } | - |
3378 | | - |
3379 | /* | - |
3380 | Dca' = (Sca.Da + Dca.Sa - 2.Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa) | - |
3381 | */ | - |
3382 | template <typename T> | - |
3383 | Q_STATIC_TEMPLATE_FUNCTION inline void QT_FASTCALL comp_func_solid_Exclusion_impl(uint *dest, int length, uint color, const T &coverage) | - |
3384 | { | - |
3385 | int sa = qAlpha(color); executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
3386 | int sr = qRed(color); executed (the execution status of this line is deduced): int sr = qRed(color); | - |
3387 | int sg = qGreen(color); executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
3388 | int sb = qBlue(color); executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
3389 | | - |
3390 | PRELOAD_INIT(dest) | - |
3391 | for (int i = 0; i < length; ++i) { evaluated: i < length yes Evaluation Count:70000 | yes Evaluation Count:700 |
| 700-70000 |
3392 | PRELOAD_COND(dest) | - |
3393 | uint d = dest[i]; executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3394 | int da = qAlpha(d); executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3395 | | - |
3396 | #define OP(a, b) (a + b - qt_div_255(2*(a*b))) | - |
3397 | 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))); | - |
3398 | 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))); | - |
3399 | 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))); | - |
3400 | int a = mix_alpha(da, sa); executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3401 | #undef OP | - |
3402 | | - |
3403 | 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)); | - |
3404 | } executed: } Execution Count:70000 | 70000 |
3405 | } executed: } Execution Count:700 | 700 |
3406 | | - |
3407 | void QT_FASTCALL comp_func_solid_Exclusion(uint *dest, int length, uint color, uint const_alpha) | - |
3408 | { | - |
3409 | if (const_alpha == 255) partially evaluated: const_alpha == 255 yes Evaluation Count:700 | no Evaluation Count:0 |
| 0-700 |
3410 | comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage()); executed: comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage()); Execution Count:700 | 700 |
3411 | else | - |
3412 | 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 |
3413 | } | - |
3414 | | - |
3415 | template <typename T> | - |
3416 | 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) | - |
3417 | { | - |
3418 | PRELOAD_INIT2(dest, src) | - |
3419 | for (int i = 0; i < length; ++i) { never evaluated: i < length | 0 |
3420 | PRELOAD_COND2(dest, src) | - |
3421 | uint d = dest[i]; never executed (the execution status of this line is deduced): uint d = dest[i]; | - |
3422 | uint s = src[i]; never executed (the execution status of this line is deduced): uint s = src[i]; | - |
3423 | | - |
3424 | int da = qAlpha(d); never executed (the execution status of this line is deduced): int da = qAlpha(d); | - |
3425 | int sa = qAlpha(s); never executed (the execution status of this line is deduced): int sa = qAlpha(s); | - |
3426 | | - |
3427 | #define OP(a, b) (a + b - ((a*b) >> 7)) | - |
3428 | 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)); | - |
3429 | 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)); | - |
3430 | 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)); | - |
3431 | int a = mix_alpha(da, sa); never executed (the execution status of this line is deduced): int a = mix_alpha(da, sa); | - |
3432 | #undef OP | - |
3433 | | - |
3434 | 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)); | - |
3435 | } | 0 |
3436 | } | 0 |
3437 | | - |
3438 | void QT_FASTCALL comp_func_Exclusion(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha) | - |
3439 | { | - |
3440 | if (const_alpha == 255) never evaluated: const_alpha == 255 | 0 |
3441 | comp_func_Exclusion_impl(dest, src, length, QFullCoverage()); never executed: comp_func_Exclusion_impl(dest, src, length, QFullCoverage()); | 0 |
3442 | else | - |
3443 | comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha)); never executed: comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha)); | 0 |
3444 | } | - |
3445 | | - |
3446 | #if defined(Q_CC_RVCT) | - |
3447 | // Restore pragma state from previous #pragma arm | - |
3448 | # pragma pop | - |
3449 | #endif | - |
3450 | | - |
3451 | void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, | - |
3452 | int length, | - |
3453 | uint color, | - |
3454 | uint const_alpha) | - |
3455 | { | - |
3456 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3457 | while (length--) never evaluated: length-- | 0 |
3458 | *dest++ |= color; never executed: *dest++ |= color; | 0 |
3459 | } | 0 |
3460 | | - |
3461 | void QT_FASTCALL rasterop_SourceOrDestination(uint *Q_DECL_RESTRICT dest, | - |
3462 | const uint *Q_DECL_RESTRICT src, | - |
3463 | int length, | - |
3464 | uint const_alpha) | - |
3465 | { | - |
3466 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3467 | while (length--) never evaluated: length-- | 0 |
3468 | *dest++ |= *src++; never executed: *dest++ |= *src++; | 0 |
3469 | } | 0 |
3470 | | - |
3471 | void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest, | - |
3472 | int length, | - |
3473 | uint color, | - |
3474 | uint const_alpha) | - |
3475 | { | - |
3476 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3477 | color |= 0xff000000; never executed (the execution status of this line is deduced): color |= 0xff000000; | - |
3478 | while (length--) never evaluated: length-- | 0 |
3479 | *dest++ &= color; never executed: *dest++ &= color; | 0 |
3480 | } | 0 |
3481 | | - |
3482 | void QT_FASTCALL rasterop_SourceAndDestination(uint *Q_DECL_RESTRICT dest, | - |
3483 | const uint *Q_DECL_RESTRICT src, | - |
3484 | int length, | - |
3485 | uint const_alpha) | - |
3486 | { | - |
3487 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3488 | while (length--) { never evaluated: length-- | 0 |
3489 | *dest = (*src & *dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (*src & *dest) | 0xff000000; | - |
3490 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3491 | } | 0 |
3492 | } | 0 |
3493 | | - |
3494 | void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, | - |
3495 | int length, | - |
3496 | uint color, | - |
3497 | uint const_alpha) | - |
3498 | { | - |
3499 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3500 | color &= 0x00ffffff; never executed (the execution status of this line is deduced): color &= 0x00ffffff; | - |
3501 | while (length--) never evaluated: length-- | 0 |
3502 | *dest++ ^= color; never executed: *dest++ ^= color; | 0 |
3503 | } | 0 |
3504 | | - |
3505 | void QT_FASTCALL rasterop_SourceXorDestination(uint *Q_DECL_RESTRICT dest, | - |
3506 | const uint *Q_DECL_RESTRICT src, | - |
3507 | int length, | - |
3508 | uint const_alpha) | - |
3509 | { | - |
3510 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3511 | while (length--) { never evaluated: length-- | 0 |
3512 | *dest = (*src ^ *dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (*src ^ *dest) | 0xff000000; | - |
3513 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3514 | } | 0 |
3515 | } | 0 |
3516 | | - |
3517 | void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest, | - |
3518 | int length, | - |
3519 | uint color, | - |
3520 | uint const_alpha) | - |
3521 | { | - |
3522 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3523 | color = ~color; never executed (the execution status of this line is deduced): color = ~color; | - |
3524 | while (length--) { never evaluated: length-- | 0 |
3525 | *dest = (color & ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (color & ~(*dest)) | 0xff000000; | - |
3526 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3527 | } | 0 |
3528 | } | 0 |
3529 | | - |
3530 | void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3531 | const uint *Q_DECL_RESTRICT src, | - |
3532 | int length, | - |
3533 | uint const_alpha) | - |
3534 | { | - |
3535 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3536 | while (length--) { never evaluated: length-- | 0 |
3537 | *dest = (~(*src) & ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (~(*src) & ~(*dest)) | 0xff000000; | - |
3538 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3539 | } | 0 |
3540 | } | 0 |
3541 | | - |
3542 | void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, | - |
3543 | int length, | - |
3544 | uint color, | - |
3545 | uint const_alpha) | - |
3546 | { | - |
3547 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3548 | color = ~color | 0xff000000; never executed (the execution status of this line is deduced): color = ~color | 0xff000000; | - |
3549 | while (length--) { never evaluated: length-- | 0 |
3550 | *dest = color | ~(*dest); never executed (the execution status of this line is deduced): *dest = color | ~(*dest); | - |
3551 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3552 | } | 0 |
3553 | } | 0 |
3554 | | - |
3555 | void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3556 | const uint *Q_DECL_RESTRICT src, | - |
3557 | int length, | - |
3558 | uint const_alpha) | - |
3559 | { | - |
3560 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3561 | while (length--) { never evaluated: length-- | 0 |
3562 | *dest = ~(*src) | ~(*dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = ~(*src) | ~(*dest) | 0xff000000; | - |
3563 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3564 | } | 0 |
3565 | } | 0 |
3566 | | - |
3567 | void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, | - |
3568 | int length, | - |
3569 | uint color, | - |
3570 | uint const_alpha) | - |
3571 | { | - |
3572 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3573 | color = ~color & 0x00ffffff; never executed (the execution status of this line is deduced): color = ~color & 0x00ffffff; | - |
3574 | while (length--) { never evaluated: length-- | 0 |
3575 | *dest = color ^ (*dest); never executed (the execution status of this line is deduced): *dest = color ^ (*dest); | - |
3576 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3577 | } | 0 |
3578 | } | 0 |
3579 | | - |
3580 | void QT_FASTCALL rasterop_NotSourceXorDestination(uint *Q_DECL_RESTRICT dest, | - |
3581 | const uint *Q_DECL_RESTRICT src, | - |
3582 | int length, | - |
3583 | uint const_alpha) | - |
3584 | { | - |
3585 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3586 | while (length--) { never evaluated: length-- | 0 |
3587 | *dest = ((~(*src)) ^ (*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = ((~(*src)) ^ (*dest)) | 0xff000000; | - |
3588 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3589 | } | 0 |
3590 | } | 0 |
3591 | | - |
3592 | void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, | - |
3593 | uint color, uint const_alpha) | - |
3594 | { | - |
3595 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3596 | qt_memfill(dest, ~color | 0xff000000, length); never executed (the execution status of this line is deduced): qt_memfill(dest, ~color | 0xff000000, length); | - |
3597 | } | 0 |
3598 | | - |
3599 | void QT_FASTCALL rasterop_NotSource(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, | - |
3600 | int length, uint const_alpha) | - |
3601 | { | - |
3602 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3603 | while (length--) never evaluated: length-- | 0 |
3604 | *dest++ = ~(*src++) | 0xff000000; never executed: *dest++ = ~(*src++) | 0xff000000; | 0 |
3605 | } | 0 |
3606 | | - |
3607 | void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, | - |
3608 | int length, | - |
3609 | uint color, | - |
3610 | uint const_alpha) | - |
3611 | { | - |
3612 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3613 | color = ~color | 0xff000000; never executed (the execution status of this line is deduced): color = ~color | 0xff000000; | - |
3614 | while (length--) { never evaluated: length-- | 0 |
3615 | *dest = color & *dest; never executed (the execution status of this line is deduced): *dest = color & *dest; | - |
3616 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3617 | } | 0 |
3618 | } | 0 |
3619 | | - |
3620 | void QT_FASTCALL rasterop_NotSourceAndDestination(uint *Q_DECL_RESTRICT dest, | - |
3621 | const uint *Q_DECL_RESTRICT src, | - |
3622 | int length, | - |
3623 | uint const_alpha) | - |
3624 | { | - |
3625 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3626 | while (length--) { never evaluated: length-- | 0 |
3627 | *dest = (~(*src) & *dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (~(*src) & *dest) | 0xff000000; | - |
3628 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3629 | } | 0 |
3630 | } | 0 |
3631 | | - |
3632 | void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, | - |
3633 | int length, | - |
3634 | uint color, | - |
3635 | uint const_alpha) | - |
3636 | { | - |
3637 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3638 | while (length--) { never evaluated: length-- | 0 |
3639 | *dest = (color & ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (color & ~(*dest)) | 0xff000000; | - |
3640 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3641 | } | 0 |
3642 | } | 0 |
3643 | | - |
3644 | void QT_FASTCALL rasterop_SourceAndNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3645 | const uint *Q_DECL_RESTRICT src, | - |
3646 | int length, | - |
3647 | uint const_alpha) | - |
3648 | { | - |
3649 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3650 | while (length--) { never evaluated: length-- | 0 |
3651 | *dest = (*src & ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (*src & ~(*dest)) | 0xff000000; | - |
3652 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3653 | } | 0 |
3654 | } | 0 |
3655 | | - |
3656 | void QT_FASTCALL rasterop_NotSourceOrDestination(uint *Q_DECL_RESTRICT dest, | - |
3657 | const uint *Q_DECL_RESTRICT src, | - |
3658 | int length, | - |
3659 | uint const_alpha) | - |
3660 | { | - |
3661 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3662 | while (length--) { never evaluated: length-- | 0 |
3663 | *dest = (~(*src) | *dest) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (~(*src) | *dest) | 0xff000000; | - |
3664 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3665 | } | 0 |
3666 | } | 0 |
3667 | | - |
3668 | void QT_FASTCALL rasterop_solid_NotSourceOrDestination(uint *Q_DECL_RESTRICT dest, | - |
3669 | int length, | - |
3670 | uint color, | - |
3671 | uint const_alpha) | - |
3672 | { | - |
3673 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3674 | color = ~color | 0xff000000; never executed (the execution status of this line is deduced): color = ~color | 0xff000000; | - |
3675 | while (length--) never evaluated: length-- | 0 |
3676 | *dest++ |= color; never executed: *dest++ |= color; | 0 |
3677 | } | 0 |
3678 | | - |
3679 | void QT_FASTCALL rasterop_SourceOrNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3680 | const uint *Q_DECL_RESTRICT src, | - |
3681 | int length, | - |
3682 | uint const_alpha) | - |
3683 | { | - |
3684 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3685 | while (length--) { never evaluated: length-- | 0 |
3686 | *dest = (*src | ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (*src | ~(*dest)) | 0xff000000; | - |
3687 | ++dest; ++src; never executed (the execution status of this line is deduced): ++dest; ++src; | - |
3688 | } | 0 |
3689 | } | 0 |
3690 | | - |
3691 | void QT_FASTCALL rasterop_solid_SourceOrNotDestination(uint *Q_DECL_RESTRICT dest, | - |
3692 | int length, | - |
3693 | uint color, | - |
3694 | uint const_alpha) | - |
3695 | { | - |
3696 | Q_UNUSED(const_alpha); never executed (the execution status of this line is deduced): (void)const_alpha;; | - |
3697 | while (length--) { never evaluated: length-- | 0 |
3698 | *dest = (color | ~(*dest)) | 0xff000000; never executed (the execution status of this line is deduced): *dest = (color | ~(*dest)) | 0xff000000; | - |
3699 | ++dest; never executed (the execution status of this line is deduced): ++dest; | - |
3700 | } | 0 |
3701 | } | 0 |
3702 | | - |
3703 | void QT_FASTCALL rasterop_ClearDestination(uint *Q_DECL_RESTRICT dest, | - |
3704 | const uint *Q_DECL_RESTRICT src, | - |
3705 | int length, | - |
3706 | uint const_alpha) | - |
3707 | { | - |
3708 | Q_UNUSED(src); never executed (the execution status of this line is deduced): (void)src;; | - |
3709 | 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); | - |
3710 | } | 0 |
3711 | | - |
3712 | void QT_FASTCALL rasterop_solid_ClearDestination(uint *Q_DECL_RESTRICT dest, | - |
3713 | int length, | - |
3714 | uint color, | - |
3715 | uint const_alpha) | - |
3716 | { | - |
3717 | Q_UNUSED(color); never executed (the execution status of this line is deduced): (void)color;; | - |
3718 | 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); | - |
3719 | } | 0 |
3720 | | - |
3721 | void QT_FASTCALL rasterop_SetDestination(uint *Q_DECL_RESTRICT dest, | - |
3722 | const uint *Q_DECL_RESTRICT src, | - |
3723 | int length, | - |
3724 | uint const_alpha) | - |
3725 | { | - |
3726 | Q_UNUSED(src); never executed (the execution status of this line is deduced): (void)src;; | - |
3727 | 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); | - |
3728 | } | 0 |
3729 | | - |
3730 | void QT_FASTCALL rasterop_solid_SetDestination(uint *Q_DECL_RESTRICT dest, | - |
3731 | int length, | - |
3732 | uint color, | - |
3733 | uint const_alpha) | - |
3734 | { | - |
3735 | Q_UNUSED(color); never executed (the execution status of this line is deduced): (void)color;; | - |
3736 | 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); | - |
3737 | } | 0 |
3738 | | - |
3739 | void QT_FASTCALL rasterop_NotDestination(uint *Q_DECL_RESTRICT dest, | - |
3740 | const uint *Q_DECL_RESTRICT src, | - |
3741 | int length, | - |
3742 | uint const_alpha) | - |
3743 | { | - |
3744 | Q_UNUSED(src); never executed (the execution status of this line is deduced): (void)src;; | - |
3745 | 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); | - |
3746 | } | 0 |
3747 | | - |
3748 | void QT_FASTCALL rasterop_solid_NotDestination(uint *Q_DECL_RESTRICT dest, | - |
3749 | int length, | - |
3750 | uint color, | - |
3751 | uint const_alpha) | - |
3752 | { | - |
3753 | Q_UNUSED(color); never executed (the execution status of this line is deduced): (void)color;; | - |
3754 | 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); | - |
3755 | } | 0 |
3756 | | - |
3757 | static CompositionFunctionSolid functionForModeSolid_C[] = { | - |
3758 | comp_func_solid_SourceOver, | - |
3759 | comp_func_solid_DestinationOver, | - |
3760 | comp_func_solid_Clear, | - |
3761 | comp_func_solid_Source, | - |
3762 | comp_func_solid_Destination, | - |
3763 | comp_func_solid_SourceIn, | - |
3764 | comp_func_solid_DestinationIn, | - |
3765 | comp_func_solid_SourceOut, | - |
3766 | comp_func_solid_DestinationOut, | - |
3767 | comp_func_solid_SourceAtop, | - |
3768 | comp_func_solid_DestinationAtop, | - |
3769 | comp_func_solid_XOR, | - |
3770 | comp_func_solid_Plus, | - |
3771 | comp_func_solid_Multiply, | - |
3772 | comp_func_solid_Screen, | - |
3773 | comp_func_solid_Overlay, | - |
3774 | comp_func_solid_Darken, | - |
3775 | comp_func_solid_Lighten, | - |
3776 | comp_func_solid_ColorDodge, | - |
3777 | comp_func_solid_ColorBurn, | - |
3778 | comp_func_solid_HardLight, | - |
3779 | comp_func_solid_SoftLight, | - |
3780 | comp_func_solid_Difference, | - |
3781 | comp_func_solid_Exclusion, | - |
3782 | rasterop_solid_SourceOrDestination, | - |
3783 | rasterop_solid_SourceAndDestination, | - |
3784 | rasterop_solid_SourceXorDestination, | - |
3785 | rasterop_solid_NotSourceAndNotDestination, | - |
3786 | rasterop_solid_NotSourceOrNotDestination, | - |
3787 | rasterop_solid_NotSourceXorDestination, | - |
3788 | rasterop_solid_NotSource, | - |
3789 | rasterop_solid_NotSourceAndDestination, | - |
3790 | rasterop_solid_SourceAndNotDestination, | - |
3791 | rasterop_solid_SourceAndNotDestination, | - |
3792 | rasterop_solid_NotSourceOrDestination, | - |
3793 | rasterop_solid_SourceOrNotDestination, | - |
3794 | rasterop_solid_ClearDestination, | - |
3795 | rasterop_solid_SetDestination, | - |
3796 | rasterop_solid_NotDestination | - |
3797 | }; | - |
3798 | | - |
3799 | static const CompositionFunctionSolid *functionForModeSolid = functionForModeSolid_C; | - |
3800 | | - |
3801 | static CompositionFunction functionForMode_C[] = { | - |
3802 | comp_func_SourceOver, | - |
3803 | comp_func_DestinationOver, | - |
3804 | comp_func_Clear, | - |
3805 | comp_func_Source, | - |
3806 | comp_func_Destination, | - |
3807 | comp_func_SourceIn, | - |
3808 | comp_func_DestinationIn, | - |
3809 | comp_func_SourceOut, | - |
3810 | comp_func_DestinationOut, | - |
3811 | comp_func_SourceAtop, | - |
3812 | comp_func_DestinationAtop, | - |
3813 | comp_func_XOR, | - |
3814 | comp_func_Plus, | - |
3815 | comp_func_Multiply, | - |
3816 | comp_func_Screen, | - |
3817 | comp_func_Overlay, | - |
3818 | comp_func_Darken, | - |
3819 | comp_func_Lighten, | - |
3820 | comp_func_ColorDodge, | - |
3821 | comp_func_ColorBurn, | - |
3822 | comp_func_HardLight, | - |
3823 | comp_func_SoftLight, | - |
3824 | comp_func_Difference, | - |
3825 | comp_func_Exclusion, | - |
3826 | rasterop_SourceOrDestination, | - |
3827 | rasterop_SourceAndDestination, | - |
3828 | rasterop_SourceXorDestination, | - |
3829 | rasterop_NotSourceAndNotDestination, | - |
3830 | rasterop_NotSourceOrNotDestination, | - |
3831 | rasterop_NotSourceXorDestination, | - |
3832 | rasterop_NotSource, | - |
3833 | rasterop_NotSourceAndDestination, | - |
3834 | rasterop_SourceAndNotDestination, | - |
3835 | rasterop_SourceAndNotDestination, | - |
3836 | rasterop_NotSourceOrDestination, | - |
3837 | rasterop_SourceOrNotDestination, | - |
3838 | rasterop_ClearDestination, | - |
3839 | rasterop_SetDestination, | - |
3840 | rasterop_NotDestination | - |
3841 | }; | - |
3842 | | - |
3843 | static const CompositionFunction *functionForMode = functionForMode_C; | - |
3844 | | - |
3845 | static TextureBlendType getBlendType(const QSpanData *data) | - |
3846 | { | - |
3847 | TextureBlendType ft; executed (the execution status of this line is deduced): TextureBlendType ft; | - |
3848 | if (data->txop <= QTransform::TxTranslate) evaluated: data->txop <= QTransform::TxTranslate yes Evaluation Count:26018 | yes Evaluation Count:62 |
| 62-26018 |
3849 | if (data->texture.type == QTextureData::Tiled) evaluated: data->texture.type == QTextureData::Tiled yes Evaluation Count:23576 | yes Evaluation Count:2442 |
| 2442-23576 |
3850 | ft = BlendTiled; executed: ft = BlendTiled; Execution Count:23576 | 23576 |
3851 | else | - |
3852 | ft = BlendUntransformed; executed: ft = BlendUntransformed; Execution Count:2442 | 2442 |
3853 | else if (data->bilinear) evaluated: data->bilinear yes Evaluation Count:54 | yes Evaluation Count:8 |
| 8-54 |
3854 | if (data->texture.type == QTextureData::Tiled) evaluated: data->texture.type == QTextureData::Tiled yes Evaluation Count:4 | yes Evaluation Count:50 |
| 4-50 |
3855 | ft = BlendTransformedBilinearTiled; executed: ft = BlendTransformedBilinearTiled; Execution Count:4 | 4 |
3856 | else | - |
3857 | ft = BlendTransformedBilinear; executed: ft = BlendTransformedBilinear; Execution Count:50 | 50 |
3858 | else | - |
3859 | if (data->texture.type == QTextureData::Tiled) evaluated: data->texture.type == QTextureData::Tiled yes Evaluation Count:2 | yes Evaluation Count:6 |
| 2-6 |
3860 | ft = BlendTransformedTiled; executed: ft = BlendTransformedTiled; Execution Count:2 | 2 |
3861 | else | - |
3862 | ft = BlendTransformed; executed: ft = BlendTransformed; Execution Count:6 | 6 |
3863 | return ft; executed: return ft; Execution Count:26080 | 26080 |
3864 | } | - |
3865 | | - |
3866 | static inline Operator getOperator(const QSpanData *data, const QSpan *spans, int spanCount) | - |
3867 | { | - |
3868 | Operator op; executed (the execution status of this line is deduced): Operator op; | - |
3869 | bool solidSource = false; executed (the execution status of this line is deduced): bool solidSource = false; | - |
3870 | | - |
3871 | switch(data->type) { | - |
3872 | case QSpanData::Solid: | - |
3873 | solidSource = (qAlpha(data->solid.color) == 255); executed (the execution status of this line is deduced): solidSource = (qAlpha(data->solid.color) == 255); | - |
3874 | break; executed: break; Execution Count:209044 | 209044 |
3875 | case QSpanData::LinearGradient: | - |
3876 | solidSource = !data->gradient.alphaColor; executed (the execution status of this line is deduced): solidSource = !data->gradient.alphaColor; | - |
3877 | getLinearGradientValues(&op.linear, data); executed (the execution status of this line is deduced): getLinearGradientValues(&op.linear, data); | - |
3878 | op.src_fetch = qt_fetch_linear_gradient; executed (the execution status of this line is deduced): op.src_fetch = qt_fetch_linear_gradient; | - |
3879 | break; executed: break; Execution Count:16028 | 16028 |
3880 | case QSpanData::RadialGradient: | - |
3881 | solidSource = !data->gradient.alphaColor; executed (the execution status of this line is deduced): solidSource = !data->gradient.alphaColor; | - |
3882 | getRadialGradientValues(&op.radial, data); executed (the execution status of this line is deduced): getRadialGradientValues(&op.radial, data); | - |
3883 | op.src_fetch = qt_fetch_radial_gradient; executed (the execution status of this line is deduced): op.src_fetch = qt_fetch_radial_gradient; | - |
3884 | break; executed: break; Execution Count:17 | 17 |
3885 | case QSpanData::ConicalGradient: | - |
3886 | solidSource = !data->gradient.alphaColor; never executed (the execution status of this line is deduced): solidSource = !data->gradient.alphaColor; | - |
3887 | op.src_fetch = qt_fetch_conical_gradient; never executed (the execution status of this line is deduced): op.src_fetch = qt_fetch_conical_gradient; | - |
3888 | break; | 0 |
3889 | case QSpanData::Texture: | - |
3890 | 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]; | - |
3891 | solidSource = !data->texture.hasAlpha; executed (the execution status of this line is deduced): solidSource = !data->texture.hasAlpha; | - |
3892 | default: | - |
3893 | break; executed: break; Execution Count:13035 | 13035 |
3894 | } | - |
3895 | | - |
3896 | op.mode = data->rasterBuffer->compositionMode; executed (the execution status of this line is deduced): op.mode = data->rasterBuffer->compositionMode; | - |
3897 | if (op.mode == QPainter::CompositionMode_SourceOver && solidSource) evaluated: op.mode == QPainter::CompositionMode_SourceOver yes Evaluation Count:137211 | yes Evaluation Count:100910 |
evaluated: solidSource yes Evaluation Count:118900 | yes Evaluation Count:18312 |
| 18312-137211 |
3898 | op.mode = QPainter::CompositionMode_Source; executed: op.mode = QPainter::CompositionMode_Source; Execution Count:118890 | 118890 |
3899 | | - |
3900 | op.dest_fetch = destFetchProc[data->rasterBuffer->format]; executed (the execution status of this line is deduced): op.dest_fetch = destFetchProc[data->rasterBuffer->format]; | - |
3901 | if (op.mode == QPainter::CompositionMode_Source) { evaluated: op.mode == QPainter::CompositionMode_Source yes Evaluation Count:119795 | yes Evaluation Count:118306 |
| 118306-119795 |
3902 | switch (data->rasterBuffer->format) { | - |
3903 | case QImage::Format_RGB32: | - |
3904 | case QImage::Format_ARGB32_Premultiplied: | - |
3905 | // don't clear dest_fetch as it sets up the pointer correctly to save one copy | - |
3906 | break; executed: break; Execution Count:117006 | 117006 |
3907 | default: { | - |
3908 | if (data->type == QSpanData::Texture && data->texture.const_alpha != 256) evaluated: data->type == QSpanData::Texture yes Evaluation Count:448 | yes Evaluation Count:2350 |
partially evaluated: data->texture.const_alpha != 256 no Evaluation Count:0 | yes Evaluation Count:448 |
| 0-2350 |
3909 | break; | 0 |
3910 | const QSpan *lastSpan = spans + spanCount; executed (the execution status of this line is deduced): const QSpan *lastSpan = spans + spanCount; | - |
3911 | bool alphaSpans = false; executed (the execution status of this line is deduced): bool alphaSpans = false; | - |
3912 | while (spans < lastSpan) { evaluated: spans < lastSpan yes Evaluation Count:138875 | yes Evaluation Count:2415 |
| 2415-138875 |
3913 | if (spans->coverage != 255) { evaluated: spans->coverage != 255 yes Evaluation Count:383 | yes Evaluation Count:138492 |
| 383-138492 |
3914 | alphaSpans = true; executed (the execution status of this line is deduced): alphaSpans = true; | - |
3915 | break; executed: break; Execution Count:383 | 383 |
3916 | } | - |
3917 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
3918 | } executed: } Execution Count:138492 | 138492 |
3919 | if (!alphaSpans) evaluated: !alphaSpans yes Evaluation Count:2415 | yes Evaluation Count:383 |
| 383-2415 |
3920 | op.dest_fetch = 0; executed: op.dest_fetch = 0; Execution Count:2415 | 2415 |
3921 | } | - |
3922 | } executed: } Execution Count:2798 | 2798 |
3923 | } executed: } Execution Count:119807 | 119807 |
3924 | | - |
3925 | op.dest_store = destStoreProc[data->rasterBuffer->format]; executed (the execution status of this line is deduced): op.dest_store = destStoreProc[data->rasterBuffer->format]; | - |
3926 | | - |
3927 | op.funcSolid = functionForModeSolid[op.mode]; executed (the execution status of this line is deduced): op.funcSolid = functionForModeSolid[op.mode]; | - |
3928 | op.func = functionForMode[op.mode]; executed (the execution status of this line is deduced): op.func = functionForMode[op.mode]; | - |
3929 | | - |
3930 | return op; executed: return op; Execution Count:238101 | 238101 |
3931 | } | - |
3932 | | - |
3933 | | - |
3934 | | - |
3935 | // -------------------- blend methods --------------------- | - |
3936 | | - |
3937 | #if !defined(Q_CC_SUN) | - |
3938 | static | - |
3939 | #endif | - |
3940 | void blend_color_generic(int count, const QSpan *spans, void *userData) | - |
3941 | { | - |
3942 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
3943 | uint buffer[buffer_size]; executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
3944 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
3945 | | - |
3946 | while (count--) { evaluated: count-- yes Evaluation Count:224120 | yes Evaluation Count:2336 |
| 2336-224120 |
3947 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
3948 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
3949 | while (length) { evaluated: length yes Evaluation Count:224120 | yes Evaluation Count:224120 |
| 224120 |
3950 | int l = qMin(buffer_size, length); executed (the execution status of this line is deduced): int l = qMin(buffer_size, length); | - |
3951 | 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:126031 |
| 98089-126031 |
3952 | 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); | - |
3953 | if (op.dest_store) partially evaluated: op.dest_store yes Evaluation Count:224120 | no Evaluation Count:0 |
| 0-224120 |
3954 | op.dest_store(data->rasterBuffer, x, spans->y, dest, l); executed: op.dest_store(data->rasterBuffer, x, spans->y, dest, l); Execution Count:224120 | 224120 |
3955 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
3956 | x += l; executed (the execution status of this line is deduced): x += l; | - |
3957 | } executed: } Execution Count:224120 | 224120 |
3958 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
3959 | } executed: } Execution Count:224120 | 224120 |
3960 | } executed: } Execution Count:2336 | 2336 |
3961 | | - |
3962 | static void blend_color_argb(int count, const QSpan *spans, void *userData) | - |
3963 | { | - |
3964 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
3965 | | - |
3966 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
3967 | | - |
3968 | if (op.mode == QPainter::CompositionMode_Source) { evaluated: op.mode == QPainter::CompositionMode_Source yes Evaluation Count:100900 | yes Evaluation Count:105808 |
| 100900-105808 |
3969 | // inline for performance | - |
3970 | while (count--) { evaluated: count-- yes Evaluation Count:620957 | yes Evaluation Count:100900 |
| 100900-620957 |
3971 | 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; | - |
3972 | if (spans->coverage == 255) { evaluated: spans->coverage == 255 yes Evaluation Count:599558 | yes Evaluation Count:21399 |
| 21399-599558 |
3973 | 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);; | - |
3974 | } else { executed: } Execution Count:599558 | 599558 |
3975 | 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); | - |
3976 | int ialpha = 255 - spans->coverage; executed (the execution status of this line is deduced): int ialpha = 255 - spans->coverage; | - |
3977 | for (int i = 0; i < spans->len; ++i) evaluated: i < spans->len yes Evaluation Count:22387 | yes Evaluation Count:21399 |
| 21399-22387 |
3978 | target[i] = c + BYTE_MUL(target[i], ialpha); executed: target[i] = c + BYTE_MUL(target[i], ialpha); Execution Count:22387 | 22387 |
3979 | } executed: } Execution Count:21399 | 21399 |
3980 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
3981 | } executed: } Execution Count:620957 | 620957 |
3982 | return; executed: return; Execution Count:100900 | 100900 |
3983 | } | - |
3984 | | - |
3985 | while (count--) { evaluated: count-- yes Evaluation Count:2601018 | yes Evaluation Count:105808 |
| 105808-2601018 |
3986 | 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; | - |
3987 | 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); | - |
3988 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
3989 | } executed: } Execution Count:2601018 | 2601018 |
3990 | } executed: } Execution Count:105808 | 105808 |
3991 | | - |
3992 | static void blend_color_rgb16(int count, const QSpan *spans, void *userData) | - |
3993 | { | - |
3994 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
3995 | | - |
3996 | /* | - |
3997 | We duplicate a little logic from getOperator() and calculate the | - |
3998 | composition mode directly. This allows blend_color_rgb16 to be used | - |
3999 | from qt_gradient_quint16 with minimal overhead. | - |
4000 | */ | - |
4001 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4002 | if (mode == QPainter::CompositionMode_SourceOver && partially evaluated: mode == QPainter::CompositionMode_SourceOver yes Evaluation Count:70346 | no Evaluation Count:0 |
| 0-70346 |
4003 | qAlpha(data->solid.color) == 255) evaluated: qAlpha(data->solid.color) == 255 yes Evaluation Count:69371 | yes Evaluation Count:975 |
| 975-69371 |
4004 | mode = QPainter::CompositionMode_Source; executed: mode = QPainter::CompositionMode_Source; Execution Count:69371 | 69371 |
4005 | | - |
4006 | if (mode == QPainter::CompositionMode_Source) { evaluated: mode == QPainter::CompositionMode_Source yes Evaluation Count:69371 | yes Evaluation Count:975 |
| 975-69371 |
4007 | // inline for performance | - |
4008 | ushort c = qConvertRgb32To16(data->solid.color); executed (the execution status of this line is deduced): ushort c = qConvertRgb32To16(data->solid.color); | - |
4009 | while (count--) { evaluated: count-- yes Evaluation Count:3739945 | yes Evaluation Count:69371 |
| 69371-3739945 |
4010 | 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; | - |
4011 | if (spans->coverage == 255) { evaluated: spans->coverage == 255 yes Evaluation Count:3674306 | yes Evaluation Count:65639 |
| 65639-3674306 |
4012 | QT_MEMFILL_USHORT(target, spans->len, c); executed (the execution status of this line is deduced): qt_memfill<quint16>(target, c, spans->len);; | - |
4013 | } else { executed: } Execution Count:3674306 | 3674306 |
4014 | 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); | - |
4015 | int ialpha = 255 - spans->coverage; executed (the execution status of this line is deduced): int ialpha = 255 - spans->coverage; | - |
4016 | const ushort *end = target + spans->len; executed (the execution status of this line is deduced): const ushort *end = target + spans->len; | - |
4017 | while (target < end) { evaluated: target < end yes Evaluation Count:82262 | yes Evaluation Count:65639 |
| 65639-82262 |
4018 | *target = color + BYTE_MUL_RGB16(*target, ialpha); executed (the execution status of this line is deduced): *target = color + BYTE_MUL_RGB16(*target, ialpha); | - |
4019 | ++target; executed (the execution status of this line is deduced): ++target; | - |
4020 | } executed: } Execution Count:82262 | 82262 |
4021 | } executed: } Execution Count:65639 | 65639 |
4022 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4023 | } executed: } Execution Count:3739945 | 3739945 |
4024 | return; executed: return; Execution Count:69371 | 69371 |
4025 | } | - |
4026 | | - |
4027 | if (mode == QPainter::CompositionMode_SourceOver) { partially evaluated: mode == QPainter::CompositionMode_SourceOver yes Evaluation Count:975 | no Evaluation Count:0 |
| 0-975 |
4028 | while (count--) { evaluated: count-- yes Evaluation Count:7160 | yes Evaluation Count:975 |
| 975-7160 |
4029 | 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); | - |
4030 | int ialpha = qAlpha(~color); executed (the execution status of this line is deduced): int ialpha = qAlpha(~color); | - |
4031 | ushort c = qConvertRgb32To16(color); executed (the execution status of this line is deduced): ushort c = qConvertRgb32To16(color); | - |
4032 | 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; | - |
4033 | int len = spans->len; executed (the execution status of this line is deduced): int len = spans->len; | - |
4034 | bool pre = (((quintptr)target) & 0x3) != 0; executed (the execution status of this line is deduced): bool pre = (((quintptr)target) & 0x3) != 0; | - |
4035 | bool post = false; executed (the execution status of this line is deduced): bool post = false; | - |
4036 | if (pre) { evaluated: pre yes Evaluation Count:3575 | yes Evaluation Count:3585 |
| 3575-3585 |
4037 | // skip to word boundary | - |
4038 | *target = c + BYTE_MUL_RGB16(*target, ialpha); executed (the execution status of this line is deduced): *target = c + BYTE_MUL_RGB16(*target, ialpha); | - |
4039 | ++target; executed (the execution status of this line is deduced): ++target; | - |
4040 | --len; executed (the execution status of this line is deduced): --len; | - |
4041 | } executed: } Execution Count:3575 | 3575 |
4042 | if (len & 0x1) { evaluated: len & 0x1 yes Evaluation Count:3787 | yes Evaluation Count:3373 |
| 3373-3787 |
4043 | post = true; executed (the execution status of this line is deduced): post = true; | - |
4044 | --len; executed (the execution status of this line is deduced): --len; | - |
4045 | } executed: } Execution Count:3787 | 3787 |
4046 | uint *target32 = (uint*)target; executed (the execution status of this line is deduced): uint *target32 = (uint*)target; | - |
4047 | uint c32 = c | (c<<16); executed (the execution status of this line is deduced): uint c32 = c | (c<<16); | - |
4048 | len >>= 1; executed (the execution status of this line is deduced): len >>= 1; | - |
4049 | 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; | - |
4050 | while (len--) { evaluated: len-- yes Evaluation Count:64594 | yes Evaluation Count:7160 |
| 7160-64594 |
4051 | // blend full words | - |
4052 | *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); | - |
4053 | ++target32; executed (the execution status of this line is deduced): ++target32; | - |
4054 | target += 2; executed (the execution status of this line is deduced): target += 2; | - |
4055 | } executed: } Execution Count:64594 | 64594 |
4056 | if (post) { evaluated: post yes Evaluation Count:3787 | yes Evaluation Count:3373 |
| 3373-3787 |
4057 | // one last pixel beyond a full word | - |
4058 | *target = c + BYTE_MUL_RGB16(*target, ialpha); executed (the execution status of this line is deduced): *target = c + BYTE_MUL_RGB16(*target, ialpha); | - |
4059 | } executed: } Execution Count:3787 | 3787 |
4060 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4061 | } executed: } Execution Count:7160 | 7160 |
4062 | return; executed: return; Execution Count:975 | 975 |
4063 | } | - |
4064 | | - |
4065 | blend_color_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_color_generic(count, spans, userData); | - |
4066 | } | 0 |
4067 | | - |
4068 | template <typename T> | - |
4069 | void handleSpans(int count, const QSpan *spans, const QSpanData *data, T &handler) | - |
4070 | { | - |
4071 | uint const_alpha = 256; executed (the execution status of this line is deduced): uint const_alpha = 256; | - |
4072 | if (data->type == QSpanData::Texture) evaluated: data->type == QSpanData::Texture yes Evaluation Count:30 | yes Evaluation Count:16012 |
| 30-16012 |
4073 | const_alpha = data->texture.const_alpha; executed: const_alpha = data->texture.const_alpha; Execution Count:30 | 30 |
4074 | | - |
4075 | int coverage = 0; executed (the execution status of this line is deduced): int coverage = 0; | - |
4076 | while (count) { evaluated: count yes Evaluation Count:22579 | yes Evaluation Count:16067 |
| 16067-22579 |
4077 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4078 | const int y = spans->y; executed (the execution status of this line is deduced): const int y = spans->y; | - |
4079 | int right = x + spans->len; executed (the execution status of this line is deduced): int right = x + spans->len; | - |
4080 | | - |
4081 | // compute length of adjacent spans | - |
4082 | for (int i = 1; i < count && spans[i].y == y && spans[i].x == right; ++i) evaluated: i < count yes Evaluation Count:13549 | yes Evaluation Count:16079 |
evaluated: spans[i].y == y yes Evaluation Count:7037 | yes Evaluation Count:6512 |
partially evaluated: spans[i].x == right yes Evaluation Count:7037 | no Evaluation Count:0 |
| 0-16079 |
4083 | right += spans[i].len; executed: right += spans[i].len; Execution Count:7037 | 7037 |
4084 | int length = right - x; executed (the execution status of this line is deduced): int length = right - x; | - |
4085 | | - |
4086 | while (length) { evaluated: length yes Evaluation Count:22578 | yes Evaluation Count:22562 |
| 22562-22578 |
4087 | int l = qMin(buffer_size, length); executed (the execution status of this line is deduced): int l = qMin(buffer_size, length); | - |
4088 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4089 | | - |
4090 | int process_length = l; executed (the execution status of this line is deduced): int process_length = l; | - |
4091 | int process_x = x; executed (the execution status of this line is deduced): int process_x = x; | - |
4092 | | - |
4093 | 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); | - |
4094 | int offset = 0; executed (the execution status of this line is deduced): int offset = 0; | - |
4095 | while (l > 0) { evaluated: l > 0 yes Evaluation Count:29584 | yes Evaluation Count:22547 |
| 22547-29584 |
4096 | if (x == spans->x) // new span? partially evaluated: x == spans->x yes Evaluation Count:29581 | no Evaluation Count:0 |
| 0-29581 |
4097 | coverage = (spans->coverage * const_alpha) >> 8; executed: coverage = (spans->coverage * const_alpha) >> 8; Execution Count:29582 | 29582 |
4098 | | - |
4099 | int right = spans->x + spans->len; executed (the execution status of this line is deduced): int right = spans->x + spans->len; | - |
4100 | int len = qMin(l, right - x); executed (the execution status of this line is deduced): int len = qMin(l, right - x); | - |
4101 | | - |
4102 | 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); | - |
4103 | | - |
4104 | l -= len; executed (the execution status of this line is deduced): l -= len; | - |
4105 | x += len; executed (the execution status of this line is deduced): x += len; | - |
4106 | offset += len; executed (the execution status of this line is deduced): offset += len; | - |
4107 | | - |
4108 | if (x == right) { // done with current span? partially evaluated: x == right yes Evaluation Count:29572 | no Evaluation Count:0 |
| 0-29572 |
4109 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4110 | --count; executed (the execution status of this line is deduced): --count; | - |
4111 | } executed: } Execution Count:29572 | 29572 |
4112 | } executed: } Execution Count:29584 | 29584 |
4113 | handler.store(process_x, y, process_length); executed (the execution status of this line is deduced): handler.store(process_x, y, process_length); | - |
4114 | } executed: } Execution Count:22559 | 22559 |
4115 | } executed: } Execution Count:22578 | 22578 |
4116 | } executed: } Execution Count:16073 | 16073 |
4117 | | - |
4118 | struct QBlendBase | - |
4119 | { | - |
4120 | QBlendBase(QSpanData *d, Operator o) | - |
4121 | : data(d) | - |
4122 | , op(o) | - |
4123 | , dest(0) | - |
4124 | { | - |
4125 | } executed: } Execution Count:16011 | 16011 |
4126 | | - |
4127 | QSpanData *data; | - |
4128 | Operator op; | - |
4129 | | - |
4130 | uint *dest; | - |
4131 | | - |
4132 | uint buffer[buffer_size]; | - |
4133 | uint src_buffer[buffer_size]; | - |
4134 | }; | - |
4135 | | - |
4136 | class BlendSrcGeneric : public QBlendBase | - |
4137 | { | - |
4138 | public: | - |
4139 | BlendSrcGeneric(QSpanData *d, Operator o) | - |
4140 | : QBlendBase(d, o) | - |
4141 | { | - |
4142 | } executed: } Execution Count:16017 | 16017 |
4143 | | - |
4144 | const uint *fetch(int x, int y, int len) | - |
4145 | { | - |
4146 | dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, y, len) : buffer; evaluated: op.dest_fetch yes Evaluation Count:21674 | yes Evaluation Count:913 |
| 913-21674 |
4147 | 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:22563 | 22563 |
4148 | } | - |
4149 | | - |
4150 | void process(int, int, int len, int coverage, const uint *src, int offset) | - |
4151 | { | - |
4152 | 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); | - |
4153 | } executed: } Execution Count:29574 | 29574 |
4154 | | - |
4155 | void store(int x, int y, int len) | - |
4156 | { | - |
4157 | if (op.dest_store) evaluated: op.dest_store yes Evaluation Count:913 | yes Evaluation Count:21639 |
| 913-21639 |
4158 | op.dest_store(data->rasterBuffer, x, y, dest, len); executed: op.dest_store(data->rasterBuffer, x, y, dest, len); Execution Count:913 | 913 |
4159 | } executed: } Execution Count:22554 | 22554 |
4160 | }; | - |
4161 | | - |
4162 | static void blend_src_generic(int count, const QSpan *spans, void *userData) | - |
4163 | { | - |
4164 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4165 | BlendSrcGeneric blend(data, getOperator(data, spans, count)); executed (the execution status of this line is deduced): BlendSrcGeneric blend(data, getOperator(data, spans, count)); | - |
4166 | handleSpans(count, spans, data, blend); executed (the execution status of this line is deduced): handleSpans(count, spans, data, blend); | - |
4167 | } executed: } Execution Count:16073 | 16073 |
4168 | | - |
4169 | static void blend_untransformed_generic(int count, const QSpan *spans, void *userData) | - |
4170 | { | - |
4171 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4172 | | - |
4173 | uint buffer[buffer_size]; executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
4174 | uint src_buffer[buffer_size]; executed (the execution status of this line is deduced): uint src_buffer[buffer_size]; | - |
4175 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
4176 | | - |
4177 | const int image_width = data->texture.width; executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4178 | const int image_height = data->texture.height; executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4179 | int xoff = -qRound(-data->dx); executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx); | - |
4180 | int yoff = -qRound(-data->dy); executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy); | - |
4181 | | - |
4182 | while (count--) { evaluated: count-- yes Evaluation Count:39624 | yes Evaluation Count:1194 |
| 1194-39624 |
4183 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4184 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4185 | int sx = xoff + x; executed (the execution status of this line is deduced): int sx = xoff + x; | - |
4186 | int sy = yoff + spans->y; executed (the execution status of this line is deduced): int sy = yoff + spans->y; | - |
4187 | if (sy >= 0 && sy < image_height && sx < image_width) { partially evaluated: sy >= 0 yes Evaluation Count:39624 | no Evaluation Count:0 |
partially evaluated: sy < image_height yes Evaluation Count:39624 | no Evaluation Count:0 |
partially evaluated: sx < image_width yes Evaluation Count:39624 | no Evaluation Count:0 |
| 0-39624 |
4188 | if (sx < 0) { partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:39624 |
| 0-39624 |
4189 | x -= sx; never executed (the execution status of this line is deduced): x -= sx; | - |
4190 | length += sx; never executed (the execution status of this line is deduced): length += sx; | - |
4191 | sx = 0; never executed (the execution status of this line is deduced): sx = 0; | - |
4192 | } | 0 |
4193 | if (sx + length > image_width) partially evaluated: sx + length > image_width no Evaluation Count:0 | yes Evaluation Count:39624 |
| 0-39624 |
4194 | length = image_width - sx; never executed: length = image_width - sx; | 0 |
4195 | if (length > 0) { partially evaluated: length > 0 yes Evaluation Count:39624 | no Evaluation Count:0 |
| 0-39624 |
4196 | 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; | - |
4197 | while (length) { evaluated: length yes Evaluation Count:39624 | yes Evaluation Count:39624 |
| 39624 |
4198 | int l = qMin(buffer_size, length); executed (the execution status of this line is deduced): int l = qMin(buffer_size, length); | - |
4199 | 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); | - |
4200 | uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; evaluated: op.dest_fetch yes Evaluation Count:29736 | yes Evaluation Count:9888 |
| 9888-29736 |
4201 | op.func(dest, src, l, coverage); executed (the execution status of this line is deduced): op.func(dest, src, l, coverage); | - |
4202 | if (op.dest_store) evaluated: op.dest_store yes Evaluation Count:30698 | yes Evaluation Count:8926 |
| 8926-30698 |
4203 | op.dest_store(data->rasterBuffer, x, spans->y, dest, l); executed: op.dest_store(data->rasterBuffer, x, spans->y, dest, l); Execution Count:30698 | 30698 |
4204 | x += l; executed (the execution status of this line is deduced): x += l; | - |
4205 | sx += l; executed (the execution status of this line is deduced): sx += l; | - |
4206 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4207 | } executed: } Execution Count:39624 | 39624 |
4208 | } executed: } Execution Count:39624 | 39624 |
4209 | } executed: } Execution Count:39624 | 39624 |
4210 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4211 | } executed: } Execution Count:39624 | 39624 |
4212 | } executed: } Execution Count:1194 | 1194 |
4213 | | - |
4214 | static void blend_untransformed_argb(int count, const QSpan *spans, void *userData) | - |
4215 | { | - |
4216 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4217 | 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 |
4218 | && data->texture.format != QImage::Format_RGB32) { partially evaluated: data->texture.format != QImage::Format_RGB32 yes Evaluation Count:64 | no Evaluation Count:0 |
| 0-64 |
4219 | blend_untransformed_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_untransformed_generic(count, spans, userData); | - |
4220 | return; executed: return; Execution Count:64 | 64 |
4221 | } | - |
4222 | | - |
4223 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
4224 | | - |
4225 | const int image_width = data->texture.width; executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4226 | const int image_height = data->texture.height; executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4227 | int xoff = -qRound(-data->dx); executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx); | - |
4228 | int yoff = -qRound(-data->dy); executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy); | - |
4229 | | - |
4230 | while (count--) { evaluated: count-- yes Evaluation Count:5198 | yes Evaluation Count:27 |
| 27-5198 |
4231 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4232 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4233 | int sx = xoff + x; executed (the execution status of this line is deduced): int sx = xoff + x; | - |
4234 | int sy = yoff + spans->y; executed (the execution status of this line is deduced): int sy = yoff + spans->y; | - |
4235 | 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 |
4236 | if (sx < 0) { partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:5198 |
| 0-5198 |
4237 | x -= sx; never executed (the execution status of this line is deduced): x -= sx; | - |
4238 | length += sx; never executed (the execution status of this line is deduced): length += sx; | - |
4239 | sx = 0; never executed (the execution status of this line is deduced): sx = 0; | - |
4240 | } | 0 |
4241 | if (sx + length > image_width) partially evaluated: sx + length > image_width no Evaluation Count:0 | yes Evaluation Count:5198 |
| 0-5198 |
4242 | length = image_width - sx; never executed: length = image_width - sx; | 0 |
4243 | if (length > 0) { partially evaluated: length > 0 yes Evaluation Count:5198 | no Evaluation Count:0 |
| 0-5198 |
4244 | 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; | - |
4245 | 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; | - |
4246 | 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; | - |
4247 | op.func(dest, src, length, coverage); executed (the execution status of this line is deduced): op.func(dest, src, length, coverage); | - |
4248 | } executed: } Execution Count:5198 | 5198 |
4249 | } executed: } Execution Count:5198 | 5198 |
4250 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4251 | } executed: } Execution Count:5198 | 5198 |
4252 | } executed: } Execution Count:27 | 27 |
4253 | | - |
4254 | static inline quint16 interpolate_pixel_rgb16_255(quint16 x, quint8 a, | - |
4255 | quint16 y, quint8 b) | - |
4256 | { | - |
4257 | 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; | - |
4258 | 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; | - |
4259 | | - |
4260 | return t; executed: return t; Execution Count:1280 | 1280 |
4261 | } | - |
4262 | | - |
4263 | static inline quint32 interpolate_pixel_rgb16x2_255(quint32 x, quint8 a, | - |
4264 | quint32 y, quint8 b) | - |
4265 | { | - |
4266 | uint t; executed (the execution status of this line is deduced): uint t; | - |
4267 | 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; | - |
4268 | 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; | - |
4269 | return t; executed: return t; Execution Count:39680 | 39680 |
4270 | } | - |
4271 | | - |
4272 | static inline void blend_sourceOver_rgb16_rgb16(quint16 *Q_DECL_RESTRICT dest, | - |
4273 | const quint16 *Q_DECL_RESTRICT src, | - |
4274 | int length, | - |
4275 | const quint8 alpha, | - |
4276 | const quint8 ialpha) | - |
4277 | { | - |
4278 | const int dstAlign = ((quintptr)dest) & 0x3; executed (the execution status of this line is deduced): const int dstAlign = ((quintptr)dest) & 0x3; | - |
4279 | if (dstAlign) { evaluated: dstAlign yes Evaluation Count:640 | yes Evaluation Count:640 |
| 640 |
4280 | *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); | - |
4281 | ++dest; executed (the execution status of this line is deduced): ++dest; | - |
4282 | ++src; executed (the execution status of this line is deduced): ++src; | - |
4283 | --length; executed (the execution status of this line is deduced): --length; | - |
4284 | } executed: } Execution Count:640 | 640 |
4285 | const int srcAlign = ((quintptr)src) & 0x3; executed (the execution status of this line is deduced): const int srcAlign = ((quintptr)src) & 0x3; | - |
4286 | int length32 = length >> 1; executed (the execution status of this line is deduced): int length32 = length >> 1; | - |
4287 | 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 |
4288 | while (length32--) { evaluated: length32-- yes Evaluation Count:39680 | yes Evaluation Count:1280 |
| 1280-39680 |
4289 | 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); | - |
4290 | quint32 *dest32 = reinterpret_cast<quint32*>(dest); executed (the execution status of this line is deduced): quint32 *dest32 = reinterpret_cast<quint32*>(dest); | - |
4291 | *dest32 = interpolate_pixel_rgb16x2_255(*src32, alpha, executed (the execution status of this line is deduced): *dest32 = interpolate_pixel_rgb16x2_255(*src32, alpha, | - |
4292 | *dest32, ialpha); executed (the execution status of this line is deduced): *dest32, ialpha); | - |
4293 | dest += 2; executed (the execution status of this line is deduced): dest += 2; | - |
4294 | src += 2; executed (the execution status of this line is deduced): src += 2; | - |
4295 | } executed: } Execution Count:39680 | 39680 |
4296 | length &= 0x1; executed (the execution status of this line is deduced): length &= 0x1; | - |
4297 | } executed: } Execution Count:1280 | 1280 |
4298 | while (length--) { evaluated: length-- yes Evaluation Count:640 | yes Evaluation Count:1280 |
| 640-1280 |
4299 | *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); | - |
4300 | ++dest; executed (the execution status of this line is deduced): ++dest; | - |
4301 | ++src; executed (the execution status of this line is deduced): ++src; | - |
4302 | } executed: } Execution Count:640 | 640 |
4303 | } executed: } Execution Count:1280 | 1280 |
4304 | | - |
4305 | static void blend_untransformed_rgb565(int count, const QSpan *spans, void *userData) | - |
4306 | { | - |
4307 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
4308 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4309 | | - |
4310 | if (data->texture.format != QImage::Format_RGB16 partially evaluated: data->texture.format != QImage::Format_RGB16 yes Evaluation Count:155 | no Evaluation Count:0 |
| 0-155 |
4311 | || (mode != QPainter::CompositionMode_SourceOver never evaluated: mode != QPainter::CompositionMode_SourceOver | 0 |
4312 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
4313 | { | - |
4314 | blend_untransformed_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_untransformed_generic(count, spans, userData); | - |
4315 | return; executed: return; Execution Count:155 | 155 |
4316 | } | - |
4317 | | - |
4318 | const int image_width = data->texture.width; never executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4319 | const int image_height = data->texture.height; never executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4320 | int xoff = -qRound(-data->dx); never executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx); | - |
4321 | int yoff = -qRound(-data->dy); never executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy); | - |
4322 | | - |
4323 | while (count--) { | 0 |
4324 | 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; | - |
4325 | if (coverage == 0) { never evaluated: coverage == 0 | 0 |
4326 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4327 | continue; never executed: continue; | 0 |
4328 | } | - |
4329 | | - |
4330 | int x = spans->x; never executed (the execution status of this line is deduced): int x = spans->x; | - |
4331 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4332 | int sx = xoff + x; never executed (the execution status of this line is deduced): int sx = xoff + x; | - |
4333 | int sy = yoff + spans->y; never executed (the execution status of this line is deduced): int sy = yoff + spans->y; | - |
4334 | if (sy >= 0 && sy < image_height && sx < image_width) { never evaluated: sy >= 0 never evaluated: sy < image_height never evaluated: sx < image_width | 0 |
4335 | if (sx < 0) { | 0 |
4336 | x -= sx; never executed (the execution status of this line is deduced): x -= sx; | - |
4337 | length += sx; never executed (the execution status of this line is deduced): length += sx; | - |
4338 | sx = 0; never executed (the execution status of this line is deduced): sx = 0; | - |
4339 | } | 0 |
4340 | if (sx + length > image_width) never evaluated: sx + length > image_width | 0 |
4341 | length = image_width - sx; never executed: length = image_width - sx; | 0 |
4342 | if (length > 0) { never evaluated: length > 0 | 0 |
4343 | 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; | - |
4344 | 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; | - |
4345 | if (coverage == 255) { never evaluated: coverage == 255 | 0 |
4346 | memcpy(dest, src, length * sizeof(quint16)); never executed (the execution status of this line is deduced): memcpy(dest, src, length * sizeof(quint16)); | - |
4347 | } else { | 0 |
4348 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4349 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4350 | if (alpha > 0) never evaluated: alpha > 0 | 0 |
4351 | blend_sourceOver_rgb16_rgb16(dest, src, length, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, src, length, alpha, ialpha); | 0 |
4352 | } | 0 |
4353 | } | - |
4354 | } | 0 |
4355 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4356 | } | 0 |
4357 | } | 0 |
4358 | | - |
4359 | static void blend_tiled_generic(int count, const QSpan *spans, void *userData) | - |
4360 | { | - |
4361 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4362 | | - |
4363 | uint buffer[buffer_size]; executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
4364 | uint src_buffer[buffer_size]; executed (the execution status of this line is deduced): uint src_buffer[buffer_size]; | - |
4365 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
4366 | | - |
4367 | const int image_width = data->texture.width; executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4368 | const int image_height = data->texture.height; executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4369 | int xoff = -qRound(-data->dx) % image_width; executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx) % image_width; | - |
4370 | int yoff = -qRound(-data->dy) % image_height; executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy) % image_height; | - |
4371 | | - |
4372 | if (xoff < 0) evaluated: xoff < 0 yes Evaluation Count:9811 | yes Evaluation Count:518 |
| 518-9811 |
4373 | xoff += image_width; executed: xoff += image_width; Execution Count:9811 | 9811 |
4374 | if (yoff < 0) evaluated: yoff < 0 yes Evaluation Count:9930 | yes Evaluation Count:399 |
| 399-9930 |
4375 | yoff += image_height; executed: yoff += image_height; Execution Count:9930 | 9930 |
4376 | | - |
4377 | while (count--) { evaluated: count-- yes Evaluation Count:225458 | yes Evaluation Count:10329 |
| 10329-225458 |
4378 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4379 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4380 | int sx = (xoff + spans->x) % image_width; executed (the execution status of this line is deduced): int sx = (xoff + spans->x) % image_width; | - |
4381 | int sy = (spans->y + yoff) % image_height; executed (the execution status of this line is deduced): int sy = (spans->y + yoff) % image_height; | - |
4382 | if (sx < 0) partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:225458 |
| 0-225458 |
4383 | sx += image_width; never executed: sx += image_width; | 0 |
4384 | if (sy < 0) partially evaluated: sy < 0 no Evaluation Count:0 | yes Evaluation Count:225458 |
| 0-225458 |
4385 | sy += image_height; never executed: sy += image_height; | 0 |
4386 | | - |
4387 | 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; | - |
4388 | while (length) { evaluated: length yes Evaluation Count:439182 | yes Evaluation Count:225458 |
| 225458-439182 |
4389 | int l = qMin(image_width - sx, length); executed (the execution status of this line is deduced): int l = qMin(image_width - sx, length); | - |
4390 | if (buffer_size < l) partially evaluated: buffer_size < l no Evaluation Count:0 | yes Evaluation Count:439182 |
| 0-439182 |
4391 | l = buffer_size; never executed: l = buffer_size; | 0 |
4392 | 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); | - |
4393 | uint *dest = op.dest_fetch ? op.dest_fetch(buffer, data->rasterBuffer, x, spans->y, l) : buffer; evaluated: op.dest_fetch yes Evaluation Count:436110 | yes Evaluation Count:3072 |
| 3072-436110 |
4394 | op.func(dest, src, l, coverage); executed (the execution status of this line is deduced): op.func(dest, src, l, coverage); | - |
4395 | if (op.dest_store) evaluated: op.dest_store yes Evaluation Count:381643 | yes Evaluation Count:57539 |
| 57539-381643 |
4396 | op.dest_store(data->rasterBuffer, x, spans->y, dest, l); executed: op.dest_store(data->rasterBuffer, x, spans->y, dest, l); Execution Count:381643 | 381643 |
4397 | x += l; executed (the execution status of this line is deduced): x += l; | - |
4398 | sx += l; executed (the execution status of this line is deduced): sx += l; | - |
4399 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4400 | if (sx >= image_width) evaluated: sx >= image_width yes Evaluation Count:252811 | yes Evaluation Count:186371 |
| 186371-252811 |
4401 | sx = 0; executed: sx = 0; Execution Count:252811 | 252811 |
4402 | } executed: } Execution Count:439182 | 439182 |
4403 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4404 | } executed: } Execution Count:225458 | 225458 |
4405 | } executed: } Execution Count:10329 | 10329 |
4406 | | - |
4407 | static void blend_tiled_argb(int count, const QSpan *spans, void *userData) | - |
4408 | { | - |
4409 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4410 | if (data->texture.format != QImage::Format_ARGB32_Premultiplied evaluated: data->texture.format != QImage::Format_ARGB32_Premultiplied yes Evaluation Count:1 | yes Evaluation Count:1454 |
| 1-1454 |
4411 | && data->texture.format != QImage::Format_RGB32) { partially evaluated: data->texture.format != QImage::Format_RGB32 no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
4412 | blend_tiled_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_tiled_generic(count, spans, userData); | - |
4413 | return; | 0 |
4414 | } | - |
4415 | | - |
4416 | Operator op = getOperator(data, spans, count); executed (the execution status of this line is deduced): Operator op = getOperator(data, spans, count); | - |
4417 | | - |
4418 | int image_width = data->texture.width; executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
4419 | int image_height = data->texture.height; executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
4420 | int xoff = -qRound(-data->dx) % image_width; executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx) % image_width; | - |
4421 | int yoff = -qRound(-data->dy) % image_height; executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy) % image_height; | - |
4422 | | - |
4423 | if (xoff < 0) partially evaluated: xoff < 0 no Evaluation Count:0 | yes Evaluation Count:1455 |
| 0-1455 |
4424 | xoff += image_width; never executed: xoff += image_width; | 0 |
4425 | if (yoff < 0) partially evaluated: yoff < 0 no Evaluation Count:0 | yes Evaluation Count:1455 |
| 0-1455 |
4426 | yoff += image_height; never executed: yoff += image_height; | 0 |
4427 | | - |
4428 | while (count--) { evaluated: count-- yes Evaluation Count:9107 | yes Evaluation Count:1455 |
| 1455-9107 |
4429 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4430 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4431 | int sx = (xoff + spans->x) % image_width; executed (the execution status of this line is deduced): int sx = (xoff + spans->x) % image_width; | - |
4432 | int sy = (spans->y + yoff) % image_height; executed (the execution status of this line is deduced): int sy = (spans->y + yoff) % image_height; | - |
4433 | if (sx < 0) partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:9107 |
| 0-9107 |
4434 | sx += image_width; never executed: sx += image_width; | 0 |
4435 | if (sy < 0) partially evaluated: sy < 0 no Evaluation Count:0 | yes Evaluation Count:9107 |
| 0-9107 |
4436 | sy += image_height; never executed: sy += image_height; | 0 |
4437 | | - |
4438 | 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; | - |
4439 | while (length) { evaluated: length yes Evaluation Count:10330 | yes Evaluation Count:9107 |
| 9107-10330 |
4440 | int l = qMin(image_width - sx, length); executed (the execution status of this line is deduced): int l = qMin(image_width - sx, length); | - |
4441 | if (buffer_size < l) partially evaluated: buffer_size < l no Evaluation Count:0 | yes Evaluation Count:10330 |
| 0-10330 |
4442 | l = buffer_size; never executed: l = buffer_size; | 0 |
4443 | 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; | - |
4444 | 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; | - |
4445 | op.func(dest, src, l, coverage); executed (the execution status of this line is deduced): op.func(dest, src, l, coverage); | - |
4446 | x += l; executed (the execution status of this line is deduced): x += l; | - |
4447 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4448 | sx = 0; executed (the execution status of this line is deduced): sx = 0; | - |
4449 | } executed: } Execution Count:10330 | 10330 |
4450 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4451 | } executed: } Execution Count:9107 | 9107 |
4452 | } executed: } Execution Count:1455 | 1455 |
4453 | | - |
4454 | static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData) | - |
4455 | { | - |
4456 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
4457 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4458 | | - |
4459 | if (data->texture.format != QImage::Format_RGB16 evaluated: data->texture.format != QImage::Format_RGB16 yes Evaluation Count:10146 | yes Evaluation Count:8 |
| 8-10146 |
4460 | || (mode != QPainter::CompositionMode_SourceOver partially evaluated: mode != QPainter::CompositionMode_SourceOver no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4461 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
4462 | { | - |
4463 | blend_tiled_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_tiled_generic(count, spans, userData); | - |
4464 | return; executed: return; Execution Count:10146 | 10146 |
4465 | } | - |
4466 | | - |
4467 | const int image_width = data->texture.width; executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4468 | const int image_height = data->texture.height; executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4469 | int xoff = -qRound(-data->dx) % image_width; executed (the execution status of this line is deduced): int xoff = -qRound(-data->dx) % image_width; | - |
4470 | int yoff = -qRound(-data->dy) % image_height; executed (the execution status of this line is deduced): int yoff = -qRound(-data->dy) % image_height; | - |
4471 | | - |
4472 | if (xoff < 0) partially evaluated: xoff < 0 no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4473 | xoff += image_width; never executed: xoff += image_width; | 0 |
4474 | if (yoff < 0) partially evaluated: yoff < 0 no Evaluation Count:0 | yes Evaluation Count:8 |
| 0-8 |
4475 | yoff += image_height; never executed: yoff += image_height; | 0 |
4476 | | - |
4477 | while (count--) { evaluated: count-- yes Evaluation Count:1024 | yes Evaluation Count:8 |
| 8-1024 |
4478 | 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; | - |
4479 | if (coverage == 0) { evaluated: coverage == 0 yes Evaluation Count:128 | yes Evaluation Count:896 |
| 128-896 |
4480 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4481 | continue; executed: continue; Execution Count:128 | 128 |
4482 | } | - |
4483 | | - |
4484 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
4485 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
4486 | int sx = (xoff + spans->x) % image_width; executed (the execution status of this line is deduced): int sx = (xoff + spans->x) % image_width; | - |
4487 | int sy = (spans->y + yoff) % image_height; executed (the execution status of this line is deduced): int sy = (spans->y + yoff) % image_height; | - |
4488 | if (sx < 0) partially evaluated: sx < 0 no Evaluation Count:0 | yes Evaluation Count:896 |
| 0-896 |
4489 | sx += image_width; never executed: sx += image_width; | 0 |
4490 | if (sy < 0) partially evaluated: sy < 0 no Evaluation Count:0 | yes Evaluation Count:896 |
| 0-896 |
4491 | sy += image_height; never executed: sy += image_height; | 0 |
4492 | | - |
4493 | if (coverage == 255) { evaluated: coverage == 255 yes Evaluation Count:128 | yes Evaluation Count:768 |
| 128-768 |
4494 | // Copy the first texture block | - |
4495 | length = qMin(image_width,length); executed (the execution status of this line is deduced): length = qMin(image_width,length); | - |
4496 | int tx = x; executed (the execution status of this line is deduced): int tx = x; | - |
4497 | while (length) { evaluated: length yes Evaluation Count:256 | yes Evaluation Count:128 |
| 128-256 |
4498 | int l = qMin(image_width - sx, length); executed (the execution status of this line is deduced): int l = qMin(image_width - sx, length); | - |
4499 | if (buffer_size < l) partially evaluated: buffer_size < l no Evaluation Count:0 | yes Evaluation Count:256 |
| 0-256 |
4500 | l = buffer_size; never executed: l = buffer_size; | 0 |
4501 | 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; | - |
4502 | 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; | - |
4503 | memcpy(dest, src, l * sizeof(quint16)); executed (the execution status of this line is deduced): memcpy(dest, src, l * sizeof(quint16)); | - |
4504 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4505 | tx += l; executed (the execution status of this line is deduced): tx += l; | - |
4506 | sx = 0; executed (the execution status of this line is deduced): sx = 0; | - |
4507 | } executed: } Execution Count:256 | 256 |
4508 | | - |
4509 | // Now use the rasterBuffer as the source of the texture, | - |
4510 | // We can now progressively copy larger blocks | - |
4511 | // - Less cpu time in code figuring out what to copy | - |
4512 | // We are dealing with one block of data | - |
4513 | // - More likely to fit in the cache | - |
4514 | // - can use memcpy | - |
4515 | 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)); | - |
4516 | length = spans->len - copy_image_width; executed (the execution status of this line is deduced): length = spans->len - copy_image_width; | - |
4517 | 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; | - |
4518 | quint16 *dest = src + copy_image_width; executed (the execution status of this line is deduced): quint16 *dest = src + copy_image_width; | - |
4519 | while (copy_image_width < length) { partially evaluated: copy_image_width < length no Evaluation Count:0 | yes Evaluation Count:128 |
| 0-128 |
4520 | 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)); | - |
4521 | dest += copy_image_width; never executed (the execution status of this line is deduced): dest += copy_image_width; | - |
4522 | length -= copy_image_width; never executed (the execution status of this line is deduced): length -= copy_image_width; | - |
4523 | copy_image_width *= 2; never executed (the execution status of this line is deduced): copy_image_width *= 2; | - |
4524 | } | 0 |
4525 | if (length > 0) partially evaluated: length > 0 yes Evaluation Count:128 | no Evaluation Count:0 |
| 0-128 |
4526 | memcpy(dest, src, length * sizeof(quint16)); executed: memcpy(dest, src, length * sizeof(quint16)); Execution Count:128 | 128 |
4527 | } else { executed: } Execution Count:128 | 128 |
4528 | const quint8 alpha = (coverage + 1) >> 3; executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4529 | const quint8 ialpha = 0x20 - alpha; executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4530 | if (alpha > 0) { evaluated: alpha > 0 yes Evaluation Count:640 | yes Evaluation Count:128 |
| 128-640 |
4531 | while (length) { evaluated: length yes Evaluation Count:1280 | yes Evaluation Count:640 |
| 640-1280 |
4532 | int l = qMin(image_width - sx, length); executed (the execution status of this line is deduced): int l = qMin(image_width - sx, length); | - |
4533 | if (buffer_size < l) partially evaluated: buffer_size < l no Evaluation Count:0 | yes Evaluation Count:1280 |
| 0-1280 |
4534 | l = buffer_size; never executed: l = buffer_size; | 0 |
4535 | 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; | - |
4536 | 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; | - |
4537 | 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); | - |
4538 | x += l; executed (the execution status of this line is deduced): x += l; | - |
4539 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
4540 | sx = 0; executed (the execution status of this line is deduced): sx = 0; | - |
4541 | } executed: } Execution Count:1280 | 1280 |
4542 | } executed: } Execution Count:640 | 640 |
4543 | } executed: } Execution Count:768 | 768 |
4544 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
4545 | } executed: } Execution Count:896 | 896 |
4546 | } executed: } Execution Count:8 | 8 |
4547 | | - |
4548 | static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans, void *userData) | - |
4549 | { | - |
4550 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); never executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
4551 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; never executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4552 | | - |
4553 | if (data->texture.format != QImage::Format_RGB16 never evaluated: data->texture.format != QImage::Format_RGB16 | 0 |
4554 | || (mode != QPainter::CompositionMode_SourceOver never evaluated: mode != QPainter::CompositionMode_SourceOver | 0 |
4555 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
4556 | { | - |
4557 | blend_src_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
4558 | return; | 0 |
4559 | } | - |
4560 | | - |
4561 | quint16 buffer[buffer_size]; never executed (the execution status of this line is deduced): quint16 buffer[buffer_size]; | - |
4562 | | - |
4563 | const int src_minx = data->texture.x1; never executed (the execution status of this line is deduced): const int src_minx = data->texture.x1; | - |
4564 | const int src_miny = data->texture.y1; never executed (the execution status of this line is deduced): const int src_miny = data->texture.y1; | - |
4565 | 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; | - |
4566 | 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; | - |
4567 | | - |
4568 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
4569 | // The increment pr x in the scanline | - |
4570 | 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); | - |
4571 | 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); | - |
4572 | | - |
4573 | while (count--) { | 0 |
4574 | 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; | - |
4575 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4576 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4577 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
4578 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4579 | continue; never executed: continue; | 0 |
4580 | } | - |
4581 | | - |
4582 | 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; | - |
4583 | 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); | - |
4584 | 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); | - |
4585 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
4586 | + 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; | - |
4587 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
4588 | + 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; | - |
4589 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4590 | | - |
4591 | while (length) { | 0 |
4592 | int l; never executed (the execution status of this line is deduced): int l; | - |
4593 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
4594 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
4595 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
4596 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
4597 | } else { | 0 |
4598 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
4599 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
4600 | } | 0 |
4601 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
4602 | | - |
4603 | while (b < end) { | 0 |
4604 | int x1 = (x >> 16); never executed (the execution status of this line is deduced): int x1 = (x >> 16); | - |
4605 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
4606 | int y1 = (y >> 16); never executed (the execution status of this line is deduced): int y1 = (y >> 16); | - |
4607 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
4608 | | - |
4609 | 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); | - |
4610 | 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); | - |
4611 | | - |
4612 | 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); | - |
4613 | 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); | - |
4614 | quint16 tl = src1[x1]; never executed (the execution status of this line is deduced): quint16 tl = src1[x1]; | - |
4615 | const quint16 tr = src1[x2]; never executed (the execution status of this line is deduced): const quint16 tr = src1[x2]; | - |
4616 | quint16 bl = src2[x1]; never executed (the execution status of this line is deduced): quint16 bl = src2[x1]; | - |
4617 | const quint16 br = src2[x2]; never executed (the execution status of this line is deduced): const quint16 br = src2[x2]; | - |
4618 | | - |
4619 | const uint distxsl8 = x & 0xff00; never executed (the execution status of this line is deduced): const uint distxsl8 = x & 0xff00; | - |
4620 | const uint distysl8 = y & 0xff00; never executed (the execution status of this line is deduced): const uint distysl8 = y & 0xff00; | - |
4621 | const uint distx = distxsl8 >> 8; never executed (the execution status of this line is deduced): const uint distx = distxsl8 >> 8; | - |
4622 | const uint disty = distysl8 >> 8; never executed (the execution status of this line is deduced): const uint disty = distysl8 >> 8; | - |
4623 | const uint distxy = distx * disty; never executed (the execution status of this line is deduced): const uint distxy = distx * disty; | - |
4624 | | - |
4625 | 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; | - |
4626 | const uint trw = distxsl8 - distxy; // distx * (256 - disty) never executed (the execution status of this line is deduced): const uint trw = distxsl8 - distxy; | - |
4627 | const uint blw = distysl8 - distxy; // (256 - distx) * disty never executed (the execution status of this line is deduced): const uint blw = distysl8 - distxy; | - |
4628 | const uint brw = distxy; // distx * disty never executed (the execution status of this line is deduced): const uint brw = distxy; | - |
4629 | 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 | - |
4630 | + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; never executed (the execution status of this line is deduced): + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; | - |
4631 | 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 | - |
4632 | + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; never executed (the execution status of this line is deduced): + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; | - |
4633 | 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 | - |
4634 | + (bl & 0x001f) * blw + (br & 0x001f) * brw); never executed (the execution status of this line is deduced): + (bl & 0x001f) * blw + (br & 0x001f) * brw); | - |
4635 | *b = quint16((red | green | blue) >> 16); never executed (the execution status of this line is deduced): *b = quint16((red | green | blue) >> 16); | - |
4636 | | - |
4637 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4638 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4639 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4640 | } | 0 |
4641 | | - |
4642 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
4643 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
4644 | | - |
4645 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
4646 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4647 | } | 0 |
4648 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4649 | } | 0 |
4650 | } else { | 0 |
4651 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
4652 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
4653 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
4654 | | - |
4655 | while (count--) { | 0 |
4656 | 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; | - |
4657 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4658 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4659 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
4660 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4661 | continue; never executed: continue; | 0 |
4662 | } | - |
4663 | | - |
4664 | 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; | - |
4665 | | - |
4666 | 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); | - |
4667 | 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); | - |
4668 | | - |
4669 | 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; | - |
4670 | 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; | - |
4671 | 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; | - |
4672 | | - |
4673 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4674 | while (length) { | 0 |
4675 | int l; never executed (the execution status of this line is deduced): int l; | - |
4676 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
4677 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
4678 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
4679 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
4680 | } else { | 0 |
4681 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
4682 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
4683 | } | 0 |
4684 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
4685 | | - |
4686 | while (b < end) { | 0 |
4687 | const qreal iw = w == 0 ? 1 : 1 / w; | 0 |
4688 | 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); | - |
4689 | 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); | - |
4690 | | - |
4691 | int x1 = int(px) - (px < 0); never executed (the execution status of this line is deduced): int x1 = int(px) - (px < 0); | - |
4692 | int x2; never executed (the execution status of this line is deduced): int x2; | - |
4693 | int y1 = int(py) - (py < 0); never executed (the execution status of this line is deduced): int y1 = int(py) - (py < 0); | - |
4694 | int y2; never executed (the execution status of this line is deduced): int y2; | - |
4695 | | - |
4696 | 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); | - |
4697 | 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); | - |
4698 | | - |
4699 | 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); | - |
4700 | 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); | - |
4701 | quint16 tl = src1[x1]; never executed (the execution status of this line is deduced): quint16 tl = src1[x1]; | - |
4702 | const quint16 tr = src1[x2]; never executed (the execution status of this line is deduced): const quint16 tr = src1[x2]; | - |
4703 | quint16 bl = src2[x1]; never executed (the execution status of this line is deduced): quint16 bl = src2[x1]; | - |
4704 | const quint16 br = src2[x2]; never executed (the execution status of this line is deduced): const quint16 br = src2[x2]; | - |
4705 | | - |
4706 | const uint distx = uint((px - x1) * 256); never executed (the execution status of this line is deduced): const uint distx = uint((px - x1) * 256); | - |
4707 | const uint disty = uint((py - y1) * 256); never executed (the execution status of this line is deduced): const uint disty = uint((py - y1) * 256); | - |
4708 | const uint distxsl8 = distx << 8; never executed (the execution status of this line is deduced): const uint distxsl8 = distx << 8; | - |
4709 | const uint distysl8 = disty << 8; never executed (the execution status of this line is deduced): const uint distysl8 = disty << 8; | - |
4710 | const uint distxy = distx * disty; never executed (the execution status of this line is deduced): const uint distxy = distx * disty; | - |
4711 | | - |
4712 | 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; | - |
4713 | const uint trw = distxsl8 - distxy; // distx * (256 - disty) never executed (the execution status of this line is deduced): const uint trw = distxsl8 - distxy; | - |
4714 | const uint blw = distysl8 - distxy; // (256 - distx) * disty never executed (the execution status of this line is deduced): const uint blw = distysl8 - distxy; | - |
4715 | const uint brw = distxy; // distx * disty never executed (the execution status of this line is deduced): const uint brw = distxy; | - |
4716 | 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 | - |
4717 | + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; never executed (the execution status of this line is deduced): + (bl & 0xf800) * blw + (br & 0xf800) * brw) & 0xf8000000; | - |
4718 | 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 | - |
4719 | + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; never executed (the execution status of this line is deduced): + (bl & 0x07e0) * blw + (br & 0x07e0) * brw) & 0x07e00000; | - |
4720 | 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 | - |
4721 | + (bl & 0x001f) * blw + (br & 0x001f) * brw); never executed (the execution status of this line is deduced): + (bl & 0x001f) * blw + (br & 0x001f) * brw); | - |
4722 | *b = quint16((red | green | blue) >> 16); never executed (the execution status of this line is deduced): *b = quint16((red | green | blue) >> 16); | - |
4723 | | - |
4724 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4725 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4726 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4727 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
4728 | } | 0 |
4729 | | - |
4730 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
4731 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
4732 | | - |
4733 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
4734 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4735 | } | 0 |
4736 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4737 | } | 0 |
4738 | } | 0 |
4739 | } | - |
4740 | | - |
4741 | static void blend_transformed_argb(int count, const QSpan *spans, void *userData) | - |
4742 | { | - |
4743 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4744 | 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 |
4745 | && data->texture.format != QImage::Format_RGB32) { partially evaluated: data->texture.format != QImage::Format_RGB32 yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1 |
4746 | blend_src_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
4747 | return; executed: return; Execution Count:1 | 1 |
4748 | } | - |
4749 | | - |
4750 | CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode]; never executed (the execution status of this line is deduced): CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode]; | - |
4751 | uint buffer[buffer_size]; never executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
4752 | | - |
4753 | int image_width = data->texture.width; never executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
4754 | int image_height = data->texture.height; never executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
4755 | | - |
4756 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
4757 | // The increment pr x in the scanline | - |
4758 | int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
4759 | int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
4760 | | - |
4761 | while (count--) { | 0 |
4762 | void *t = data->rasterBuffer->scanLine(spans->y); never executed (the execution status of this line is deduced): void *t = data->rasterBuffer->scanLine(spans->y); | - |
4763 | | - |
4764 | uint *target = ((uint *)t) + spans->x; never executed (the execution status of this line is deduced): uint *target = ((uint *)t) + spans->x; | - |
4765 | | - |
4766 | 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); | - |
4767 | 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); | - |
4768 | | - |
4769 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
4770 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
4771 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
4772 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
4773 | | - |
4774 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4775 | 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; | - |
4776 | while (length) { | 0 |
4777 | int l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
4778 | const uint *end = buffer + l; never executed (the execution status of this line is deduced): const uint *end = buffer + l; | - |
4779 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
4780 | while (b < end) { | 0 |
4781 | 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); | - |
4782 | 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); | - |
4783 | *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]; | - |
4784 | | - |
4785 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4786 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4787 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4788 | } | 0 |
4789 | func(target, buffer, l, coverage); never executed (the execution status of this line is deduced): func(target, buffer, l, coverage); | - |
4790 | target += l; never executed (the execution status of this line is deduced): target += l; | - |
4791 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4792 | } | 0 |
4793 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4794 | } | 0 |
4795 | } else { | 0 |
4796 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
4797 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
4798 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
4799 | while (count--) { | 0 |
4800 | void *t = data->rasterBuffer->scanLine(spans->y); never executed (the execution status of this line is deduced): void *t = data->rasterBuffer->scanLine(spans->y); | - |
4801 | | - |
4802 | uint *target = ((uint *)t) + spans->x; never executed (the execution status of this line is deduced): uint *target = ((uint *)t) + spans->x; | - |
4803 | | - |
4804 | 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); | - |
4805 | 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); | - |
4806 | | - |
4807 | 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; | - |
4808 | 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; | - |
4809 | 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; | - |
4810 | | - |
4811 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4812 | 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; | - |
4813 | while (length) { | 0 |
4814 | int l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
4815 | const uint *end = buffer + l; never executed (the execution status of this line is deduced): const uint *end = buffer + l; | - |
4816 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
4817 | while (b < end) { | 0 |
4818 | const qreal iw = w == 0 ? 1 : 1 / w; | 0 |
4819 | const qreal tx = x * iw; never executed (the execution status of this line is deduced): const qreal tx = x * iw; | - |
4820 | const qreal ty = y * iw; never executed (the execution status of this line is deduced): const qreal ty = y * iw; | - |
4821 | 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); | - |
4822 | 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); | - |
4823 | | - |
4824 | *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]; | - |
4825 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4826 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4827 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
4828 | | - |
4829 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4830 | } | 0 |
4831 | func(target, buffer, l, coverage); never executed (the execution status of this line is deduced): func(target, buffer, l, coverage); | - |
4832 | target += l; never executed (the execution status of this line is deduced): target += l; | - |
4833 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4834 | } | 0 |
4835 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4836 | } | 0 |
4837 | } | 0 |
4838 | } | - |
4839 | | - |
4840 | static void blend_transformed_rgb565(int count, const QSpan *spans, void *userData) | - |
4841 | { | - |
4842 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); never executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
4843 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; never executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
4844 | | - |
4845 | if (data->texture.format != QImage::Format_RGB16 never evaluated: data->texture.format != QImage::Format_RGB16 | 0 |
4846 | || (mode != QPainter::CompositionMode_SourceOver never evaluated: mode != QPainter::CompositionMode_SourceOver | 0 |
4847 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
4848 | { | - |
4849 | blend_src_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
4850 | return; | 0 |
4851 | } | - |
4852 | | - |
4853 | quint16 buffer[buffer_size]; never executed (the execution status of this line is deduced): quint16 buffer[buffer_size]; | - |
4854 | const int image_width = data->texture.width; never executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
4855 | const int image_height = data->texture.height; never executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
4856 | | - |
4857 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
4858 | // The increment pr x in the scanline | - |
4859 | 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); | - |
4860 | 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); | - |
4861 | | - |
4862 | while (count--) { | 0 |
4863 | 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; | - |
4864 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4865 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4866 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
4867 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4868 | continue; never executed: continue; | 0 |
4869 | } | - |
4870 | | - |
4871 | 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; | - |
4872 | 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); | - |
4873 | 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); | - |
4874 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
4875 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
4876 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
4877 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
4878 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4879 | | - |
4880 | while (length) { | 0 |
4881 | int l; never executed (the execution status of this line is deduced): int l; | - |
4882 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
4883 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
4884 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
4885 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
4886 | } else { | 0 |
4887 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
4888 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
4889 | } | 0 |
4890 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
4891 | | - |
4892 | while (b < end) { | 0 |
4893 | 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); | - |
4894 | 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); | - |
4895 | | - |
4896 | *b = ((quint16 *)data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = ((quint16 *)data->texture.scanLine(py))[px]; | - |
4897 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4898 | | - |
4899 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4900 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4901 | } | 0 |
4902 | | - |
4903 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
4904 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
4905 | | - |
4906 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
4907 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4908 | } | 0 |
4909 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4910 | } | 0 |
4911 | } else { | 0 |
4912 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
4913 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
4914 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
4915 | | - |
4916 | while (count--) { | 0 |
4917 | 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; | - |
4918 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
4919 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
4920 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
4921 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4922 | continue; never executed: continue; | 0 |
4923 | } | - |
4924 | | - |
4925 | 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; | - |
4926 | | - |
4927 | 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); | - |
4928 | 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); | - |
4929 | | - |
4930 | 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; | - |
4931 | 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; | - |
4932 | 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; | - |
4933 | | - |
4934 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
4935 | while (length) { | 0 |
4936 | int l; never executed (the execution status of this line is deduced): int l; | - |
4937 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
4938 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
4939 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
4940 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
4941 | } else { | 0 |
4942 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
4943 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
4944 | } | 0 |
4945 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
4946 | | - |
4947 | while (b < end) { | 0 |
4948 | const qreal iw = w == 0 ? 1 : 1 / w; | 0 |
4949 | const qreal tx = x * iw; never executed (the execution status of this line is deduced): const qreal tx = x * iw; | - |
4950 | const qreal ty = y * iw; never executed (the execution status of this line is deduced): const qreal ty = y * iw; | - |
4951 | | - |
4952 | 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); | - |
4953 | 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); | - |
4954 | | - |
4955 | *b = ((quint16 *)data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = ((quint16 *)data->texture.scanLine(py))[px]; | - |
4956 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
4957 | | - |
4958 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
4959 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
4960 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
4961 | } | 0 |
4962 | | - |
4963 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
4964 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
4965 | | - |
4966 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
4967 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
4968 | } | 0 |
4969 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
4970 | } | 0 |
4971 | } | 0 |
4972 | } | - |
4973 | | - |
4974 | static void blend_transformed_tiled_argb(int count, const QSpan *spans, void *userData) | - |
4975 | { | - |
4976 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
4977 | 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 |
4978 | && data->texture.format != QImage::Format_RGB32) { never evaluated: data->texture.format != QImage::Format_RGB32 | 0 |
4979 | blend_src_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
4980 | return; | 0 |
4981 | } | - |
4982 | | - |
4983 | CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode]; executed (the execution status of this line is deduced): CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode]; | - |
4984 | uint buffer[buffer_size]; executed (the execution status of this line is deduced): uint buffer[buffer_size]; | - |
4985 | | - |
4986 | int image_width = data->texture.width; executed (the execution status of this line is deduced): int image_width = data->texture.width; | - |
4987 | int image_height = data->texture.height; executed (the execution status of this line is deduced): int image_height = data->texture.height; | - |
4988 | 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; | - |
4989 | | - |
4990 | if (data->fast_matrix) { partially evaluated: data->fast_matrix no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
4991 | // The increment pr x in the scanline | - |
4992 | int fdx = (int)(data->m11 * fixed_scale); never executed (the execution status of this line is deduced): int fdx = (int)(data->m11 * fixed_scale); | - |
4993 | int fdy = (int)(data->m12 * fixed_scale); never executed (the execution status of this line is deduced): int fdy = (int)(data->m12 * fixed_scale); | - |
4994 | | - |
4995 | while (count--) { | 0 |
4996 | void *t = data->rasterBuffer->scanLine(spans->y); never executed (the execution status of this line is deduced): void *t = data->rasterBuffer->scanLine(spans->y); | - |
4997 | | - |
4998 | uint *target = ((uint *)t) + spans->x; never executed (the execution status of this line is deduced): uint *target = ((uint *)t) + spans->x; | - |
4999 | uint *image_bits = (uint *)data->texture.imageData; never executed (the execution status of this line is deduced): uint *image_bits = (uint *)data->texture.imageData; | - |
5000 | | - |
5001 | 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); | - |
5002 | 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); | - |
5003 | | - |
5004 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
5005 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
5006 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
5007 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
5008 | | - |
5009 | 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; | - |
5010 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
5011 | while (length) { | 0 |
5012 | int l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
5013 | const uint *end = buffer + l; never executed (the execution status of this line is deduced): const uint *end = buffer + l; | - |
5014 | uint *b = buffer; never executed (the execution status of this line is deduced): uint *b = buffer; | - |
5015 | while (b < end) { | 0 |
5016 | int px = x >> 16; never executed (the execution status of this line is deduced): int px = x >> 16; | - |
5017 | int py = y >> 16; never executed (the execution status of this line is deduced): int py = y >> 16; | - |
5018 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
5019 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
5020 | if (px < 0) px += image_width; never executed: px += image_width; never evaluated: px < 0 | 0 |
5021 | if (py < 0) py += image_height; never executed: py += image_height; never evaluated: py < 0 | 0 |
5022 | int y_offset = py * scanline_offset; never executed (the execution status of this line is deduced): int y_offset = py * scanline_offset; | - |
5023 | | - |
5024 | Q_ASSERT(px >= 0 && px < image_width); never executed (the execution status of this line is deduced): qt_noop(); | - |
5025 | Q_ASSERT(py >= 0 && py < image_height); never executed (the execution status of this line is deduced): qt_noop(); | - |
5026 | | - |
5027 | *b = image_bits[y_offset + px]; never executed (the execution status of this line is deduced): *b = image_bits[y_offset + px]; | - |
5028 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
5029 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
5030 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
5031 | } | 0 |
5032 | func(target, buffer, l, coverage); never executed (the execution status of this line is deduced): func(target, buffer, l, coverage); | - |
5033 | target += l; never executed (the execution status of this line is deduced): target += l; | - |
5034 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
5035 | } | 0 |
5036 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5037 | } | 0 |
5038 | } else { | 0 |
5039 | const qreal fdx = data->m11; executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
5040 | const qreal fdy = data->m12; executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
5041 | const qreal fdw = data->m13; executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
5042 | while (count--) { evaluated: count-- yes Evaluation Count:111 | yes Evaluation Count:2 |
| 2-111 |
5043 | void *t = data->rasterBuffer->scanLine(spans->y); executed (the execution status of this line is deduced): void *t = data->rasterBuffer->scanLine(spans->y); | - |
5044 | | - |
5045 | uint *target = ((uint *)t) + spans->x; executed (the execution status of this line is deduced): uint *target = ((uint *)t) + spans->x; | - |
5046 | uint *image_bits = (uint *)data->texture.imageData; executed (the execution status of this line is deduced): uint *image_bits = (uint *)data->texture.imageData; | - |
5047 | | - |
5048 | 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); | - |
5049 | 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); | - |
5050 | | - |
5051 | 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; | - |
5052 | 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; | - |
5053 | 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; | - |
5054 | | - |
5055 | 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; | - |
5056 | int length = spans->len; executed (the execution status of this line is deduced): int length = spans->len; | - |
5057 | while (length) { evaluated: length yes Evaluation Count:111 | yes Evaluation Count:111 |
| 111 |
5058 | int l = qMin(length, buffer_size); executed (the execution status of this line is deduced): int l = qMin(length, buffer_size); | - |
5059 | const uint *end = buffer + l; executed (the execution status of this line is deduced): const uint *end = buffer + l; | - |
5060 | uint *b = buffer; executed (the execution status of this line is deduced): uint *b = buffer; | - |
5061 | while (b < end) { evaluated: b < end yes Evaluation Count:12101 | yes Evaluation Count:111 |
| 111-12101 |
5062 | const qreal iw = w == 0 ? 1 : 1 / w; partially evaluated: w == 0 no Evaluation Count:0 | yes Evaluation Count:12101 |
| 0-12101 |
5063 | const qreal tx = x * iw; executed (the execution status of this line is deduced): const qreal tx = x * iw; | - |
5064 | const qreal ty = y * iw; executed (the execution status of this line is deduced): const qreal ty = y * iw; | - |
5065 | int px = int(tx) - (tx < 0); executed (the execution status of this line is deduced): int px = int(tx) - (tx < 0); | - |
5066 | int py = int(ty) - (ty < 0); executed (the execution status of this line is deduced): int py = int(ty) - (ty < 0); | - |
5067 | | - |
5068 | px %= image_width; executed (the execution status of this line is deduced): px %= image_width; | - |
5069 | py %= image_height; executed (the execution status of this line is deduced): py %= image_height; | - |
5070 | 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 |
5071 | 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 |
5072 | int y_offset = py * scanline_offset; executed (the execution status of this line is deduced): int y_offset = py * scanline_offset; | - |
5073 | | - |
5074 | Q_ASSERT(px >= 0 && px < image_width); executed (the execution status of this line is deduced): qt_noop(); | - |
5075 | Q_ASSERT(py >= 0 && py < image_height); executed (the execution status of this line is deduced): qt_noop(); | - |
5076 | | - |
5077 | *b = image_bits[y_offset + px]; executed (the execution status of this line is deduced): *b = image_bits[y_offset + px]; | - |
5078 | x += fdx; executed (the execution status of this line is deduced): x += fdx; | - |
5079 | y += fdy; executed (the execution status of this line is deduced): y += fdy; | - |
5080 | w += fdw; executed (the execution status of this line is deduced): w += fdw; | - |
5081 | //force increment to avoid /0 | - |
5082 | if (!w) { partially evaluated: !w no Evaluation Count:0 | yes Evaluation Count:12101 |
| 0-12101 |
5083 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
5084 | } | 0 |
5085 | ++b; executed (the execution status of this line is deduced): ++b; | - |
5086 | } executed: } Execution Count:12101 | 12101 |
5087 | func(target, buffer, l, coverage); executed (the execution status of this line is deduced): func(target, buffer, l, coverage); | - |
5088 | target += l; executed (the execution status of this line is deduced): target += l; | - |
5089 | length -= l; executed (the execution status of this line is deduced): length -= l; | - |
5090 | } executed: } Execution Count:111 | 111 |
5091 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
5092 | } executed: } Execution Count:111 | 111 |
5093 | } executed: } Execution Count:2 | 2 |
5094 | } | - |
5095 | | - |
5096 | static void blend_transformed_tiled_rgb565(int count, const QSpan *spans, void *userData) | - |
5097 | { | - |
5098 | QSpanData *data = reinterpret_cast<QSpanData*>(userData); never executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData*>(userData); | - |
5099 | QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; never executed (the execution status of this line is deduced): QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; | - |
5100 | | - |
5101 | if (data->texture.format != QImage::Format_RGB16 never evaluated: data->texture.format != QImage::Format_RGB16 | 0 |
5102 | || (mode != QPainter::CompositionMode_SourceOver never evaluated: mode != QPainter::CompositionMode_SourceOver | 0 |
5103 | && mode != QPainter::CompositionMode_Source)) never evaluated: mode != QPainter::CompositionMode_Source | 0 |
5104 | { | - |
5105 | blend_src_generic(count, spans, userData); never executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
5106 | return; | 0 |
5107 | } | - |
5108 | | - |
5109 | quint16 buffer[buffer_size]; never executed (the execution status of this line is deduced): quint16 buffer[buffer_size]; | - |
5110 | const int image_width = data->texture.width; never executed (the execution status of this line is deduced): const int image_width = data->texture.width; | - |
5111 | const int image_height = data->texture.height; never executed (the execution status of this line is deduced): const int image_height = data->texture.height; | - |
5112 | | - |
5113 | if (data->fast_matrix) { never evaluated: data->fast_matrix | 0 |
5114 | // The increment pr x in the scanline | - |
5115 | 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); | - |
5116 | 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); | - |
5117 | | - |
5118 | while (count--) { | 0 |
5119 | 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; | - |
5120 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
5121 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
5122 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
5123 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5124 | continue; never executed: continue; | 0 |
5125 | } | - |
5126 | | - |
5127 | 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; | - |
5128 | 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); | - |
5129 | 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); | - |
5130 | int x = int((data->m21 * cy never executed (the execution status of this line is deduced): int x = int((data->m21 * cy | - |
5131 | + data->m11 * cx + data->dx) * fixed_scale); never executed (the execution status of this line is deduced): + data->m11 * cx + data->dx) * fixed_scale); | - |
5132 | int y = int((data->m22 * cy never executed (the execution status of this line is deduced): int y = int((data->m22 * cy | - |
5133 | + data->m12 * cx + data->dy) * fixed_scale); never executed (the execution status of this line is deduced): + data->m12 * cx + data->dy) * fixed_scale); | - |
5134 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
5135 | | - |
5136 | while (length) { | 0 |
5137 | int l; never executed (the execution status of this line is deduced): int l; | - |
5138 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
5139 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
5140 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
5141 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
5142 | } else { | 0 |
5143 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
5144 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
5145 | } | 0 |
5146 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
5147 | | - |
5148 | while (b < end) { | 0 |
5149 | int px = (x >> 16) % image_width; never executed (the execution status of this line is deduced): int px = (x >> 16) % image_width; | - |
5150 | int py = (y >> 16) % image_height; never executed (the execution status of this line is deduced): int py = (y >> 16) % image_height; | - |
5151 | | - |
5152 | if (px < 0) | 0 |
5153 | px += image_width; never executed: px += image_width; | 0 |
5154 | if (py < 0) | 0 |
5155 | py += image_height; never executed: py += image_height; | 0 |
5156 | | - |
5157 | *b = ((quint16 *)data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = ((quint16 *)data->texture.scanLine(py))[px]; | - |
5158 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
5159 | | - |
5160 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
5161 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
5162 | } | 0 |
5163 | | - |
5164 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
5165 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
5166 | | - |
5167 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
5168 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
5169 | } | 0 |
5170 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5171 | } | 0 |
5172 | } else { | 0 |
5173 | const qreal fdx = data->m11; never executed (the execution status of this line is deduced): const qreal fdx = data->m11; | - |
5174 | const qreal fdy = data->m12; never executed (the execution status of this line is deduced): const qreal fdy = data->m12; | - |
5175 | const qreal fdw = data->m13; never executed (the execution status of this line is deduced): const qreal fdw = data->m13; | - |
5176 | | - |
5177 | while (count--) { | 0 |
5178 | 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; | - |
5179 | const quint8 alpha = (coverage + 1) >> 3; never executed (the execution status of this line is deduced): const quint8 alpha = (coverage + 1) >> 3; | - |
5180 | const quint8 ialpha = 0x20 - alpha; never executed (the execution status of this line is deduced): const quint8 ialpha = 0x20 - alpha; | - |
5181 | if (alpha == 0) { never evaluated: alpha == 0 | 0 |
5182 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5183 | continue; never executed: continue; | 0 |
5184 | } | - |
5185 | | - |
5186 | 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; | - |
5187 | | - |
5188 | 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); | - |
5189 | 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); | - |
5190 | | - |
5191 | 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; | - |
5192 | 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; | - |
5193 | 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; | - |
5194 | | - |
5195 | int length = spans->len; never executed (the execution status of this line is deduced): int length = spans->len; | - |
5196 | while (length) { | 0 |
5197 | int l; never executed (the execution status of this line is deduced): int l; | - |
5198 | quint16 *b; never executed (the execution status of this line is deduced): quint16 *b; | - |
5199 | if (ialpha == 0) { never evaluated: ialpha == 0 | 0 |
5200 | l = length; never executed (the execution status of this line is deduced): l = length; | - |
5201 | b = dest; never executed (the execution status of this line is deduced): b = dest; | - |
5202 | } else { | 0 |
5203 | l = qMin(length, buffer_size); never executed (the execution status of this line is deduced): l = qMin(length, buffer_size); | - |
5204 | b = buffer; never executed (the execution status of this line is deduced): b = buffer; | - |
5205 | } | 0 |
5206 | const quint16 *end = b + l; never executed (the execution status of this line is deduced): const quint16 *end = b + l; | - |
5207 | | - |
5208 | while (b < end) { | 0 |
5209 | const qreal iw = w == 0 ? 1 : 1 / w; | 0 |
5210 | const qreal tx = x * iw; never executed (the execution status of this line is deduced): const qreal tx = x * iw; | - |
5211 | const qreal ty = y * iw; never executed (the execution status of this line is deduced): const qreal ty = y * iw; | - |
5212 | | - |
5213 | int px = int(tx) - (tx < 0); never executed (the execution status of this line is deduced): int px = int(tx) - (tx < 0); | - |
5214 | int py = int(ty) - (ty < 0); never executed (the execution status of this line is deduced): int py = int(ty) - (ty < 0); | - |
5215 | | - |
5216 | px %= image_width; never executed (the execution status of this line is deduced): px %= image_width; | - |
5217 | py %= image_height; never executed (the execution status of this line is deduced): py %= image_height; | - |
5218 | if (px < 0) | 0 |
5219 | px += image_width; never executed: px += image_width; | 0 |
5220 | if (py < 0) | 0 |
5221 | py += image_height; never executed: py += image_height; | 0 |
5222 | | - |
5223 | *b = ((quint16 *)data->texture.scanLine(py))[px]; never executed (the execution status of this line is deduced): *b = ((quint16 *)data->texture.scanLine(py))[px]; | - |
5224 | ++b; never executed (the execution status of this line is deduced): ++b; | - |
5225 | | - |
5226 | x += fdx; never executed (the execution status of this line is deduced): x += fdx; | - |
5227 | y += fdy; never executed (the execution status of this line is deduced): y += fdy; | - |
5228 | w += fdw; never executed (the execution status of this line is deduced): w += fdw; | - |
5229 | // force increment to avoid /0 | - |
5230 | if (!w) | 0 |
5231 | w += fdw; never executed: w += fdw; | 0 |
5232 | } | 0 |
5233 | | - |
5234 | if (ialpha != 0) never evaluated: ialpha != 0 | 0 |
5235 | blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); never executed: blend_sourceOver_rgb16_rgb16(dest, buffer, l, alpha, ialpha); | 0 |
5236 | | - |
5237 | dest += l; never executed (the execution status of this line is deduced): dest += l; | - |
5238 | length -= l; never executed (the execution status of this line is deduced): length -= l; | - |
5239 | } | 0 |
5240 | ++spans; never executed (the execution status of this line is deduced): ++spans; | - |
5241 | } | 0 |
5242 | } | 0 |
5243 | } | - |
5244 | | - |
5245 | | - |
5246 | /* Image formats here are target formats */ | - |
5247 | static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats] = { | - |
5248 | // Untransformed | - |
5249 | { | - |
5250 | 0, // Invalid | - |
5251 | blend_untransformed_generic, // Mono | - |
5252 | blend_untransformed_generic, // MonoLsb | - |
5253 | blend_untransformed_generic, // Indexed8 | - |
5254 | blend_untransformed_generic, // RGB32 | - |
5255 | blend_untransformed_generic, // ARGB32 | - |
5256 | blend_untransformed_argb, // ARGB32_Premultiplied | - |
5257 | blend_untransformed_rgb565, | - |
5258 | blend_untransformed_generic, | - |
5259 | blend_untransformed_generic, | - |
5260 | blend_untransformed_generic, | - |
5261 | blend_untransformed_generic, | - |
5262 | blend_untransformed_generic, | - |
5263 | blend_untransformed_generic, | - |
5264 | blend_untransformed_generic, | - |
5265 | blend_untransformed_generic, | - |
5266 | }, | - |
5267 | // Tiled | - |
5268 | { | - |
5269 | 0, // Invalid | - |
5270 | blend_tiled_generic, // Mono | - |
5271 | blend_tiled_generic, // MonoLsb | - |
5272 | blend_tiled_generic, // Indexed8 | - |
5273 | blend_tiled_generic, // RGB32 | - |
5274 | blend_tiled_generic, // ARGB32 | - |
5275 | blend_tiled_argb, // ARGB32_Premultiplied | - |
5276 | blend_tiled_rgb565, | - |
5277 | blend_tiled_generic, | - |
5278 | blend_tiled_generic, | - |
5279 | blend_tiled_generic, | - |
5280 | blend_tiled_generic, | - |
5281 | blend_tiled_generic, | - |
5282 | blend_tiled_generic, | - |
5283 | blend_tiled_generic, | - |
5284 | blend_tiled_generic, | - |
5285 | }, | - |
5286 | // Transformed | - |
5287 | { | - |
5288 | 0, // Invalid | - |
5289 | blend_src_generic, // Mono | - |
5290 | blend_src_generic, // MonoLsb | - |
5291 | blend_src_generic, // Indexed8 | - |
5292 | blend_src_generic, // RGB32 | - |
5293 | blend_src_generic, // ARGB32 | - |
5294 | blend_transformed_argb, // ARGB32_Premultiplied | - |
5295 | blend_transformed_rgb565, | - |
5296 | blend_src_generic, | - |
5297 | blend_src_generic, | - |
5298 | blend_src_generic, | - |
5299 | blend_src_generic, | - |
5300 | blend_src_generic, | - |
5301 | blend_src_generic, | - |
5302 | blend_src_generic, | - |
5303 | blend_src_generic, | - |
5304 | }, | - |
5305 | // TransformedTiled | - |
5306 | { | - |
5307 | 0, | - |
5308 | blend_src_generic, // Mono | - |
5309 | blend_src_generic, // MonoLsb | - |
5310 | blend_src_generic, // Indexed8 | - |
5311 | blend_src_generic, // RGB32 | - |
5312 | blend_src_generic, // ARGB32 | - |
5313 | blend_transformed_tiled_argb, // ARGB32_Premultiplied | - |
5314 | blend_transformed_tiled_rgb565, | - |
5315 | blend_src_generic, | - |
5316 | blend_src_generic, | - |
5317 | blend_src_generic, | - |
5318 | blend_src_generic, | - |
5319 | blend_src_generic, | - |
5320 | blend_src_generic, | - |
5321 | blend_src_generic, | - |
5322 | blend_src_generic | - |
5323 | }, | - |
5324 | // Bilinear | - |
5325 | { | - |
5326 | 0, | - |
5327 | blend_src_generic, // Mono | - |
5328 | blend_src_generic, // MonoLsb | - |
5329 | blend_src_generic, // Indexed8 | - |
5330 | blend_src_generic, // RGB32 | - |
5331 | blend_src_generic, // ARGB32 | - |
5332 | blend_src_generic, // ARGB32_Premultiplied | - |
5333 | blend_transformed_bilinear_rgb565, | - |
5334 | blend_src_generic, | - |
5335 | blend_src_generic, | - |
5336 | blend_src_generic, | - |
5337 | blend_src_generic, | - |
5338 | blend_src_generic, | - |
5339 | blend_src_generic, | - |
5340 | blend_src_generic, | - |
5341 | blend_src_generic, | - |
5342 | }, | - |
5343 | // BilinearTiled | - |
5344 | { | - |
5345 | 0, | - |
5346 | blend_src_generic, // Mono | - |
5347 | blend_src_generic, // MonoLsb | - |
5348 | blend_src_generic, // Indexed8 | - |
5349 | blend_src_generic, // RGB32 | - |
5350 | blend_src_generic, // ARGB32 | - |
5351 | blend_src_generic, // ARGB32_Premultiplied | - |
5352 | blend_src_generic, // RGB16 | - |
5353 | blend_src_generic, // ARGB8565_Premultiplied | - |
5354 | blend_src_generic, // RGB666 | - |
5355 | blend_src_generic, // ARGB6666_Premultiplied | - |
5356 | blend_src_generic, // RGB555 | - |
5357 | blend_src_generic, // ARGB8555_Premultiplied | - |
5358 | blend_src_generic, // RGB888 | - |
5359 | blend_src_generic, // RGB444 | - |
5360 | blend_src_generic, // ARGB4444_Premultiplied | - |
5361 | } | - |
5362 | }; | - |
5363 | | - |
5364 | void qBlendTexture(int count, const QSpan *spans, void *userData) | - |
5365 | { | - |
5366 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
5367 | 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]; | - |
5368 | proc(count, spans, userData); executed (the execution status of this line is deduced): proc(count, spans, userData); | - |
5369 | } executed: } Execution Count:13045 | 13045 |
5370 | | - |
5371 | template <class DST> | - |
5372 | inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer, | - |
5373 | int x, int y, DST color, | - |
5374 | const uchar *map, | - |
5375 | int mapWidth, int mapHeight, int mapStride) | - |
5376 | { | - |
5377 | 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; | - |
5378 | const int destStride = rasterBuffer->bytesPerLine() / sizeof(DST); never executed (the execution status of this line is deduced): const int destStride = rasterBuffer->bytesPerLine() / sizeof(DST); | - |
5379 | | - |
5380 | if (mapWidth > 8) { never evaluated: mapWidth > 8 | 0 |
5381 | while (mapHeight--) { never evaluated: mapHeight-- | 0 |
5382 | int x0 = 0; never executed (the execution status of this line is deduced): int x0 = 0; | - |
5383 | int n = 0; never executed (the execution status of this line is deduced): int n = 0; | - |
5384 | for (int x = 0; x < mapWidth; x += 8) { never evaluated: x < mapWidth | 0 |
5385 | uchar s = map[x >> 3]; never executed (the execution status of this line is deduced): uchar s = map[x >> 3]; | - |
5386 | for (int i = 0; i < 8; ++i) { | 0 |
5387 | if (s & 0x80) { never evaluated: s & 0x80 | 0 |
5388 | ++n; never executed (the execution status of this line is deduced): ++n; | - |
5389 | } else { | 0 |
5390 | if (n) { | 0 |
5391 | qt_memfill(dest + x0, color, n); never executed (the execution status of this line is deduced): qt_memfill(dest + x0, color, n); | - |
5392 | x0 += n + 1; never executed (the execution status of this line is deduced): x0 += n + 1; | - |
5393 | n = 0; never executed (the execution status of this line is deduced): n = 0; | - |
5394 | } else { | 0 |
5395 | ++x0; never executed (the execution status of this line is deduced): ++x0; | - |
5396 | } | 0 |
5397 | if (!s) { | 0 |
5398 | x0 += 8 - 1 - i; never executed (the execution status of this line is deduced): x0 += 8 - 1 - i; | - |
5399 | break; | 0 |
5400 | } | - |
5401 | } | 0 |
5402 | s <<= 1; never executed (the execution status of this line is deduced): s <<= 1; | - |
5403 | } | 0 |
5404 | } | 0 |
5405 | if (n) | 0 |
5406 | qt_memfill(dest + x0, color, n); never executed: qt_memfill(dest + x0, color, n); | 0 |
5407 | dest += destStride; never executed (the execution status of this line is deduced): dest += destStride; | - |
5408 | map += mapStride; never executed (the execution status of this line is deduced): map += mapStride; | - |
5409 | } | 0 |
5410 | } else { | 0 |
5411 | while (mapHeight--) { never evaluated: mapHeight-- | 0 |
5412 | int x0 = 0; never executed (the execution status of this line is deduced): int x0 = 0; | - |
5413 | int n = 0; never executed (the execution status of this line is deduced): int n = 0; | - |
5414 | for (uchar s = *map; s; s <<= 1) { | 0 |
5415 | if (s & 0x80) { never evaluated: s & 0x80 | 0 |
5416 | ++n; never executed (the execution status of this line is deduced): ++n; | - |
5417 | } else if (n) { never executed: } never evaluated: n | 0 |
5418 | qt_memfill(dest + x0, color, n); never executed (the execution status of this line is deduced): qt_memfill(dest + x0, color, n); | - |
5419 | x0 += n + 1; never executed (the execution status of this line is deduced): x0 += n + 1; | - |
5420 | n = 0; never executed (the execution status of this line is deduced): n = 0; | - |
5421 | } else { | 0 |
5422 | ++x0; never executed (the execution status of this line is deduced): ++x0; | - |
5423 | } | 0 |
5424 | } | - |
5425 | if (n) | 0 |
5426 | qt_memfill(dest + x0, color, n); never executed: qt_memfill(dest + x0, color, n); | 0 |
5427 | dest += destStride; never executed (the execution status of this line is deduced): dest += destStride; | - |
5428 | map += mapStride; never executed (the execution status of this line is deduced): map += mapStride; | - |
5429 | } | 0 |
5430 | } | 0 |
5431 | } | - |
5432 | | - |
5433 | static void qt_gradient_quint32(int count, const QSpan *spans, void *userData) | - |
5434 | { | - |
5435 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
5436 | | - |
5437 | bool isVerticalGradient = executed (the execution status of this line is deduced): bool isVerticalGradient = | - |
5438 | data->txop <= QTransform::TxScale && partially evaluated: data->txop <= QTransform::TxScale yes Evaluation Count:16061 | no Evaluation Count:0 |
| 0-16061 |
5439 | data->type == QSpanData::LinearGradient && evaluated: data->type == QSpanData::LinearGradient yes Evaluation Count:16054 | yes Evaluation Count:17 |
| 17-16054 |
5440 | 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:16001 |
| 32-16001 |
5441 | | - |
5442 | if (isVerticalGradient) { evaluated: isVerticalGradient yes Evaluation Count:32 | yes Evaluation Count:16013 |
| 32-16013 |
5443 | LinearGradientValues linear; executed (the execution status of this line is deduced): LinearGradientValues linear; | - |
5444 | getLinearGradientValues(&linear, data); executed (the execution status of this line is deduced): getLinearGradientValues(&linear, data); | - |
5445 | | - |
5446 | CompositionFunctionSolid funcSolid = executed (the execution status of this line is deduced): CompositionFunctionSolid funcSolid = | - |
5447 | functionForModeSolid[data->rasterBuffer->compositionMode]; executed (the execution status of this line is deduced): functionForModeSolid[data->rasterBuffer->compositionMode]; | - |
5448 | | - |
5449 | /* | - |
5450 | The logic for vertical gradient calculations is a mathematically | - |
5451 | reduced copy of that in fetchLinearGradient() - which is basically: | - |
5452 | | - |
5453 | qreal ry = data->m22 * (y + 0.5) + data->dy; | - |
5454 | qreal t = linear.dy*ry + linear.off; | - |
5455 | t *= (GRADIENT_STOPTABLE_SIZE - 1); | - |
5456 | quint32 color = | - |
5457 | qt_gradient_pixel_fixed(&data->gradient, | - |
5458 | int(t * FIXPT_SIZE)); | - |
5459 | | - |
5460 | This has then been converted to fixed point to improve performance. | - |
5461 | */ | - |
5462 | const int gss = GRADIENT_STOPTABLE_SIZE - 1; executed (the execution status of this line is deduced): const int gss = 1024 - 1; | - |
5463 | 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)); | - |
5464 | 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))); | - |
5465 | | - |
5466 | while (count--) { evaluated: count-- yes Evaluation Count:4109 | yes Evaluation Count:32 |
| 32-4109 |
5467 | int y = spans->y; executed (the execution status of this line is deduced): int y = spans->y; | - |
5468 | int x = spans->x; executed (the execution status of this line is deduced): int x = spans->x; | - |
5469 | | - |
5470 | 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; | - |
5471 | quint32 color = executed (the execution status of this line is deduced): quint32 color = | - |
5472 | 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); | - |
5473 | | - |
5474 | funcSolid(dst, spans->len, color, spans->coverage); executed (the execution status of this line is deduced): funcSolid(dst, spans->len, color, spans->coverage); | - |
5475 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
5476 | } executed: } Execution Count:4109 | 4109 |
5477 | | - |
5478 | } else { executed: } Execution Count:32 | 32 |
5479 | blend_src_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
5480 | } executed: } Execution Count:15981 | 15981 |
5481 | } | - |
5482 | | - |
5483 | static void qt_gradient_quint16(int count, const QSpan *spans, void *userData) | - |
5484 | { | - |
5485 | QSpanData *data = reinterpret_cast<QSpanData *>(userData); executed (the execution status of this line is deduced): QSpanData *data = reinterpret_cast<QSpanData *>(userData); | - |
5486 | | - |
5487 | bool isVerticalGradient = executed (the execution status of this line is deduced): bool isVerticalGradient = | - |
5488 | data->txop <= QTransform::TxScale && partially evaluated: data->txop <= QTransform::TxScale yes Evaluation Count:242 | no Evaluation Count:0 |
| 0-242 |
5489 | data->type == QSpanData::LinearGradient && partially evaluated: data->type == QSpanData::LinearGradient yes Evaluation Count:242 | no Evaluation Count:0 |
| 0-242 |
5490 | data->gradient.linear.end.x == data->gradient.linear.origin.x; evaluated: data->gradient.linear.end.x == data->gradient.linear.origin.x yes Evaluation Count:228 | yes Evaluation Count:14 |
| 14-228 |
5491 | | - |
5492 | if (isVerticalGradient) { evaluated: isVerticalGradient yes Evaluation Count:228 | yes Evaluation Count:14 |
| 14-228 |
5493 | | - |
5494 | LinearGradientValues linear; executed (the execution status of this line is deduced): LinearGradientValues linear; | - |
5495 | getLinearGradientValues(&linear, data); executed (the execution status of this line is deduced): getLinearGradientValues(&linear, data); | - |
5496 | | - |
5497 | /* | - |
5498 | The logic for vertical gradient calculations is a mathematically | - |
5499 | reduced copy of that in fetchLinearGradient() - which is basically: | - |
5500 | | - |
5501 | qreal ry = data->m22 * (y + 0.5) + data->dy; | - |
5502 | qreal t = linear.dy*ry + linear.off; | - |
5503 | t *= (GRADIENT_STOPTABLE_SIZE - 1); | - |
5504 | quint32 color = | - |
5505 | qt_gradient_pixel_fixed(&data->gradient, | - |
5506 | int(t * FIXPT_SIZE)); | - |
5507 | | - |
5508 | This has then been converted to fixed point to improve performance. | - |
5509 | */ | - |
5510 | const int gss = GRADIENT_STOPTABLE_SIZE - 1; executed (the execution status of this line is deduced): const int gss = 1024 - 1; | - |
5511 | 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)); | - |
5512 | 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))); | - |
5513 | | - |
5514 | uint oldColor = data->solid.color; executed (the execution status of this line is deduced): uint oldColor = data->solid.color; | - |
5515 | while (count--) { evaluated: count-- yes Evaluation Count:2058 | yes Evaluation Count:228 |
| 228-2058 |
5516 | int y = spans->y; executed (the execution status of this line is deduced): int y = spans->y; | - |
5517 | | - |
5518 | 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); | - |
5519 | | - |
5520 | data->solid.color = color; executed (the execution status of this line is deduced): data->solid.color = color; | - |
5521 | blend_color_rgb16(1, spans, userData); executed (the execution status of this line is deduced): blend_color_rgb16(1, spans, userData); | - |
5522 | ++spans; executed (the execution status of this line is deduced): ++spans; | - |
5523 | } executed: } Execution Count:2058 | 2058 |
5524 | data->solid.color = oldColor; executed (the execution status of this line is deduced): data->solid.color = oldColor; | - |
5525 | | - |
5526 | } else { executed: } Execution Count:228 | 228 |
5527 | blend_src_generic(count, spans, userData); executed (the execution status of this line is deduced): blend_src_generic(count, spans, userData); | - |
5528 | } executed: } Execution Count:14 | 14 |
5529 | } | - |
5530 | | - |
5531 | inline static void qt_bitmapblit_quint32(QRasterBuffer *rasterBuffer, | - |
5532 | int x, int y, quint32 color, | - |
5533 | const uchar *map, | - |
5534 | int mapWidth, int mapHeight, int mapStride) | - |
5535 | { | - |
5536 | 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, | - |
5537 | map, mapWidth, mapHeight, mapStride); never executed (the execution status of this line is deduced): map, mapWidth, mapHeight, mapStride); | - |
5538 | } | 0 |
5539 | | - |
5540 | inline static void qt_bitmapblit_quint16(QRasterBuffer *rasterBuffer, | - |
5541 | int x, int y, quint32 color, | - |
5542 | const uchar *map, | - |
5543 | int mapWidth, int mapHeight, int mapStride) | - |
5544 | { | - |
5545 | 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), | - |
5546 | map, mapWidth, mapHeight, mapStride); never executed (the execution status of this line is deduced): map, mapWidth, mapHeight, mapStride); | - |
5547 | } | 0 |
5548 | | - |
5549 | static void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer, | - |
5550 | int x, int y, quint32 color, | - |
5551 | const uchar *map, | - |
5552 | int mapWidth, int mapHeight, int mapStride, | - |
5553 | const QClipData *) | - |
5554 | { | - |
5555 | const quint16 c = qConvertRgb32To16(color); executed (the execution status of this line is deduced): const quint16 c = qConvertRgb32To16(color); | - |
5556 | 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; | - |
5557 | const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16); executed (the execution status of this line is deduced): const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16); | - |
5558 | | - |
5559 | while (mapHeight--) { evaluated: mapHeight-- yes Evaluation Count:749393 | yes Evaluation Count:78570 |
| 78570-749393 |
5560 | for (int i = 0; i < mapWidth; ++i) { evaluated: i < mapWidth yes Evaluation Count:4515169 | yes Evaluation Count:749393 |
| 749393-4515169 |
5561 | const int coverage = map[i]; executed (the execution status of this line is deduced): const int coverage = map[i]; | - |
5562 | | - |
5563 | if (coverage == 0) { evaluated: coverage == 0 yes Evaluation Count:1564851 | yes Evaluation Count:2950318 |
| 1564851-2950318 |
5564 | // nothing | - |
5565 | } else if (coverage == 255) { executed: } Execution Count:1564851 evaluated: coverage == 255 yes Evaluation Count:90746 | yes Evaluation Count:2859572 |
| 90746-2859572 |
5566 | dest[i] = c; executed (the execution status of this line is deduced): dest[i] = c; | - |
5567 | } else { executed: } Execution Count:90746 | 90746 |
5568 | int ialpha = 255 - coverage; executed (the execution status of this line is deduced): int ialpha = 255 - coverage; | - |
5569 | dest[i] = BYTE_MUL_RGB16(c, coverage) executed (the execution status of this line is deduced): dest[i] = BYTE_MUL_RGB16(c, coverage) | - |
5570 | + BYTE_MUL_RGB16(dest[i], ialpha); executed (the execution status of this line is deduced): + BYTE_MUL_RGB16(dest[i], ialpha); | - |
5571 | } executed: } Execution Count:2859572 | 2859572 |
5572 | } | - |
5573 | dest += destStride; executed (the execution status of this line is deduced): dest += destStride; | - |
5574 | map += mapStride; executed (the execution status of this line is deduced): map += mapStride; | - |
5575 | } executed: } Execution Count:749393 | 749393 |
5576 | } executed: } Execution Count:78570 | 78570 |
5577 | | - |
5578 | static inline void rgbBlendPixel(quint32 *dst, int coverage, int sr, int sg, int sb, const uchar *gamma, const uchar *invgamma) | - |
5579 | { | - |
5580 | // Do a gray alphablend... | - |
5581 | int da = qAlpha(*dst); never executed (the execution status of this line is deduced): int da = qAlpha(*dst); | - |
5582 | int dr = qRed(*dst); never executed (the execution status of this line is deduced): int dr = qRed(*dst); | - |
5583 | int dg = qGreen(*dst); never executed (the execution status of this line is deduced): int dg = qGreen(*dst); | - |
5584 | int db = qBlue(*dst); never executed (the execution status of this line is deduced): int db = qBlue(*dst); | - |
5585 | | - |
5586 | if (da != 255 never evaluated: da != 255 | 0 |
5587 | ) { | - |
5588 | | - |
5589 | int a = qGray(coverage); never executed (the execution status of this line is deduced): int a = qGray(coverage); | - |
5590 | sr = qt_div_255(invgamma[sr] * a); never executed (the execution status of this line is deduced): sr = qt_div_255(invgamma[sr] * a); | - |
5591 | sg = qt_div_255(invgamma[sg] * a); never executed (the execution status of this line is deduced): sg = qt_div_255(invgamma[sg] * a); | - |
5592 | sb = qt_div_255(invgamma[sb] * a); never executed (the execution status of this line is deduced): sb = qt_div_255(invgamma[sb] * a); | - |
5593 | | - |
5594 | int ia = 255 - a; never executed (the execution status of this line is deduced): int ia = 255 - a; | - |
5595 | dr = qt_div_255(dr * ia); never executed (the execution status of this line is deduced): dr = qt_div_255(dr * ia); | - |
5596 | dg = qt_div_255(dg * ia); never executed (the execution status of this line is deduced): dg = qt_div_255(dg * ia); | - |
5597 | db = qt_div_255(db * ia); never executed (the execution status of this line is deduced): db = qt_div_255(db * ia); | - |
5598 | | - |
5599 | *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) | - |
5600 | | ((sr + dr) << 16) never executed (the execution status of this line is deduced): | ((sr + dr) << 16) | - |
5601 | | ((sg + dg) << 8) never executed (the execution status of this line is deduced): | ((sg + dg) << 8) | - |
5602 | | ((sb + db)); never executed (the execution status of this line is deduced): | ((sb + db)); | - |
5603 | return; | 0 |
5604 | } | - |
5605 | | - |
5606 | int mr = qRed(coverage); never executed (the execution status of this line is deduced): int mr = qRed(coverage); | - |
5607 | int mg = qGreen(coverage); never executed (the execution status of this line is deduced): int mg = qGreen(coverage); | - |
5608 | int mb = qBlue(coverage); never executed (the execution status of this line is deduced): int mb = qBlue(coverage); | - |
5609 | | - |
5610 | dr = gamma[dr]; never executed (the execution status of this line is deduced): dr = gamma[dr]; | - |
5611 | dg = gamma[dg]; never executed (the execution status of this line is deduced): dg = gamma[dg]; | - |
5612 | db = gamma[db]; never executed (the execution status of this line is deduced): db = gamma[db]; | - |
5613 | | - |
5614 | 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; | - |
5615 | 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; | - |
5616 | 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; | - |
5617 | | - |
5618 | nr = invgamma[nr]; never executed (the execution status of this line is deduced): nr = invgamma[nr]; | - |
5619 | ng = invgamma[ng]; never executed (the execution status of this line is deduced): ng = invgamma[ng]; | - |
5620 | nb = invgamma[nb]; never executed (the execution status of this line is deduced): nb = invgamma[nb]; | - |
5621 | | - |
5622 | *dst = qRgb(nr, ng, nb); never executed (the execution status of this line is deduced): *dst = qRgb(nr, ng, nb); | - |
5623 | } | 0 |
5624 | | - |
5625 | #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) | - |
5626 | static inline void grayBlendPixel(quint32 *dst, int coverage, int sr, int sg, int sb, const uint *gamma, const uchar *invgamma) | - |
5627 | { | - |
5628 | // Do a gammacorrected gray alphablend... | - |
5629 | int dr = qRed(*dst); | - |
5630 | int dg = qGreen(*dst); | - |
5631 | int db = qBlue(*dst); | - |
5632 | | - |
5633 | dr = gamma[dr]; | - |
5634 | dg = gamma[dg]; | - |
5635 | db = gamma[db]; | - |
5636 | | - |
5637 | int alpha = coverage; | - |
5638 | int ialpha = 255 - alpha; | - |
5639 | int nr = (sr * alpha + ialpha * dr) / 255; | - |
5640 | int ng = (sg * alpha + ialpha * dg) / 255; | - |
5641 | int nb = (sb * alpha + ialpha * db) / 255; | - |
5642 | | - |
5643 | nr = invgamma[nr]; | - |
5644 | ng = invgamma[ng]; | - |
5645 | nb = invgamma[nb]; | - |
5646 | | - |
5647 | *dst = qRgb(nr, ng, nb); | - |
5648 | } | - |
5649 | #endif | - |
5650 | | - |
5651 | static void qt_alphamapblit_quint32(QRasterBuffer *rasterBuffer, | - |
5652 | int x, int y, quint32 color, | - |
5653 | const uchar *map, | - |
5654 | int mapWidth, int mapHeight, int mapStride, | - |
5655 | const QClipData *clip) | - |
5656 | { | - |
5657 | const quint32 c = color; executed (the execution status of this line is deduced): const quint32 c = color; | - |
5658 | const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); executed (the execution status of this line is deduced): const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); | - |
5659 | | - |
5660 | #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) | - |
5661 | const QDrawHelperGammaTables *tables = QGuiApplicationPrivate::instance()->gammaTables(); | - |
5662 | if (!tables) | - |
5663 | return; | - |
5664 | | - |
5665 | const uint *gamma = tables->qt_pow_gamma; | - |
5666 | const uchar *invgamma = tables->qt_pow_invgamma; | - |
5667 | | - |
5668 | int sr = gamma[qRed(color)]; | - |
5669 | int sg = gamma[qGreen(color)]; | - |
5670 | int sb = gamma[qBlue(color)]; | - |
5671 | | - |
5672 | bool opaque_src = (qAlpha(color) == 255); | - |
5673 | #endif | - |
5674 | | - |
5675 | if (!clip) { evaluated: !clip yes Evaluation Count:6843 | yes Evaluation Count:513 |
| 513-6843 |
5676 | 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; | - |
5677 | while (mapHeight--) { evaluated: mapHeight-- yes Evaluation Count:56452 | yes Evaluation Count:6843 |
| 6843-56452 |
5678 | for (int i = 0; i < mapWidth; ++i) { evaluated: i < mapWidth yes Evaluation Count:277335 | yes Evaluation Count:56452 |
| 56452-277335 |
5679 | const int coverage = map[i]; executed (the execution status of this line is deduced): const int coverage = map[i]; | - |
5680 | | - |
5681 | if (coverage == 0) { evaluated: coverage == 0 yes Evaluation Count:91959 | yes Evaluation Count:185376 |
| 91959-185376 |
5682 | // nothing | - |
5683 | } else if (coverage == 255) { executed: } Execution Count:91959 evaluated: coverage == 255 yes Evaluation Count:17448 | yes Evaluation Count:167928 |
| 17448-167928 |
5684 | dest[i] = c; executed (the execution status of this line is deduced): dest[i] = c; | - |
5685 | } else { executed: } Execution Count:17448 | 17448 |
5686 | #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) | - |
5687 | if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && opaque_src | - |
5688 | && qAlpha(dest[i]) == 255) { | - |
5689 | grayBlendPixel(dest+i, coverage, sr, sg, sb, gamma, invgamma); | - |
5690 | } else | - |
5691 | #endif | - |
5692 | { | - |
5693 | int ialpha = 255 - coverage; executed (the execution status of this line is deduced): int ialpha = 255 - coverage; | - |
5694 | 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); | - |
5695 | } | - |
5696 | } executed: } Execution Count:167928 | 167928 |
5697 | } | - |
5698 | dest += destStride; executed (the execution status of this line is deduced): dest += destStride; | - |
5699 | map += mapStride; executed (the execution status of this line is deduced): map += mapStride; | - |
5700 | } executed: } Execution Count:56452 | 56452 |
5701 | } else { executed: } Execution Count:6843 | 6843 |
5702 | int bottom = qMin(y + mapHeight, rasterBuffer->height()); executed (the execution status of this line is deduced): int bottom = qMin(y + mapHeight, rasterBuffer->height()); | - |
5703 | | - |
5704 | int top = qMax(y, 0); executed (the execution status of this line is deduced): int top = qMax(y, 0); | - |
5705 | map += (top - y) * mapStride; executed (the execution status of this line is deduced): map += (top - y) * mapStride; | - |
5706 | | - |
5707 | const_cast<QClipData *>(clip)->initialize(); executed (the execution status of this line is deduced): const_cast<QClipData *>(clip)->initialize(); | - |
5708 | for (int yp = top; yp<bottom; ++yp) { evaluated: yp<bottom yes Evaluation Count:4872 | yes Evaluation Count:513 |
| 513-4872 |
5709 | 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]; | - |
5710 | | - |
5711 | 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)); | - |
5712 | | - |
5713 | for (int i=0; i<line.count; ++i) { evaluated: i<line.count yes Evaluation Count:4872 | yes Evaluation Count:4872 |
| 4872 |
5714 | const QSpan &clip = line.spans[i]; executed (the execution status of this line is deduced): const QSpan &clip = line.spans[i]; | - |
5715 | | - |
5716 | int start = qMax<int>(x, clip.x); executed (the execution status of this line is deduced): int start = qMax<int>(x, clip.x); | - |
5717 | 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); | - |
5718 | | - |
5719 | for (int xp=start; xp<end; ++xp) { evaluated: xp<end yes Evaluation Count:18364 | yes Evaluation Count:4872 |
| 4872-18364 |
5720 | const int coverage = map[xp - x]; executed (the execution status of this line is deduced): const int coverage = map[xp - x]; | - |
5721 | | - |
5722 | if (coverage == 0) { evaluated: coverage == 0 yes Evaluation Count:7288 | yes Evaluation Count:11076 |
| 7288-11076 |
5723 | // nothing | - |
5724 | } else if (coverage == 255) { executed: } Execution Count:7288 evaluated: coverage == 255 yes Evaluation Count:1190 | yes Evaluation Count:9886 |
| 1190-9886 |
5725 | dest[xp] = c; executed (the execution status of this line is deduced): dest[xp] = c; | - |
5726 | } else { executed: } Execution Count:1190 | 1190 |
5727 | #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) | - |
5728 | if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && opaque_src | - |
5729 | && qAlpha(dest[xp]) == 255) { | - |
5730 | grayBlendPixel(dest+xp, coverage, sr, sg, sb, gamma, invgamma); | - |
5731 | } else | - |
5732 | #endif | - |
5733 | { | - |
5734 | int ialpha = 255 - coverage; executed (the execution status of this line is deduced): int ialpha = 255 - coverage; | - |
5735 | 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); | - |
5736 | } | - |
5737 | } executed: } Execution Count:9886 | 9886 |
5738 | | - |
5739 | } // for (i -> line.count) | - |
5740 | } // for (yp -> bottom) executed: } Execution Count:4872 | 4872 |
5741 | map += mapStride; executed (the execution status of this line is deduced): map += mapStride; | - |
5742 | } executed: } Execution Count:4872 | 4872 |
5743 | } executed: } Execution Count:513 | 513 |
5744 | } | - |
5745 | | - |
5746 | static void qt_alphargbblit_quint32(QRasterBuffer *rasterBuffer, | - |
5747 | int x, int y, quint32 color, | - |
5748 | const uint *src, int mapWidth, int mapHeight, int srcStride, | - |
5749 | const QClipData *clip) | - |
5750 | { | - |
5751 | const quint32 c = color; never executed (the execution status of this line is deduced): const quint32 c = color; | - |
5752 | | - |
5753 | int sr = qRed(color); never executed (the execution status of this line is deduced): int sr = qRed(color); | - |
5754 | int sg = qGreen(color); never executed (the execution status of this line is deduced): int sg = qGreen(color); | - |
5755 | int sb = qBlue(color); never executed (the execution status of this line is deduced): int sb = qBlue(color); | - |
5756 | int sa = qAlpha(color); never executed (the execution status of this line is deduced): int sa = qAlpha(color); | - |
5757 | | - |
5758 | const QDrawHelperGammaTables *tables = QGuiApplicationPrivate::instance()->gammaTables(); never executed (the execution status of this line is deduced): const QDrawHelperGammaTables *tables = QGuiApplicationPrivate::instance()->gammaTables(); | - |
5759 | if (!tables) | 0 |
5760 | return; | 0 |
5761 | | - |
5762 | 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; | - |
5763 | 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; | - |
5764 | | - |
5765 | sr = gamma[sr]; never executed (the execution status of this line is deduced): sr = gamma[sr]; | - |
5766 | sg = gamma[sg]; never executed (the execution status of this line is deduced): sg = gamma[sg]; | - |
5767 | sb = gamma[sb]; never executed (the execution status of this line is deduced): sb = gamma[sb]; | - |
5768 | | - |
5769 | if (sa == 0) | 0 |
5770 | return; | 0 |
5771 | | - |
5772 | if (!clip) { | 0 |
5773 | 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; | - |
5774 | const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); never executed (the execution status of this line is deduced): const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); | - |
5775 | while (mapHeight--) { never evaluated: mapHeight-- | 0 |
5776 | for (int i = 0; i < mapWidth; ++i) { never evaluated: i < mapWidth | 0 |
5777 | const uint coverage = src[i]; never executed (the execution status of this line is deduced): const uint coverage = src[i]; | - |
5778 | if (coverage == 0xffffffff) { never evaluated: coverage == 0xffffffff | 0 |
5779 | dst[i] = c; never executed (the execution status of this line is deduced): dst[i] = c; | - |
5780 | } else if (coverage != 0xff000000) { never executed: } never evaluated: coverage != 0xff000000 | 0 |
5781 | 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); | - |
5782 | } | 0 |
5783 | } | - |
5784 | | - |
5785 | dst += destStride; never executed (the execution status of this line is deduced): dst += destStride; | - |
5786 | src += srcStride; never executed (the execution status of this line is deduced): src += srcStride; | - |
5787 | } | 0 |
5788 | } else { | 0 |
5789 | int bottom = qMin(y + mapHeight, rasterBuffer->height()); never executed (the execution status of this line is deduced): int bottom = qMin(y + mapHeight, rasterBuffer->height()); | - |
5790 | | - |
5791 | int top = qMax(y, 0); never executed (the execution status of this line is deduced): int top = qMax(y, 0); | - |
5792 | src += (top - y) * srcStride; never executed (the execution status of this line is deduced): src += (top - y) * srcStride; | - |
5793 | | - |
5794 | const_cast<QClipData *>(clip)->initialize(); never executed (the execution status of this line is deduced): const_cast<QClipData *>(clip)->initialize(); | - |
5795 | for (int yp = top; yp<bottom; ++yp) { never evaluated: yp<bottom | 0 |
5796 | 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]; | - |
5797 | | - |
5798 | 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)); | - |
5799 | | - |
5800 | for (int i=0; i<line.count; ++i) { never evaluated: i<line.count | 0 |
5801 | const QSpan &clip = line.spans[i]; never executed (the execution status of this line is deduced): const QSpan &clip = line.spans[i]; | - |
5802 | | - |
5803 | int start = qMax<int>(x, clip.x); never executed (the execution status of this line is deduced): int start = qMax<int>(x, clip.x); | - |
5804 | 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); | - |
5805 | | - |
5806 | for (int xp=start; xp<end; ++xp) { | 0 |
5807 | const uint coverage = src[xp - x]; never executed (the execution status of this line is deduced): const uint coverage = src[xp - x]; | - |
5808 | if (coverage == 0xffffffff) { never evaluated: coverage == 0xffffffff | 0 |
5809 | dst[xp] = c; never executed (the execution status of this line is deduced): dst[xp] = c; | - |
5810 | } else if (coverage != 0xff000000) { never executed: } never evaluated: coverage != 0xff000000 | 0 |
5811 | 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); | - |
5812 | } | 0 |
5813 | } | - |
5814 | } // for (i -> line.count) | 0 |
5815 | src += srcStride; never executed (the execution status of this line is deduced): src += srcStride; | - |
5816 | } // for (yp -> bottom) | 0 |
5817 | | - |
5818 | } | 0 |
5819 | } | - |
5820 | | - |
5821 | static void qt_rectfill_quint32(QRasterBuffer *rasterBuffer, | - |
5822 | int x, int y, int width, int height, | - |
5823 | quint32 color) | - |
5824 | { | - |
5825 | 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()), | - |
5826 | color, x, y, width, height, rasterBuffer->bytesPerLine()); executed (the execution status of this line is deduced): color, x, y, width, height, rasterBuffer->bytesPerLine()); | - |
5827 | } executed: } Execution Count:981 | 981 |
5828 | | - |
5829 | static void qt_rectfill_quint16(QRasterBuffer *rasterBuffer, | - |
5830 | int x, int y, int width, int height, | - |
5831 | quint32 color) | - |
5832 | { | - |
5833 | 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()), | - |
5834 | 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()); | - |
5835 | } executed: } Execution Count:18329 | 18329 |
5836 | | - |
5837 | static void qt_rectfill_nonpremul_quint32(QRasterBuffer *rasterBuffer, | - |
5838 | int x, int y, int width, int height, | - |
5839 | quint32 color) | - |
5840 | { | - |
5841 | 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()), | - |
5842 | 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()); | - |
5843 | } executed: } Execution Count:189 | 189 |
5844 | | - |
5845 | | - |
5846 | // Map table for destination image format. Contains function pointers | - |
5847 | // for blends of various types unto the destination | - |
5848 | | - |
5849 | DrawHelper qDrawHelper[QImage::NImageFormats] = | - |
5850 | { | - |
5851 | // Format_Invalid, | - |
5852 | { 0, 0, 0, 0, 0, 0 }, | - |
5853 | // Format_Mono, | - |
5854 | { | - |
5855 | blend_color_generic, | - |
5856 | blend_src_generic, | - |
5857 | 0, 0, 0, 0 | - |
5858 | }, | - |
5859 | // Format_MonoLSB, | - |
5860 | { | - |
5861 | blend_color_generic, | - |
5862 | blend_src_generic, | - |
5863 | 0, 0, 0, 0 | - |
5864 | }, | - |
5865 | // Format_Indexed8, | - |
5866 | { | - |
5867 | blend_color_generic, | - |
5868 | blend_src_generic, | - |
5869 | 0, 0, 0, 0 | - |
5870 | }, | - |
5871 | // Format_RGB32, | - |
5872 | { | - |
5873 | blend_color_argb, | - |
5874 | qt_gradient_quint32, | - |
5875 | qt_bitmapblit_quint32, | - |
5876 | qt_alphamapblit_quint32, | - |
5877 | qt_alphargbblit_quint32, | - |
5878 | qt_rectfill_quint32 | - |
5879 | }, | - |
5880 | // Format_ARGB32, | - |
5881 | { | - |
5882 | blend_color_generic, | - |
5883 | qt_gradient_quint32, | - |
5884 | qt_bitmapblit_quint32, | - |
5885 | qt_alphamapblit_quint32, | - |
5886 | qt_alphargbblit_quint32, | - |
5887 | qt_rectfill_nonpremul_quint32 | - |
5888 | }, | - |
5889 | // Format_ARGB32_Premultiplied | - |
5890 | { | - |
5891 | blend_color_argb, | - |
5892 | qt_gradient_quint32, | - |
5893 | qt_bitmapblit_quint32, | - |
5894 | qt_alphamapblit_quint32, | - |
5895 | qt_alphargbblit_quint32, | - |
5896 | qt_rectfill_quint32 | - |
5897 | }, | - |
5898 | // Format_RGB16 | - |
5899 | { | - |
5900 | blend_color_rgb16, | - |
5901 | qt_gradient_quint16, | - |
5902 | qt_bitmapblit_quint16, | - |
5903 | qt_alphamapblit_quint16, | - |
5904 | 0, | - |
5905 | qt_rectfill_quint16 | - |
5906 | }, | - |
5907 | // Format_ARGB8565_Premultiplied | - |
5908 | { | - |
5909 | blend_color_generic, | - |
5910 | blend_src_generic, | - |
5911 | 0, 0, 0, 0 | - |
5912 | }, | - |
5913 | // Format_RGB666 | - |
5914 | { | - |
5915 | blend_color_generic, | - |
5916 | blend_src_generic, | - |
5917 | 0, 0, 0, 0 | - |
5918 | }, | - |
5919 | // Format_ARGB6666_Premultiplied | - |
5920 | { | - |
5921 | blend_color_generic, | - |
5922 | blend_src_generic, | - |
5923 | 0, 0, 0, 0 | - |
5924 | }, | - |
5925 | // Format_RGB555 | - |
5926 | { | - |
5927 | blend_color_generic, | - |
5928 | blend_src_generic, | - |
5929 | 0, 0, 0, 0 | - |
5930 | }, | - |
5931 | // Format_ARGB8555_Premultiplied | - |
5932 | { | - |
5933 | blend_color_generic, | - |
5934 | blend_src_generic, | - |
5935 | 0, 0, 0, 0 | - |
5936 | }, | - |
5937 | // Format_RGB888 | - |
5938 | { | - |
5939 | blend_color_generic, | - |
5940 | blend_src_generic, | - |
5941 | 0, 0, 0, 0 | - |
5942 | }, | - |
5943 | // Format_RGB444 | - |
5944 | { | - |
5945 | blend_color_generic, | - |
5946 | blend_src_generic, | - |
5947 | 0, 0, 0, 0 | - |
5948 | }, | - |
5949 | // Format_ARGB4444_Premultiplied | - |
5950 | { | - |
5951 | blend_color_generic, | - |
5952 | blend_src_generic, | - |
5953 | 0, 0, 0, 0 | - |
5954 | } | - |
5955 | }; | - |
5956 | | - |
5957 | #if defined(Q_CC_MSVC) && !defined(_MIPS_) | - |
5958 | template <class T> | - |
5959 | inline void qt_memfill_template(T *dest, T color, int count) | - |
5960 | { | - |
5961 | while (count--) | - |
5962 | *dest++ = color; | - |
5963 | } | - |
5964 | | - |
5965 | #else | - |
5966 | | - |
5967 | template <class T> | - |
5968 | inline void qt_memfill_template(T *dest, T color, int count) | - |
5969 | { | - |
5970 | int n = (count + 7) / 8; never executed (the execution status of this line is deduced): int n = (count + 7) / 8; | - |
5971 | switch (count & 0x07) | - |
5972 | { | - |
5973 | case 0: do { *dest++ = color; never executed (the execution status of this line is deduced): case 0: do { *dest++ = color; | - |
5974 | case 7: *dest++ = color; code before this statement never executed: case 7: | 0 |
5975 | case 6: *dest++ = color; code before this statement never executed: case 6: | 0 |
5976 | case 5: *dest++ = color; code before this statement never executed: case 5: | 0 |
5977 | case 4: *dest++ = color; code before this statement never executed: case 4: | 0 |
5978 | case 3: *dest++ = color; code before this statement never executed: case 3: | 0 |
5979 | case 2: *dest++ = color; code before this statement never executed: case 2: | 0 |
5980 | case 1: *dest++ = color; code before this statement never executed: case 1: | 0 |
5981 | } while (--n > 0); never executed: } never evaluated: --n > 0 | 0 |
5982 | } | 0 |
5983 | } | 0 |
5984 | | - |
5985 | template <> | - |
5986 | inline void qt_memfill_template(quint16 *dest, quint16 value, int count) | - |
5987 | { | - |
5988 | if (count < 3) { never evaluated: count < 3 | 0 |
5989 | switch (count) { | - |
5990 | case 2: *dest++ = value; never executed (the execution status of this line is deduced): case 2: *dest++ = value; | - |
5991 | case 1: *dest = value; code before this statement never executed: case 1: | 0 |
5992 | } | 0 |
5993 | return; | 0 |
5994 | } | - |
5995 | | - |
5996 | const int align = (quintptr)(dest) & 0x3; never executed (the execution status of this line is deduced): const int align = (quintptr)(dest) & 0x3; | - |
5997 | switch (align) { | - |
5998 | case 2: *dest++ = value; --count; never executed (the execution status of this line is deduced): case 2: *dest++ = value; --count; | - |
5999 | } | 0 |
6000 | | - |
6001 | const quint32 value32 = (value << 16) | value; never executed (the execution status of this line is deduced): const quint32 value32 = (value << 16) | value; | - |
6002 | 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); | - |
6003 | if (count & 0x1) never evaluated: count & 0x1 | 0 |
6004 | dest[count - 1] = value; never executed: dest[count - 1] = value; | 0 |
6005 | } | 0 |
6006 | #endif | - |
6007 | | - |
6008 | static void qt_memfill_quint16(quint16 *dest, quint16 color, int count) | - |
6009 | { | - |
6010 | qt_memfill_template<quint16>(dest, color, count); never executed (the execution status of this line is deduced): qt_memfill_template<quint16>(dest, color, count); | - |
6011 | } | 0 |
6012 | | - |
6013 | typedef void (*qt_memfill32_func)(quint32 *dest, quint32 value, int count); | - |
6014 | typedef void (*qt_memfill16_func)(quint16 *dest, quint16 value, int count); | - |
6015 | static void qt_memfill32_setup(quint32 *dest, quint32 value, int count); | - |
6016 | static void qt_memfill16_setup(quint16 *dest, quint16 value, int count); | - |
6017 | | - |
6018 | qt_memfill32_func qt_memfill32 = qt_memfill32_setup; | - |
6019 | qt_memfill16_func qt_memfill16 = qt_memfill16_setup; | - |
6020 | | - |
6021 | void qInitDrawhelperAsm() | - |
6022 | { | - |
6023 | | - |
6024 | qt_memfill32 = qt_memfill_template<quint32>; executed (the execution status of this line is deduced): qt_memfill32 = qt_memfill_template<quint32>; | - |
6025 | qt_memfill16 = qt_memfill_quint16; //qt_memfill_template<quint16>; executed (the execution status of this line is deduced): qt_memfill16 = qt_memfill_quint16; | - |
6026 | | - |
6027 | CompositionFunction *functionForModeAsm = 0; executed (the execution status of this line is deduced): CompositionFunction *functionForModeAsm = 0; | - |
6028 | CompositionFunctionSolid *functionForModeSolidAsm = 0; executed (the execution status of this line is deduced): CompositionFunctionSolid *functionForModeSolidAsm = 0; | - |
6029 | | - |
6030 | const uint features = qCpuFeatures(); executed (the execution status of this line is deduced): const uint features = qCpuFeatures(); | - |
6031 | if (false) { partially evaluated: false no Evaluation Count:0 | yes Evaluation Count:276 |
| 0-276 |
6032 | #ifdef QT_COMPILER_SUPPORTS_AVX | - |
6033 | } else if (features & AVX) { never executed: } partially evaluated: features & AVX no Evaluation Count:0 | yes Evaluation Count:276 |
| 0-276 |
6034 | qt_memfill32 = qt_memfill32_avx; never executed (the execution status of this line is deduced): qt_memfill32 = qt_memfill32_avx; | - |
6035 | qt_memfill16 = qt_memfill16_avx; never executed (the execution status of this line is deduced): qt_memfill16 = qt_memfill16_avx; | - |
6036 | 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; | - |
6037 | 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; | - |
6038 | 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; | - |
6039 | 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; | - |
6040 | | - |
6041 | 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, | - |
6042 | const uchar *srcPixels, int sbpl, never executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6043 | const QRectF &targetRect, never executed (the execution status of this line is deduced): const QRectF &targetRect, | - |
6044 | const QRectF &sourceRect, never executed (the execution status of this line is deduced): const QRectF &sourceRect, | - |
6045 | const QRect &clip, never executed (the execution status of this line is deduced): const QRect &clip, | - |
6046 | int const_alpha); never executed (the execution status of this line is deduced): int const_alpha); | - |
6047 | 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; | - |
6048 | 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; | - |
6049 | #endif | - |
6050 | #ifdef QT_COMPILER_SUPPORTS_SSE2 | - |
6051 | } else if (features & SSE2) { never executed: } partially evaluated: features & SSE2 yes Evaluation Count:276 | no Evaluation Count:0 |
| 0-276 |
6052 | qt_memfill32 = qt_memfill32_sse2; executed (the execution status of this line is deduced): qt_memfill32 = qt_memfill32_sse2; | - |
6053 | qt_memfill16 = qt_memfill16_sse2; executed (the execution status of this line is deduced): qt_memfill16 = qt_memfill16_sse2; | - |
6054 | 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; | - |
6055 | 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; | - |
6056 | 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; | - |
6057 | 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; | - |
6058 | | - |
6059 | 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, | - |
6060 | const uchar *srcPixels, int sbpl, executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6061 | const QRectF &targetRect, executed (the execution status of this line is deduced): const QRectF &targetRect, | - |
6062 | const QRectF &sourceRect, executed (the execution status of this line is deduced): const QRectF &sourceRect, | - |
6063 | const QRect &clip, executed (the execution status of this line is deduced): const QRect &clip, | - |
6064 | int const_alpha); executed (the execution status of this line is deduced): int const_alpha); | - |
6065 | 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; | - |
6066 | 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; | - |
6067 | #endif | - |
6068 | } executed: } Execution Count:276 | 276 |
6069 | | - |
6070 | #ifdef QT_COMPILER_SUPPORTS_SSE2 | - |
6071 | if (features & SSE2) { partially evaluated: features & SSE2 yes Evaluation Count:276 | no Evaluation Count:0 |
| 0-276 |
6072 | 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, | - |
6073 | const uchar *srcPixels, int sbpl, executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6074 | int w, int h, executed (the execution status of this line is deduced): int w, int h, | - |
6075 | int const_alpha); executed (the execution status of this line is deduced): int const_alpha); | - |
6076 | 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, | - |
6077 | const uchar *srcPixels, int sbpl, executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6078 | int w, int h, executed (the execution status of this line is deduced): int w, int h, | - |
6079 | int const_alpha); executed (the execution status of this line is deduced): int const_alpha); | - |
6080 | | - |
6081 | 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; | - |
6082 | 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; | - |
6083 | 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; | - |
6084 | 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; | - |
6085 | | - |
6086 | 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, | - |
6087 | int y, int x, int length); executed (the execution status of this line is deduced): int y, int x, int length); | - |
6088 | | - |
6089 | 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; | - |
6090 | } executed: } Execution Count:276 | 276 |
6091 | | - |
6092 | #ifdef QT_COMPILER_SUPPORTS_SSSE3 | - |
6093 | if (features & SSSE3) { partially evaluated: features & SSSE3 yes Evaluation Count:276 | no Evaluation Count:0 |
| 0-276 |
6094 | 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, | - |
6095 | const uchar *srcPixels, int sbpl, executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6096 | int w, int h, executed (the execution status of this line is deduced): int w, int h, | - |
6097 | int const_alpha); executed (the execution status of this line is deduced): int const_alpha); | - |
6098 | | - |
6099 | 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; | - |
6100 | 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; | - |
6101 | } executed: } Execution Count:276 | 276 |
6102 | #endif // SSSE3 | - |
6103 | | - |
6104 | #ifdef QT_COMPILER_SUPPORTS_AVX | - |
6105 | if (features & AVX) { partially evaluated: features & AVX no Evaluation Count:0 | yes Evaluation Count:276 |
| 0-276 |
6106 | 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, | - |
6107 | const uchar *srcPixels, int sbpl, never executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6108 | int w, int h, never executed (the execution status of this line is deduced): int w, int h, | - |
6109 | int const_alpha); never executed (the execution status of this line is deduced): int const_alpha); | - |
6110 | 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, | - |
6111 | const uchar *srcPixels, int sbpl, never executed (the execution status of this line is deduced): const uchar *srcPixels, int sbpl, | - |
6112 | int w, int h, never executed (the execution status of this line is deduced): int w, int h, | - |
6113 | int const_alpha); never executed (the execution status of this line is deduced): int const_alpha); | - |
6114 | | - |
6115 | 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; | - |
6116 | 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; | - |
6117 | 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; | - |
6118 | 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; | - |
6119 | | - |
6120 | 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, | - |
6121 | int y, int x, int length); never executed (the execution status of this line is deduced): int y, int x, int length); | - |
6122 | | - |
6123 | 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; | - |
6124 | } | 0 |
6125 | #endif // AVX | - |
6126 | | - |
6127 | #endif // SSE2 | - |
6128 | | - |
6129 | #ifdef QT_COMPILER_SUPPORTS_SSE2 | - |
6130 | if (features & SSE2) { partially evaluated: features & SSE2 yes Evaluation Count:276 | no Evaluation Count:0 |
| 0-276 |
6131 | functionForModeAsm = qt_functionForMode_SSE2; executed (the execution status of this line is deduced): functionForModeAsm = qt_functionForMode_SSE2; | - |
6132 | functionForModeSolidAsm = qt_functionForModeSolid_SSE2; executed (the execution status of this line is deduced): functionForModeSolidAsm = qt_functionForModeSolid_SSE2; | - |
6133 | } executed: } Execution Count:276 | 276 |
6134 | #endif | - |
6135 | #ifdef QT_COMPILER_SUPPORTS_AVX | - |
6136 | if (features & AVX) { partially evaluated: features & AVX no Evaluation Count:0 | yes Evaluation Count:276 |
| 0-276 |
6137 | 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, | - |
6138 | const uint *srcPixels, never executed (the execution status of this line is deduced): const uint *srcPixels, | - |
6139 | int length, never executed (the execution status of this line is deduced): int length, | - |
6140 | uint const_alpha); never executed (the execution status of this line is deduced): uint const_alpha); | - |
6141 | 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); | - |
6142 | 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); | - |
6143 | 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); | - |
6144 | | - |
6145 | functionForModeAsm[0] = comp_func_SourceOver_avx; never executed (the execution status of this line is deduced): functionForModeAsm[0] = comp_func_SourceOver_avx; | - |
6146 | 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; | - |
6147 | 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; | - |
6148 | functionForModeSolidAsm[0] = comp_func_solid_SourceOver_avx; never executed (the execution status of this line is deduced): functionForModeSolidAsm[0] = comp_func_solid_SourceOver_avx; | - |
6149 | } | 0 |
6150 | #endif // SSE2 | - |
6151 | | - |
6152 | #ifdef QT_COMPILER_SUPPORTS_IWMMXT | - |
6153 | if (features & IWMMXT) { | - |
6154 | functionForModeAsm = qt_functionForMode_IWMMXT; | - |
6155 | functionForModeSolidAsm = qt_functionForModeSolid_IWMMXT; | - |
6156 | qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_iwmmxt; | - |
6157 | } | - |
6158 | #endif // IWMMXT | - |
6159 | | - |
6160 | #if defined(QT_COMPILER_SUPPORTS_NEON) | - |
6161 | if (features & NEON) { | - |
6162 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; | - |
6163 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; | - |
6164 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; | - |
6165 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; | - |
6166 | qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon; | - |
6167 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon; | - |
6168 | qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon; | - |
6169 | | - |
6170 | qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon; | - |
6171 | qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon; | - |
6172 | | - |
6173 | qTransformFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_rgb16_neon; | - |
6174 | qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon; | - |
6175 | | - |
6176 | qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon; | - |
6177 | | - |
6178 | functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon; | - |
6179 | functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon; | - |
6180 | functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon; | - |
6181 | destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon; | - |
6182 | destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon; | - |
6183 | | - |
6184 | qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon; | - |
6185 | qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon; | - |
6186 | qt_memfill32 = qt_memfill32_neon; | - |
6187 | | - |
6188 | extern const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer, const Operator *op, const QSpanData *data, | - |
6189 | int y, int x, int length); | - |
6190 | | - |
6191 | qt_fetch_radial_gradient = qt_fetch_radial_gradient_neon; | - |
6192 | } | - |
6193 | #endif | - |
6194 | | - |
6195 | #if defined(QT_COMPILER_SUPPORTS_MIPS_DSP) | - |
6196 | functionForMode_C[QPainter::CompositionMode_SourceOver] = comp_func_SourceOver_asm_mips_dsp; | - |
6197 | functionForMode_C[QPainter::CompositionMode_Source] = comp_func_Source_mips_dsp; | - |
6198 | functionForMode_C[QPainter::CompositionMode_DestinationOver] = comp_func_DestinationOver_mips_dsp; | - |
6199 | functionForMode_C[QPainter::CompositionMode_SourceIn] = comp_func_SourceIn_mips_dsp; | - |
6200 | functionForMode_C[QPainter::CompositionMode_DestinationIn] = comp_func_DestinationIn_mips_dsp; | - |
6201 | functionForMode_C[QPainter::CompositionMode_DestinationOut] = comp_func_DestinationOut_mips_dsp; | - |
6202 | functionForMode_C[QPainter::CompositionMode_SourceAtop] = comp_func_SourceAtop_mips_dsp; | - |
6203 | functionForMode_C[QPainter::CompositionMode_DestinationAtop] = comp_func_DestinationAtop_mips_dsp; | - |
6204 | functionForMode_C[QPainter::CompositionMode_Xor] = comp_func_XOR_mips_dsp; | - |
6205 | functionForMode_C[QPainter::CompositionMode_SourceOut] = comp_func_SourceOut_mips_dsp; | - |
6206 | | - |
6207 | functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_mips_dsp; | - |
6208 | functionForModeSolid_C[QPainter::CompositionMode_DestinationOver] = comp_func_solid_DestinationOver_mips_dsp; | - |
6209 | functionForModeSolid_C[QPainter::CompositionMode_SourceIn] = comp_func_solid_SourceIn_mips_dsp; | - |
6210 | functionForModeSolid_C[QPainter::CompositionMode_DestinationIn] = comp_func_solid_DestinationIn_mips_dsp; | - |
6211 | functionForModeSolid_C[QPainter::CompositionMode_SourceAtop] = comp_func_solid_SourceAtop_mips_dsp; | - |
6212 | functionForModeSolid_C[QPainter::CompositionMode_DestinationAtop] = comp_func_solid_DestinationAtop_mips_dsp; | - |
6213 | functionForModeSolid_C[QPainter::CompositionMode_Xor] = comp_func_solid_XOR_mips_dsp; | - |
6214 | functionForModeSolid_C[QPainter::CompositionMode_SourceOut] = comp_func_solid_SourceOut_mips_dsp; | - |
6215 | | - |
6216 | qt_memfill32 = qt_memfill32_asm_mips_dsp; | - |
6217 | | - |
6218 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mips_dsp; | - |
6219 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_mips_dsp; | - |
6220 | qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_mips_dsp; | - |
6221 | qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_mips_dsp; | - |
6222 | | - |
6223 | destFetchProc[QImage::Format_ARGB32] = qt_destFetchARGB32_mips_dsp; | - |
6224 | | - |
6225 | destStoreProc[QImage::Format_ARGB32] = qt_destStoreARGB32_mips_dsp; | - |
6226 | | - |
6227 | #endif // QT_COMPILER_SUPPORTS_MIPS_DSP | - |
6228 | if (functionForModeSolidAsm) { partially evaluated: functionForModeSolidAsm yes Evaluation Count:276 | no Evaluation Count:0 |
| 0-276 |
6229 | const int destinationMode = QPainter::CompositionMode_Destination; executed (the execution status of this line is deduced): const int destinationMode = QPainter::CompositionMode_Destination; | - |
6230 | functionForModeSolidAsm[destinationMode] = functionForModeSolid_C[destinationMode]; executed (the execution status of this line is deduced): functionForModeSolidAsm[destinationMode] = functionForModeSolid_C[destinationMode]; | - |
6231 | | - |
6232 | // use the default qdrawhelper implementation for the | - |
6233 | // extended composition modes | - |
6234 | for (int mode = 12; mode < 24; ++mode) evaluated: mode < 24 yes Evaluation Count:3312 | yes Evaluation Count:276 |
| 276-3312 |
6235 | functionForModeSolidAsm[mode] = functionForModeSolid_C[mode]; executed: functionForModeSolidAsm[mode] = functionForModeSolid_C[mode]; Execution Count:3312 | 3312 |
6236 | | - |
6237 | functionForModeSolid = functionForModeSolidAsm; executed (the execution status of this line is deduced): functionForModeSolid = functionForModeSolidAsm; | - |
6238 | } executed: } Execution Count:276 | 276 |
6239 | if (functionForModeAsm) partially evaluated: functionForModeAsm yes Evaluation Count:276 | no Evaluation Count:0 |
| 0-276 |
6240 | functionForMode = functionForModeAsm; executed: functionForMode = functionForModeAsm; Execution Count:276 | 276 |
6241 | } executed: } Execution Count:276 | 276 |
6242 | | - |
6243 | static void qt_memfill32_setup(quint32 *dest, quint32 value, int count) | - |
6244 | { | - |
6245 | qInitDrawhelperAsm(); never executed (the execution status of this line is deduced): qInitDrawhelperAsm(); | - |
6246 | qt_memfill32(dest, value, count); never executed (the execution status of this line is deduced): qt_memfill32(dest, value, count); | - |
6247 | } | 0 |
6248 | | - |
6249 | static void qt_memfill16_setup(quint16 *dest, quint16 value, int count) | - |
6250 | { | - |
6251 | qInitDrawhelperAsm(); never executed (the execution status of this line is deduced): qInitDrawhelperAsm(); | - |
6252 | qt_memfill16(dest, value, count); never executed (the execution status of this line is deduced): qt_memfill16(dest, value, count); | - |
6253 | } | 0 |
6254 | | - |
6255 | QT_END_NAMESPACE | - |
6256 | | - |
| | |