kernel/qwidgetbackingstore.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7 -
8 -
9 -
10 -
11 -
12extern QRegion qt_dirtyRegion(QWidget *); -
13 -
14 -
15 -
16 -
17static inline bool qRectIntersects(const QRect &r1, const QRect &r2) -
18{ -
19 return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) 0
20 && qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom()));
never executed: return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) && qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom()));
0
21} -
22 -
23 -
24 -
25 -
26 -
27 -
28static inline void qt_flush(QWidget *widget, const QRegion &region, QBackingStore *backingStore, -
29 QWidget *tlw, const QPoint &tlwOffset) -
30{ -
31 qt_noop(); -
32 qt_noop(); -
33 qt_noop(); -
34 qt_noop(); -
35 static bool fpsDebug = qgetenv("QT_DEBUG_FPS").toInt(); -
36 if (fpsDebug) {
partially evaluated: fpsDebug
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8021
0-8021
37 static QTime time = QTime::currentTime(); -
38 static int frames = 0; -
39 -
40 frames++; -
41 -
42 if(time.elapsed() > 5000) {
never evaluated: time.elapsed() > 5000
0
43 double fps = double(frames * 1000) /time.restart(); -
44 fprintf(stderr,"FPS: %.1f\n",fps); -
45 frames = 0; -
46 }
never executed: }
0
47 }
never executed: }
0
48 -
49 if (tlw->testAttribute(Qt::WA_DontShowOnScreen) || widget->testAttribute(Qt::WA_DontShowOnScreen))
evaluated: tlw->testAttribute(Qt::WA_DontShowOnScreen)
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:8020
partially evaluated: widget->testAttribute(Qt::WA_DontShowOnScreen)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8020
0-8020
50 return;
executed: return;
Execution Count:1
1
51 -
52 if (widget != tlw)
evaluated: widget != tlw
TRUEFALSE
yes
Evaluation Count:23
yes
Evaluation Count:7997
23-7997
53 backingStore->flush(region, widget->windowHandle(), tlwOffset + widget->mapTo(tlw, QPoint()));
executed: backingStore->flush(region, widget->windowHandle(), tlwOffset + widget->mapTo(tlw, QPoint()));
Execution Count:23
23
54 else -
55 backingStore->flush(region, widget->windowHandle(), tlwOffset);
executed: backingStore->flush(region, widget->windowHandle(), tlwOffset);
Execution Count:7997
7997
56} -
57bool QWidgetBackingStore::bltRect(const QRect &rect, int dx, int dy, QWidget *widget) -
58{ -
59 const QPoint pos(tlwOffset + widget->mapTo(tlw, rect.topLeft())); -
60 const QRect tlwRect(QRect(pos, rect.size())); -
61 if (fullUpdatePending || dirty.intersects(tlwRect))
partially evaluated: fullUpdatePending
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:13142
evaluated: dirty.intersects(tlwRect)
TRUEFALSE
yes
Evaluation Count:11167
yes
Evaluation Count:1975
0-13142
62 return false;
executed: return false;
Execution Count:11167
11167
63 return store->scroll(tlwRect, dx, dy);
executed: return store->scroll(tlwRect, dx, dy);
Execution Count:1975
1975
64} -
65 -
66void QWidgetBackingStore::releaseBuffer() -
67{ -
68 if (store)
never evaluated: store
0
69 store->resize(QSize());
never executed: store->resize(QSize());
0
70}
never executed: }
0
71 -
72 -
73 -
74 -
75 -
76 -
77 -
78void QWidgetBackingStore::beginPaint(QRegion &toClean, QWidget *widget, QBackingStore *backingStore, -
79 BeginPaintInfo *returnInfo, bool toCleanIsInTopLevelCoordinates) -
80{ -
81 (void)widget;; -
82 (void)toCleanIsInTopLevelCoordinates;; -
83 -
84 -
85 dirtyOnScreen += toClean; -
86 -
87 -
88 backingStore->beginPaint(toClean); -
89 (void)returnInfo;; -
90}
executed: }
Execution Count:6183
6183
91 -
92void QWidgetBackingStore::endPaint(const QRegion &cleaned, QBackingStore *backingStore, -
93 BeginPaintInfo *beginPaintInfo) -
94{ -
95 -
96 -
97 -
98 -
99 -
100 -
101 (void)beginPaintInfo;; -
102 (void)cleaned;; -
103 backingStore->endPaint(); -
104 -
105 -
106 flush(); -
107}
executed: }
Execution Count:6183
6183
108 -
109 -
110 -
111 -
112 -
113 -
114 -
115QRegion QWidgetBackingStore::dirtyRegion(QWidget *widget) const -
116{ -
117 const bool widgetDirty = widget && widget != tlw;
never evaluated: widget
never evaluated: widget != tlw
0
118 const QRect tlwRect(topLevelRect()); -
119 const QRect surfaceGeometry(tlwRect.topLeft(), store->size()); -
120 if (fullUpdatePending || (surfaceGeometry != tlwRect && surfaceGeometry.size() != tlwRect.size())) {
never evaluated: fullUpdatePending
never evaluated: surfaceGeometry != tlwRect
never evaluated: surfaceGeometry.size() != tlwRect.size()
0
121 if (widgetDirty) {
never evaluated: widgetDirty
0
122 const QRect dirtyTlwRect = QRect(QPoint(), tlwRect.size()); -
123 const QPoint offset(widget->mapTo(tlw, QPoint())); -
124 const QRect dirtyWidgetRect(dirtyTlwRect & widget->rect().translated(offset)); -
125 return dirtyWidgetRect.translated(-offset);
never executed: return dirtyWidgetRect.translated(-offset);
0
126 } -
127 return QRect(QPoint(), tlwRect.size());
never executed: return QRect(QPoint(), tlwRect.size());
0
128 } -
129 -
130 -
131 QRegion r(dirty); -
132 for (int i = 0; i < dirtyWidgets.size(); ++i) {
never evaluated: i < dirtyWidgets.size()
0
133 QWidget *w = dirtyWidgets.at(i); -
134 if (widgetDirty && w != widget && !widget->isAncestorOf(w))
never evaluated: widgetDirty
never evaluated: w != widget
never evaluated: !widget->isAncestorOf(w)
0
135 continue;
never executed: continue;
0
136 r += w->d_func()->dirty.translated(w->mapTo(tlw, QPoint())); -
137 }
never executed: }
0
138 -
139 -
140 r += dirtyOnScreen; -
141 -
142 if (dirtyOnScreenWidgets) {
never evaluated: dirtyOnScreenWidgets
0
143 for (int i = 0; i < dirtyOnScreenWidgets->size(); ++i) {
never evaluated: i < dirtyOnScreenWidgets->size()
0
144 QWidget *w = dirtyOnScreenWidgets->at(i); -
145 if (widgetDirty && w != widget && !widget->isAncestorOf(w))
never evaluated: widgetDirty
never evaluated: w != widget
never evaluated: !widget->isAncestorOf(w)
0
146 continue;
never executed: continue;
0
147 QWidgetPrivate *wd = w->d_func(); -
148 qt_noop(); -
149 r += wd->needsFlush->translated(w->mapTo(tlw, QPoint())); -
150 }
never executed: }
0
151 }
never executed: }
0
152 -
153 if (widgetDirty) {
never evaluated: widgetDirty
0
154 -
155 const QPoint offset(widget->mapTo(tlw, QPoint())); -
156 r &= widget->rect().translated(offset); -
157 r.translate(-offset); -
158 }
never executed: }
0
159 return r;
never executed: return r;
0
160} -
161 -
162 -
163 -
164 -
165 -
166 -
167QRegion QWidgetBackingStore::staticContents(QWidget *parent, const QRect &withinClipRect) const -
168{ -
169 if (!parent && tlw->testAttribute(Qt::WA_StaticContents)) {
partially evaluated: !parent
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3338
never evaluated: tlw->testAttribute(Qt::WA_StaticContents)
0-3338
170 const QSize surfaceGeometry(store->size()); -
171 QRect surfaceRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height()); -
172 if (!withinClipRect.isEmpty())
never evaluated: !withinClipRect.isEmpty()
0
173 surfaceRect &= withinClipRect;
never executed: surfaceRect &= withinClipRect;
0
174 return QRegion(surfaceRect);
never executed: return QRegion(surfaceRect);
0
175 } -
176 -
177 QRegion region; -
178 if (parent && parent->d_func()->children.isEmpty())
partially evaluated: parent
TRUEFALSE
yes
Evaluation Count:3338
no
Evaluation Count:0
evaluated: parent->d_func()->children.isEmpty()
TRUEFALSE
yes
Evaluation Count:2017
yes
Evaluation Count:1321
0-3338
179 return region;
executed: return region;
Execution Count:2017
2017
180 -
181 const bool clipToRect = !withinClipRect.isEmpty(); -
182 const int count = staticWidgets.count(); -
183 for (int i = 0; i < count; ++i) {
partially evaluated: i < count
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1321
0-1321
184 QWidget *w = staticWidgets.at(i); -
185 QWidgetPrivate *wd = w->d_func(); -
186 if (!wd->isOpaque || !wd->extra || wd->extra->staticContentsSize.isEmpty()
never evaluated: !wd->isOpaque
never evaluated: !wd->extra
never evaluated: wd->extra->staticContentsSize.isEmpty()
0
187 || !w->isVisible() || (parent && !parent->isAncestorOf(w))) {
never evaluated: !w->isVisible()
never evaluated: parent
never evaluated: !parent->isAncestorOf(w)
0
188 continue;
never executed: continue;
0
189 } -
190 -
191 QRect rect(0, 0, wd->extra->staticContentsSize.width(), wd->extra->staticContentsSize.height()); -
192 const QPoint offset = w->mapTo(parent ? parent : tlw, QPoint()); -
193 if (clipToRect)
never evaluated: clipToRect
0
194 rect &= withinClipRect.translated(-offset);
never executed: rect &= withinClipRect.translated(-offset);
0
195 if (rect.isEmpty())
never evaluated: rect.isEmpty()
0
196 continue;
never executed: continue;
0
197 -
198 rect &= wd->clipRect(); -
199 if (rect.isEmpty())
never evaluated: rect.isEmpty()
0
200 continue;
never executed: continue;
0
201 -
202 QRegion visible(rect); -
203 wd->clipToEffectiveMask(visible); -
204 if (visible.isEmpty())
never evaluated: visible.isEmpty()
0
205 continue;
never executed: continue;
0
206 wd->subtractOpaqueSiblings(visible, 0, true); -
207 -
208 visible.translate(offset); -
209 region += visible; -
210 }
never executed: }
0
211 -
212 return region;
executed: return region;
Execution Count:1321
1321
213} -
214 -
215static inline void sendUpdateRequest(QWidget *widget, bool updateImmediately) -
216{ -
217 if (!widget)
partially evaluated: !widget
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:11567
0-11567
218 return;
never executed: return;
0
219 -
220 if (updateImmediately) {
evaluated: updateImmediately
TRUEFALSE
yes
Evaluation Count:266
yes
Evaluation Count:11301
266-11301
221 QEvent event(QEvent::UpdateRequest); -
222 QApplication::sendEvent(widget, &event); -
223 } else {
executed: }
Execution Count:266
266
224 QApplication::postEvent(widget, new QEvent(QEvent::UpdateRequest), Qt::LowEventPriority); -
225 }
executed: }
Execution Count:11301
11301
226} -
227void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool updateImmediately, -
228 bool invalidateBuffer) -
229{ -
230 qt_noop(); -
231 qt_noop(); -
232 qt_noop(); -
233 qt_noop(); -
234 qt_noop(); -
235 qt_noop(); -
236 -
237 -
238 widget->d_func()->invalidateGraphicsEffectsRecursively(); -
239 -
240 -
241 if (widget->d_func()->paintOnScreen()) {
evaluated: widget->d_func()->paintOnScreen()
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:30373
6-30373
242 if (widget->d_func()->dirty.isEmpty()) {
evaluated: widget->d_func()->dirty.isEmpty()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:3
3
243 widget->d_func()->dirty = rgn; -
244 sendUpdateRequest(widget, updateImmediately); -
245 return;
executed: return;
Execution Count:3
3
246 } else if (qt_region_strictContains(widget->d_func()->dirty, widget->rect())) {
partially evaluated: qt_region_strictContains(widget->d_func()->dirty, widget->rect())
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
247 if (updateImmediately)
partially evaluated: updateImmediately
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3
0-3
248 sendUpdateRequest(widget, updateImmediately);
never executed: sendUpdateRequest(widget, updateImmediately);
0
249 return;
executed: return;
Execution Count:3
3
250 } -
251 -
252 const bool eventAlreadyPosted = !widget->d_func()->dirty.isEmpty(); -
253 widget->d_func()->dirty += rgn; -
254 if (!eventAlreadyPosted || updateImmediately)
never evaluated: !eventAlreadyPosted
never evaluated: updateImmediately
0
255 sendUpdateRequest(widget, updateImmediately);
never executed: sendUpdateRequest(widget, updateImmediately);
0
256 return;
never executed: return;
0
257 } -
258 -
259 if (fullUpdatePending) {
partially evaluated: fullUpdatePending
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:30373
0-30373
260 if (updateImmediately)
never evaluated: updateImmediately
0
261 sendUpdateRequest(tlw, updateImmediately);
never executed: sendUpdateRequest(tlw, updateImmediately);
0
262 return;
never executed: return;
0
263 } -
264 -
265 const QPoint offset = widget->mapTo(tlw, QPoint()); -
266 const QRect widgetRect = widget->d_func()->effectiveRectFor(widget->rect()); -
267 if (qt_region_strictContains(dirty, widgetRect.translated(offset))) {
evaluated: qt_region_strictContains(dirty, widgetRect.translated(offset))
TRUEFALSE
yes
Evaluation Count:23275
yes
Evaluation Count:7098
7098-23275
268 if (updateImmediately)
partially evaluated: updateImmediately
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23275
0-23275
269 sendUpdateRequest(tlw, updateImmediately);
never executed: sendUpdateRequest(tlw, updateImmediately);
0
270 return;
executed: return;
Execution Count:23275
23275
271 } -
272 -
273 if (invalidateBuffer) {
evaluated: invalidateBuffer
TRUEFALSE
yes
Evaluation Count:691
yes
Evaluation Count:6407
691-6407
274 const bool eventAlreadyPosted = !dirty.isEmpty(); -
275 -
276 if (widget->d_func()->graphicsEffect)
partially evaluated: widget->d_func()->graphicsEffect
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:691
0-691
277 dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect()).translated(offset);
never executed: dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect()).translated(offset);
0
278 else -
279 -
280 dirty += rgn.translated(offset);
executed: dirty += rgn.translated(offset);
Execution Count:691
691
281 if (!eventAlreadyPosted || updateImmediately)
evaluated: !eventAlreadyPosted
TRUEFALSE
yes
Evaluation Count:149
yes
Evaluation Count:542
partially evaluated: updateImmediately
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:542
0-542
282 sendUpdateRequest(tlw, updateImmediately);
executed: sendUpdateRequest(tlw, updateImmediately);
Execution Count:149
149
283 return;
executed: return;
Execution Count:691
691
284 } -
285 -
286 if (dirtyWidgets.isEmpty()) {
evaluated: dirtyWidgets.isEmpty()
TRUEFALSE
yes
Evaluation Count:1072
yes
Evaluation Count:5335
1072-5335
287 addDirtyWidget(widget, rgn); -
288 sendUpdateRequest(tlw, updateImmediately); -
289 return;
executed: return;
Execution Count:1072
1072
290 } -
291 -
292 if (widget->d_func()->inDirtyList) {
evaluated: widget->d_func()->inDirtyList
TRUEFALSE
yes
Evaluation Count:3550
yes
Evaluation Count:1785
1785-3550
293 if (!qt_region_strictContains(widget->d_func()->dirty, widgetRect)) {
evaluated: !qt_region_strictContains(widget->d_func()->dirty, widgetRect)
TRUEFALSE
yes
Evaluation Count:2609
yes
Evaluation Count:941
941-2609
294 -
295 if (widget->d_func()->graphicsEffect)
partially evaluated: widget->d_func()->graphicsEffect
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2609
0-2609
296 widget->d_func()->dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect());
never executed: widget->d_func()->dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect());
0
297 else -
298 -
299 widget->d_func()->dirty += rgn;
executed: widget->d_func()->dirty += rgn;
Execution Count:2609
2609
300 } -
301 } else {
executed: }
Execution Count:3550
3550
302 addDirtyWidget(widget, rgn); -
303 }
executed: }
Execution Count:1785
1785
304 -
305 if (updateImmediately)
partially evaluated: updateImmediately
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:5335
0-5335
306 sendUpdateRequest(tlw, updateImmediately);
never executed: sendUpdateRequest(tlw, updateImmediately);
0
307}
executed: }
Execution Count:5335
5335
308void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool updateImmediately, -
309 bool invalidateBuffer) -
310{ -
311 qt_noop(); -
312 qt_noop(); -
313 qt_noop(); -
314 qt_noop(); -
315 qt_noop(); -
316 qt_noop(); -
317 -
318 -
319 widget->d_func()->invalidateGraphicsEffectsRecursively(); -
320 -
321 -
322 if (widget->d_func()->paintOnScreen()) {
evaluated: widget->d_func()->paintOnScreen()
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:99330
6-99330
323 if (widget->d_func()->dirty.isEmpty()) {
partially evaluated: widget->d_func()->dirty.isEmpty()
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-6
324 widget->d_func()->dirty = QRegion(rect); -
325 sendUpdateRequest(widget, updateImmediately); -
326 return;
executed: return;
Execution Count:6
6
327 } else if (qt_region_strictContains(widget->d_func()->dirty, rect)) {
never evaluated: qt_region_strictContains(widget->d_func()->dirty, rect)
0
328 if (updateImmediately)
never evaluated: updateImmediately
0
329 sendUpdateRequest(widget, updateImmediately);
never executed: sendUpdateRequest(widget, updateImmediately);
0
330 return;
never executed: return;
0
331 } -
332 -
333 const bool eventAlreadyPosted = !widget->d_func()->dirty.isEmpty(); -
334 widget->d_func()->dirty += rect; -
335 if (!eventAlreadyPosted || updateImmediately)
never evaluated: !eventAlreadyPosted
never evaluated: updateImmediately
0
336 sendUpdateRequest(widget, updateImmediately);
never executed: sendUpdateRequest(widget, updateImmediately);
0
337 return;
never executed: return;
0
338 } -
339 -
340 if (fullUpdatePending) {
partially evaluated: fullUpdatePending
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:99330
0-99330
341 if (updateImmediately)
never evaluated: updateImmediately
0
342 sendUpdateRequest(tlw, updateImmediately);
never executed: sendUpdateRequest(tlw, updateImmediately);
0
343 return;
never executed: return;
0
344 } -
345 -
346 const QRect widgetRect = widget->d_func()->effectiveRectFor(rect); -
347 const QRect translatedRect(widgetRect.translated(widget->mapTo(tlw, QPoint()))); -
348 if (qt_region_strictContains(dirty, translatedRect)) {
evaluated: qt_region_strictContains(dirty, translatedRect)
TRUEFALSE
yes
Evaluation Count:61658
yes
Evaluation Count:37672
37672-61658
349 if (updateImmediately)
evaluated: updateImmediately
TRUEFALSE
yes
Evaluation Count:43
yes
Evaluation Count:61615
43-61615
350 sendUpdateRequest(tlw, updateImmediately);
executed: sendUpdateRequest(tlw, updateImmediately);
Execution Count:43
43
351 return;
executed: return;
Execution Count:61658
61658
352 } -
353 -
354 if (invalidateBuffer) {
evaluated: invalidateBuffer
TRUEFALSE
yes
Evaluation Count:6211
yes
Evaluation Count:31461
6211-31461
355 const bool eventAlreadyPosted = !dirty.isEmpty(); -
356 dirty += translatedRect; -
357 if (!eventAlreadyPosted || updateImmediately)
evaluated: !eventAlreadyPosted
TRUEFALSE
yes
Evaluation Count:4383
yes
Evaluation Count:1828
partially evaluated: updateImmediately
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1828
0-4383
358 sendUpdateRequest(tlw, updateImmediately);
executed: sendUpdateRequest(tlw, updateImmediately);
Execution Count:4383
4383
359 return;
executed: return;
Execution Count:6211
6211
360 } -
361 -
362 if (dirtyWidgets.isEmpty()) {
evaluated: dirtyWidgets.isEmpty()
TRUEFALSE
yes
Evaluation Count:5724
yes
Evaluation Count:25737
5724-25737
363 addDirtyWidget(widget, rect); -
364 sendUpdateRequest(tlw, updateImmediately); -
365 return;
executed: return;
Execution Count:5724
5724
366 } -
367 -
368 if (widget->d_func()->inDirtyList) {
evaluated: widget->d_func()->inDirtyList
TRUEFALSE
yes
Evaluation Count:21356
yes
Evaluation Count:4381
4381-21356
369 if (!qt_region_strictContains(widget->d_func()->dirty, widgetRect))
evaluated: !qt_region_strictContains(widget->d_func()->dirty, widgetRect)
TRUEFALSE
yes
Evaluation Count:8082
yes
Evaluation Count:13274
8082-13274
370 widget->d_func()->dirty += widgetRect;
executed: widget->d_func()->dirty += widgetRect;
Execution Count:8082
8082
371 } else {
executed: }
Execution Count:21356
21356
372 addDirtyWidget(widget, rect); -
373 }
executed: }
Execution Count:4381
4381
374 -
375 if (updateImmediately)
evaluated: updateImmediately
TRUEFALSE
yes
Evaluation Count:187
yes
Evaluation Count:25550
187-25550
376 sendUpdateRequest(tlw, updateImmediately);
executed: sendUpdateRequest(tlw, updateImmediately);
Execution Count:187
187
377}
executed: }
Execution Count:25737
25737
378 -
379 -
380 -
381 -
382 -
383 -
384 -
385void QWidgetBackingStore::markDirtyOnScreen(const QRegion &region, QWidget *widget, const QPoint &topLevelOffset) -
386{ -
387 if (!widget || widget->d_func()->paintOnScreen() || region.isEmpty())
partially evaluated: !widget
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:16253
partially evaluated: widget->d_func()->paintOnScreen()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:16253
evaluated: region.isEmpty()
TRUEFALSE
yes
Evaluation Count:1577
yes
Evaluation Count:14676
0-16253
388 return;
executed: return;
Execution Count:1577
1577
389 if (widget == tlw) {
evaluated: widget == tlw
TRUEFALSE
yes
Evaluation Count:1513
yes
Evaluation Count:13163
1513-13163
390 if (!widget->testAttribute(Qt::WA_WState_InPaintEvent))
partially evaluated: !widget->testAttribute(Qt::WA_WState_InPaintEvent)
TRUEFALSE
yes
Evaluation Count:1513
no
Evaluation Count:0
0-1513
391 dirtyOnScreen += region;
executed: dirtyOnScreen += region;
Execution Count:1513
1513
392 return;
executed: return;
Execution Count:1513
1513
393 } -
394 -
395 -
396 if (!widget->internalWinId() && !widget->isWindow()) {
evaluated: !widget->internalWinId()
TRUEFALSE
yes
Evaluation Count:13130
yes
Evaluation Count:33
partially evaluated: !widget->isWindow()
TRUEFALSE
yes
Evaluation Count:13130
no
Evaluation Count:0
0-13130
397 QWidget *nativeParent = widget->nativeParentWidget(); -
398 if (nativeParent == tlw) {
evaluated: nativeParent == tlw
TRUEFALSE
yes
Evaluation Count:13128
yes
Evaluation Count:2
2-13128
399 if (!widget->testAttribute(Qt::WA_WState_InPaintEvent))
evaluated: !widget->testAttribute(Qt::WA_WState_InPaintEvent)
TRUEFALSE
yes
Evaluation Count:13127
yes
Evaluation Count:1
1-13127
400 dirtyOnScreen += region.translated(topLevelOffset);
executed: dirtyOnScreen += region.translated(topLevelOffset);
Execution Count:13127
13127
401 return;
executed: return;
Execution Count:13128
13128
402 } -
403 -
404 -
405 QWidgetPrivate *nativeParentPrivate = nativeParent->d_func(); -
406 if (!nativeParentPrivate->needsFlush)
partially evaluated: !nativeParentPrivate->needsFlush
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
407 nativeParentPrivate->needsFlush = new QRegion;
never executed: nativeParentPrivate->needsFlush = new QRegion;
0
408 const QPoint nativeParentOffset = widget->mapTo(nativeParent, QPoint()); -
409 *nativeParentPrivate->needsFlush += region.translated(nativeParentOffset); -
410 appendDirtyOnScreenWidget(nativeParent); -
411 return;
executed: return;
Execution Count:2
2
412 } -
413 -
414 -
415 QWidgetPrivate *widgetPrivate = widget->d_func(); -
416 if (!widgetPrivate->needsFlush)
evaluated: !widgetPrivate->needsFlush
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:23
10-23
417 widgetPrivate->needsFlush = new QRegion;
executed: widgetPrivate->needsFlush = new QRegion;
Execution Count:10
10
418 *widgetPrivate->needsFlush += region; -
419 appendDirtyOnScreenWidget(widget); -
420}
executed: }
Execution Count:33
33
421 -
422void QWidgetBackingStore::removeDirtyWidget(QWidget *w) -
423{ -
424 if (!w)
partially evaluated: !w
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:80499
0-80499
425 return;
never executed: return;
0
426 -
427 dirtyWidgetsRemoveAll(w); -
428 dirtyOnScreenWidgetsRemoveAll(w); -
429 resetWidget(w); -
430 -
431 QWidgetPrivate *wd = w->d_func(); -
432 const int n = wd->children.count(); -
433 for (int i = 0; i < n; ++i) {
evaluated: i < n
TRUEFALSE
yes
Evaluation Count:95534
yes
Evaluation Count:80499
80499-95534
434 if (QWidget *child = qobject_cast<QWidget*>(wd->children.at(i)))
evaluated: QWidget *child = qobject_cast<QWidget*>(wd->children.at(i))
TRUEFALSE
yes
Evaluation Count:56637
yes
Evaluation Count:38897
38897-56637
435 removeDirtyWidget(child);
executed: removeDirtyWidget(child);
Execution Count:56637
56637
436 }
executed: }
Execution Count:95534
95534
437}
executed: }
Execution Count:80499
80499
438 -
439void QWidgetBackingStore::updateLists(QWidget *cur) -
440{ -
441 if (!cur)
partially evaluated: !cur
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:19428
0-19428
442 return;
never executed: return;
0
443 -
444 QList<QObject*> children = cur->children(); -
445 for (int i = 0; i < children.size(); ++i) {
evaluated: i < children.size()
TRUEFALSE
yes
Evaluation Count:27487
yes
Evaluation Count:19428
19428-27487
446 QWidget *child = qobject_cast<QWidget*>(children.at(i)); -
447 if (!child)
evaluated: !child
TRUEFALSE
yes
Evaluation Count:10563
yes
Evaluation Count:16924
10563-16924
448 continue;
executed: continue;
Execution Count:10563
10563
449 -
450 updateLists(child); -
451 }
executed: }
Execution Count:16924
16924
452 -
453 if (cur->testAttribute(Qt::WA_StaticContents))
evaluated: cur->testAttribute(Qt::WA_StaticContents)
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:19422
6-19422
454 addStaticWidget(cur);
executed: addStaticWidget(cur);
Execution Count:6
6
455}
executed: }
Execution Count:19428
19428
456 -
457QWidgetBackingStore::QWidgetBackingStore(QWidget *topLevel) -
458 : tlw(topLevel), dirtyOnScreenWidgets(0), fullUpdatePending(0) -
459{ -
460 store = tlw->backingStore(); -
461 qt_noop(); -
462 -
463 -
464 updateLists(topLevel); -
465}
executed: }
Execution Count:2504
2504
466 -
467QWidgetBackingStore::~QWidgetBackingStore() -
468{ -
469 for (int c = 0; c < dirtyWidgets.size(); ++c) {
evaluated: c < dirtyWidgets.size()
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:2503
7-2503
470 resetWidget(dirtyWidgets.at(c)); -
471 }
executed: }
Execution Count:7
7
472 -
473 delete dirtyOnScreenWidgets; -
474 dirtyOnScreenWidgets = 0; -
475}
executed: }
Execution Count:2503
2503
476 -
477 -
478 -
479void QWidgetPrivate::moveRect(const QRect &rect, int dx, int dy) -
480{ -
481 QWidget * const q = q_func(); -
482 if (!q->isVisible() || (dx == 0 && dy == 0))
partially evaluated: !q->isVisible()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:388
evaluated: dx == 0
TRUEFALSE
yes
Evaluation Count:215
yes
Evaluation Count:173
partially evaluated: dy == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:215
0-388
483 return;
never executed: return;
0
484 -
485 QWidget *tlw = q->window(); -
486 QTLWExtra* x = tlw->d_func()->topData(); -
487 if (x->inTopLevelResize)
partially evaluated: x->inTopLevelResize
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:388
0-388
488 return;
never executed: return;
0
489 -
490 static int accelEnv = -1; -
491 if (accelEnv == -1) {
evaluated: accelEnv == -1
TRUEFALSE
yes
Evaluation Count:27
yes
Evaluation Count:361
27-361
492 accelEnv = qgetenv("QT_NO_FAST_MOVE").toInt() == 0; -
493 }
executed: }
Execution Count:27
27
494 -
495 QWidget *pw = q->parentWidget(); -
496 QPoint toplevelOffset = pw->mapTo(tlw, QPoint()); -
497 QWidgetPrivate *pd = pw->d_func(); -
498 QRect clipR(pd->clipRect()); -
499 const QRect newRect(rect.translated(dx, dy)); -
500 QRect destRect = rect.intersected(clipR); -
501 if (destRect.isValid())
evaluated: destRect.isValid()
TRUEFALSE
yes
Evaluation Count:350
yes
Evaluation Count:38
38-350
502 destRect = destRect.translated(dx, dy).intersected(clipR);
executed: destRect = destRect.translated(dx, dy).intersected(clipR);
Execution Count:350
350
503 const QRect sourceRect(destRect.translated(-dx, -dy)); -
504 const QRect parentRect(rect & clipR); -
505 -
506 bool accelerateMove = accelEnv && isOpaque
partially evaluated: accelEnv
TRUEFALSE
yes
Evaluation Count:388
no
Evaluation Count:0
evaluated: isOpaque
TRUEFALSE
yes
Evaluation Count:75
yes
Evaluation Count:313
0-388
507 -
508 -
509 && !tlw->d_func()->extra->proxyWidget
partially evaluated: !tlw->d_func()->extra->proxyWidget
TRUEFALSE
yes
Evaluation Count:75
no
Evaluation Count:0
0-75
510 -
511 && !isOverlapped(sourceRect) && !isOverlapped(destRect);
evaluated: !isOverlapped(sourceRect)
TRUEFALSE
yes
Evaluation Count:70
yes
Evaluation Count:5
partially evaluated: !isOverlapped(destRect)
TRUEFALSE
yes
Evaluation Count:70
no
Evaluation Count:0
0-70
512 -
513 if (!accelerateMove) {
evaluated: !accelerateMove
TRUEFALSE
yes
Evaluation Count:318
yes
Evaluation Count:70
70-318
514 QRegion parentR(effectiveRectFor(parentRect)); -
515 if (!extra || !extra->hasMask) {
evaluated: !extra
TRUEFALSE
yes
Evaluation Count:84
yes
Evaluation Count:234
evaluated: !extra->hasMask
TRUEFALSE
yes
Evaluation Count:214
yes
Evaluation Count:20
20-234
516 parentR -= newRect; -
517 } else {
executed: }
Execution Count:298
298
518 -
519 parentR += newRect & clipR; -
520 }
executed: }
Execution Count:20
20
521 pd->invalidateBuffer(parentR); -
522 invalidateBuffer((newRect & clipR).translated(-data.crect.topLeft())); -
523 } else {
executed: }
Execution Count:318
318
524 -
525 QWidgetBackingStore *wbs = x->backingStoreTracker.data(); -
526 QRegion childExpose(newRect & clipR); -
527 -
528 if (sourceRect.isValid() && wbs->bltRect(sourceRect, dx, dy, pw))
evaluated: sourceRect.isValid()
TRUEFALSE
yes
Evaluation Count:65
yes
Evaluation Count:5
evaluated: wbs->bltRect(sourceRect, dx, dy, pw)
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:50
5-65
529 childExpose -= destRect;
executed: childExpose -= destRect;
Execution Count:15
15
530 -
531 if (!pw->updatesEnabled())
evaluated: !pw->updatesEnabled()
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:69
1-69
532 return;
executed: return;
Execution Count:1
1
533 -
534 const bool childUpdatesEnabled = q->updatesEnabled(); -
535 if (childUpdatesEnabled && !childExpose.isEmpty()) {
partially evaluated: childUpdatesEnabled
TRUEFALSE
yes
Evaluation Count:69
no
Evaluation Count:0
evaluated: !childExpose.isEmpty()
TRUEFALSE
yes
Evaluation Count:55
yes
Evaluation Count:14
0-69
536 childExpose.translate(-data.crect.topLeft()); -
537 wbs->markDirty(childExpose, q); -
538 isMoved = true; -
539 }
executed: }
Execution Count:55
55
540 -
541 QRegion parentExpose(parentRect); -
542 parentExpose -= newRect; -
543 if (extra && extra->hasMask)
partially evaluated: extra
TRUEFALSE
yes
Evaluation Count:69
no
Evaluation Count:0
partially evaluated: extra->hasMask
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:69
0-69
544 parentExpose += QRegion(newRect) - extra->mask.translated(data.crect.topLeft());
never executed: parentExpose += QRegion(newRect) - extra->mask.translated(data.crect.topLeft());
0
545 -
546 if (!parentExpose.isEmpty()) {
evaluated: !parentExpose.isEmpty()
TRUEFALSE
yes
Evaluation Count:56
yes
Evaluation Count:13
13-56
547 wbs->markDirty(parentExpose, pw); -
548 pd->isMoved = true; -
549 }
executed: }
Execution Count:56
56
550 -
551 if (childUpdatesEnabled) {
partially evaluated: childUpdatesEnabled
TRUEFALSE
yes
Evaluation Count:69
no
Evaluation Count:0
0-69
552 QRegion needsFlush(sourceRect); -
553 needsFlush += destRect; -
554 wbs->markDirtyOnScreen(needsFlush, pw, toplevelOffset); -
555 }
executed: }
Execution Count:69
69
556 }
executed: }
Execution Count:69
69
557} -
558 -
559 -
560void QWidgetPrivate::scrollRect(const QRect &rect, int dx, int dy) -
561{ -
562 QWidget * const q = q_func(); -
563 QWidget *tlw = q->window(); -
564 QTLWExtra* x = tlw->d_func()->topData(); -
565 if (x->inTopLevelResize)
partially evaluated: x->inTopLevelResize
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:14649
0-14649
566 return;
never executed: return;
0
567 -
568 QWidgetBackingStore *wbs = x->backingStoreTracker.data(); -
569 if (!wbs)
partially evaluated: !wbs
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:14649
0-14649
570 return;
never executed: return;
0
571 -
572 static int accelEnv = -1; -
573 if (accelEnv == -1) {
evaluated: accelEnv == -1
TRUEFALSE
yes
Evaluation Count:16
yes
Evaluation Count:14633
16-14633
574 accelEnv = qgetenv("QT_NO_FAST_SCROLL").toInt() == 0; -
575 }
executed: }
Execution Count:16
16
576 -
577 QRect scrollRect = rect & clipRect(); -
578 bool overlapped = false; -
579 bool accelerateScroll = accelEnv && isOpaque
partially evaluated: accelEnv
TRUEFALSE
yes
Evaluation Count:14649
no
Evaluation Count:0
partially evaluated: isOpaque
TRUEFALSE
yes
Evaluation Count:14649
no
Evaluation Count:0
0-14649
580 && !(overlapped = isOverlapped(scrollRect.translated(data.crect.topLeft())));
partially evaluated: !(overlapped = isOverlapped(scrollRect.translated(data.crect.topLeft())))
TRUEFALSE
yes
Evaluation Count:14649
no
Evaluation Count:0
0-14649
581 -
582 if (!accelerateScroll) {
partially evaluated: !accelerateScroll
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:14649
0-14649
583 if (overlapped) {
never evaluated: overlapped
0
584 QRegion region(scrollRect); -
585 subtractOpaqueSiblings(region); -
586 invalidateBuffer(region); -
587 }else {
never executed: }
0
588 invalidateBuffer(scrollRect); -
589 }
never executed: }
0
590 } else { -
591 const QPoint toplevelOffset = q->mapTo(tlw, QPoint()); -
592 const QRect destRect = scrollRect.translated(dx, dy) & scrollRect; -
593 const QRect sourceRect = destRect.translated(-dx, -dy); -
594 -
595 QRegion childExpose(scrollRect); -
596 if (sourceRect.isValid()) {
evaluated: sourceRect.isValid()
TRUEFALSE
yes
Evaluation Count:13077
yes
Evaluation Count:1572
1572-13077
597 if (wbs->bltRect(sourceRect, dx, dy, q))
evaluated: wbs->bltRect(sourceRect, dx, dy, q)
TRUEFALSE
yes
Evaluation Count:1876
yes
Evaluation Count:11201
1876-11201
598 childExpose -= destRect;
executed: childExpose -= destRect;
Execution Count:1876
1876
599 }
executed: }
Execution Count:13077
13077
600 -
601 if (inDirtyList) {
evaluated: inDirtyList
TRUEFALSE
yes
Evaluation Count:8959
yes
Evaluation Count:5690
5690-8959
602 if (rect == q->rect()) {
partially evaluated: rect == q->rect()
TRUEFALSE
yes
Evaluation Count:8959
no
Evaluation Count:0
0-8959
603 dirty.translate(dx, dy); -
604 } else {
executed: }
Execution Count:8959
8959
605 QRegion dirtyScrollRegion = dirty.intersected(scrollRect); -
606 if (!dirtyScrollRegion.isEmpty()) {
never evaluated: !dirtyScrollRegion.isEmpty()
0
607 dirty -= dirtyScrollRegion; -
608 dirtyScrollRegion.translate(dx, dy); -
609 dirty += dirtyScrollRegion; -
610 }
never executed: }
0
611 }
never executed: }
0
612 } -
613 -
614 if (!q->updatesEnabled())
partially evaluated: !q->updatesEnabled()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:14649
0-14649
615 return;
never executed: return;
0
616 -
617 if (!childExpose.isEmpty()) {
evaluated: !childExpose.isEmpty()
TRUEFALSE
yes
Evaluation Count:14646
yes
Evaluation Count:3
3-14646
618 wbs->markDirty(childExpose, q); -
619 isScrolled = true; -
620 }
executed: }
Execution Count:14646
14646
621 -
622 -
623 -
624 -
625 wbs->markDirtyOnScreen(destRect, q, toplevelOffset); -
626 }
executed: }
Execution Count:14649
14649
627} -
628 -
629static inline bool discardSyncRequest(QWidget *tlw, QTLWExtra *tlwExtra) -
630{ -
631 if (!tlw || !tlwExtra || !tlw->testAttribute(Qt::WA_Mapped) || !tlw->isVisible())
partially evaluated: !tlw
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:13107
evaluated: !tlwExtra
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:13105
evaluated: !tlw->testAttribute(Qt::WA_Mapped)
TRUEFALSE
yes
Evaluation Count:3251
yes
Evaluation Count:9854
evaluated: !tlw->isVisible()
TRUEFALSE
yes
Evaluation Count:31
yes
Evaluation Count:9823
0-13107
632 return true;
executed: return true;
Execution Count:3284
3284
633 -
634 return false;
executed: return false;
Execution Count:9823
9823
635} -
636void QWidgetBackingStore::sync(QWidget *exposedWidget, const QRegion &exposedRegion) -
637{ -
638 QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData(); -
639 if (discardSyncRequest(tlw, tlwExtra) || tlwExtra->inTopLevelResize)
evaluated: discardSyncRequest(tlw, tlwExtra)
TRUEFALSE
yes
Evaluation Count:31
yes
Evaluation Count:3327
partially evaluated: tlwExtra->inTopLevelResize
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3327
0-3327
640 return;
executed: return;
Execution Count:31
31
641 -
642 if (!exposedWidget || !exposedWidget->internalWinId() || !exposedWidget->isVisible()
partially evaluated: !exposedWidget
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3327
partially evaluated: !exposedWidget->internalWinId()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3327
partially evaluated: !exposedWidget->isVisible()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3327
0-3327
643 || !exposedWidget->updatesEnabled() || exposedRegion.isEmpty()) {
evaluated: !exposedWidget->updatesEnabled()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:3325
partially evaluated: exposedRegion.isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3325
0-3325
644 return;
executed: return;
Execution Count:2
2
645 } -
646 -
647 -
648 if (!isDirty()) {
evaluated: !isDirty()
TRUEFALSE
yes
Evaluation Count:1815
yes
Evaluation Count:1510
1510-1815
649 qt_flush(exposedWidget, exposedRegion, store, tlw, tlwOffset); -
650 return;
executed: return;
Execution Count:1815
1815
651 } -
652 -
653 if (exposedWidget != tlw)
evaluated: exposedWidget != tlw
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:1500
10-1500
654 markDirtyOnScreen(exposedRegion, exposedWidget, exposedWidget->mapTo(tlw, QPoint()));
executed: markDirtyOnScreen(exposedRegion, exposedWidget, exposedWidget->mapTo(tlw, QPoint()));
Execution Count:10
10
655 else -
656 markDirtyOnScreen(exposedRegion, exposedWidget, QPoint());
executed: markDirtyOnScreen(exposedRegion, exposedWidget, QPoint());
Execution Count:1500
1500
657 sync(); -
658}
executed: }
Execution Count:1510
1510
659 -
660 -
661 -
662 -
663void QWidgetBackingStore::sync() -
664{ -
665 QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData(); -
666 if (discardSyncRequest(tlw, tlwExtra)) {
evaluated: discardSyncRequest(tlw, tlwExtra)
TRUEFALSE
yes
Evaluation Count:3248
yes
Evaluation Count:6488
3248-6488
667 -
668 -
669 -
670 -
671 -
672 if (!tlw->isVisible()) {
evaluated: !tlw->isVisible()
TRUEFALSE
yes
Evaluation Count:86
yes
Evaluation Count:3162
86-3162
673 dirty = QRegion(); -
674 for (int i = 0; i < dirtyWidgets.size(); ++i)
partially evaluated: i < dirtyWidgets.size()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:86
0-86
675 resetWidget(dirtyWidgets.at(i));
never executed: resetWidget(dirtyWidgets.at(i));
0
676 dirtyWidgets.clear(); -
677 fullUpdatePending = false; -
678 }
executed: }
Execution Count:86
86
679 return;
executed: return;
Execution Count:3248
3248
680 } -
681 -
682 const bool updatesDisabled = !tlw->updatesEnabled(); -
683 bool repaintAllWidgets = false; -
684 -
685 const bool inTopLevelResize = tlwExtra->inTopLevelResize; -
686 const QRect tlwRect(topLevelRect()); -
687 const QRect surfaceGeometry(tlwRect.topLeft(), store->size()); -
688 if ((fullUpdatePending || inTopLevelResize || surfaceGeometry.size() != tlwRect.size()) && !updatesDisabled) {
partially evaluated: fullUpdatePending
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6488
partially evaluated: inTopLevelResize
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6488
evaluated: surfaceGeometry.size() != tlwRect.size()
TRUEFALSE
yes
Evaluation Count:54
yes
Evaluation Count:6434
partially evaluated: !updatesDisabled
TRUEFALSE
yes
Evaluation Count:54
no
Evaluation Count:0
0-6488
689 if (hasStaticContents()) {
partially evaluated: hasStaticContents()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:54
0-54
690 -
691 const QRect clipRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height()); -
692 const QRegion staticRegion(staticContents(0, clipRect)); -
693 QRegion newVisible(0, 0, tlwRect.width(), tlwRect.height()); -
694 newVisible -= staticRegion; -
695 dirty += newVisible; -
696 store->setStaticContents(staticRegion); -
697 } else {
never executed: }
0
698 -
699 dirty = QRegion(0, 0, tlwRect.width(), tlwRect.height()); -
700 for (int i = 0; i < dirtyWidgets.size(); ++i)
evaluated: i < dirtyWidgets.size()
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:54
15-54
701 resetWidget(dirtyWidgets.at(i));
executed: resetWidget(dirtyWidgets.at(i));
Execution Count:15
15
702 dirtyWidgets.clear(); -
703 repaintAllWidgets = true; -
704 }
executed: }
Execution Count:54
54
705 } -
706 -
707 if (inTopLevelResize || surfaceGeometry.size() != tlwRect.size())
partially evaluated: inTopLevelResize
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6488
evaluated: surfaceGeometry.size() != tlwRect.size()
TRUEFALSE
yes
Evaluation Count:54
yes
Evaluation Count:6434
0-6488
708 store->resize(tlwRect.size());
executed: store->resize(tlwRect.size());
Execution Count:54
54
709 -
710 if (updatesDisabled)
partially evaluated: updatesDisabled
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6488
0-6488
711 return;
never executed: return;
0
712 -
713 -
714 QRegion toClean(dirty); -
715 -
716 -
717 -
718 -
719 -
720 QVarLengthArray<QWidget *, 32> opaqueNonOverlappedWidgets; -
721 for (int i = 0; i < dirtyWidgets.size(); ++i) {
evaluated: i < dirtyWidgets.size()
TRUEFALSE
yes
Evaluation Count:9594
yes
Evaluation Count:6488
6488-9594
722 QWidget *w = dirtyWidgets.at(i); -
723 QWidgetPrivate *wd = w->d_func(); -
724 if (wd->data.in_destructor)
partially evaluated: wd->data.in_destructor
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9594
0-9594
725 continue;
never executed: continue;
0
726 -
727 -
728 wd->dirty &= wd->clipRect(); -
729 wd->clipToEffectiveMask(wd->dirty); -
730 -
731 -
732 bool hasDirtySiblingsAbove = false; -
733 -
734 if (!wd->isMoved)
evaluated: !wd->isMoved
TRUEFALSE
yes
Evaluation Count:9570
yes
Evaluation Count:24
24-9570
735 wd->subtractOpaqueSiblings(wd->dirty, &hasDirtySiblingsAbove);
executed: wd->subtractOpaqueSiblings(wd->dirty, &hasDirtySiblingsAbove);
Execution Count:9570
9570
736 -
737 if (!wd->isScrolled && !wd->isMoved)
evaluated: !wd->isScrolled
TRUEFALSE
yes
Evaluation Count:8226
yes
Evaluation Count:1368
evaluated: !wd->isMoved
TRUEFALSE
yes
Evaluation Count:8202
yes
Evaluation Count:24
24-8226
738 wd->subtractOpaqueChildren(wd->dirty, w->rect());
executed: wd->subtractOpaqueChildren(wd->dirty, w->rect());
Execution Count:8202
8202
739 -
740 if (wd->dirty.isEmpty()) {
evaluated: wd->dirty.isEmpty()
TRUEFALSE
yes
Evaluation Count:579
yes
Evaluation Count:9015
579-9015
741 resetWidget(w); -
742 continue;
executed: continue;
Execution Count:579
579
743 } -
744 -
745 const QRegion widgetDirty(w != tlw ? wd->dirty.translated(w->mapTo(tlw, QPoint())) -
746 : wd->dirty); -
747 toClean += widgetDirty; -
748 -
749 -
750 if (tlw->d_func()->extra->proxyWidget) {
evaluated: tlw->d_func()->extra->proxyWidget
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:9014
1-9014
751 resetWidget(w); -
752 continue;
executed: continue;
Execution Count:1
1
753 } -
754 -
755 -
756 if (!hasDirtySiblingsAbove && wd->isOpaque && !dirty.intersects(widgetDirty.boundingRect())) {
evaluated: !hasDirtySiblingsAbove
TRUEFALSE
yes
Evaluation Count:8994
yes
Evaluation Count:20
evaluated: wd->isOpaque
TRUEFALSE
yes
Evaluation Count:7481
yes
Evaluation Count:1513
evaluated: !dirty.intersects(widgetDirty.boundingRect())
TRUEFALSE
yes
Evaluation Count:6368
yes
Evaluation Count:1113
20-8994
757 opaqueNonOverlappedWidgets.append(w); -
758 } else {
executed: }
Execution Count:6368
6368
759 resetWidget(w); -
760 dirty += widgetDirty; -
761 }
executed: }
Execution Count:2646
2646
762 } -
763 dirtyWidgets.clear(); -
764 -
765 fullUpdatePending = false; -
766 -
767 if (toClean.isEmpty()) {
evaluated: toClean.isEmpty()
TRUEFALSE
yes
Evaluation Count:299
yes
Evaluation Count:6189
299-6189
768 -
769 -
770 -
771 flush(); -
772 return;
executed: return;
Execution Count:299
299
773 } -
774 -
775 -
776 if (tlw->d_func()->extra->proxyWidget) {
evaluated: tlw->d_func()->extra->proxyWidget
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:6183
6-6183
777 updateStaticContentsSize(); -
778 dirty = QRegion(); -
779 const QVector<QRect> rects(toClean.rects()); -
780 for (int i = 0; i < rects.size(); ++i)
evaluated: i < rects.size()
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:6
6
781 tlw->d_func()->extra->proxyWidget->update(rects.at(i));
executed: tlw->d_func()->extra->proxyWidget->update(rects.at(i));
Execution Count:6
6
782 return;
executed: return;
Execution Count:6
6
783 } -
784 -
785 -
786 BeginPaintInfo beginPaintInfo; -
787 beginPaint(toClean, tlw, store, &beginPaintInfo); -
788 if (beginPaintInfo.nothingToPaint) {
partially evaluated: beginPaintInfo.nothingToPaint
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6183
0-6183
789 for (int i = 0; i < opaqueNonOverlappedWidgets.size(); ++i)
never evaluated: i < opaqueNonOverlappedWidgets.size()
0
790 resetWidget(opaqueNonOverlappedWidgets[i]);
never executed: resetWidget(opaqueNonOverlappedWidgets[i]);
0
791 dirty = QRegion(); -
792 return;
never executed: return;
0
793 } -
794 -
795 -
796 -
797 updateStaticContentsSize(); -
798 const QRegion dirtyCopy(dirty); -
799 dirty = QRegion(); -
800 -
801 -
802 for (int i = 0; i < opaqueNonOverlappedWidgets.size(); ++i) {
evaluated: i < opaqueNonOverlappedWidgets.size()
TRUEFALSE
yes
Evaluation Count:6368
yes
Evaluation Count:6183
6183-6368
803 QWidget *w = opaqueNonOverlappedWidgets[i]; -
804 QWidgetPrivate *wd = w->d_func(); -
805 -
806 int flags = QWidgetPrivate::DrawRecursive; -
807 -
808 if (!wd->isScrolled && !wd->isMoved)
evaluated: !wd->isScrolled
TRUEFALSE
yes
Evaluation Count:5044
yes
Evaluation Count:1324
evaluated: !wd->isMoved
TRUEFALSE
yes
Evaluation Count:5030
yes
Evaluation Count:14
14-5044
809 flags |= QWidgetPrivate::DontDrawOpaqueChildren;
executed: flags |= QWidgetPrivate::DontDrawOpaqueChildren;
Execution Count:5030
5030
810 if (w == tlw)
evaluated: w == tlw
TRUEFALSE
yes
Evaluation Count:987
yes
Evaluation Count:5381
987-5381
811 flags |= QWidgetPrivate::DrawAsRoot;
executed: flags |= QWidgetPrivate::DrawAsRoot;
Execution Count:987
987
812 -
813 QRegion toBePainted(wd->dirty); -
814 resetWidget(w); -
815 -
816 QPoint offset(tlwOffset); -
817 if (w != tlw)
evaluated: w != tlw
TRUEFALSE
yes
Evaluation Count:5381
yes
Evaluation Count:987
987-5381
818 offset += w->mapTo(tlw, QPoint());
executed: offset += w->mapTo(tlw, QPoint());
Execution Count:5381
5381
819 wd->drawWidget(store->paintDevice(), toBePainted, offset, flags, 0, this); -
820 }
executed: }
Execution Count:6368
6368
821 -
822 -
823 if (repaintAllWidgets || !dirtyCopy.isEmpty()) {
evaluated: repaintAllWidgets
TRUEFALSE
yes
Evaluation Count:49
yes
Evaluation Count:6134
evaluated: !dirtyCopy.isEmpty()
TRUEFALSE
yes
Evaluation Count:2976
yes
Evaluation Count:3158
49-6134
824 const int flags = QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawRecursive; -
825 tlw->d_func()->drawWidget(store->paintDevice(), dirtyCopy, tlwOffset, flags, 0, this); -
826 }
executed: }
Execution Count:3025
3025
827 -
828 endPaint(toClean, store, &beginPaintInfo); -
829}
executed: }
Execution Count:6183
6183
830 -
831 -
832 -
833 -
834 -
835 -
836void QWidgetBackingStore::flush(QWidget *widget) -
837{ -
838 if (!dirtyOnScreen.isEmpty()) {
evaluated: !dirtyOnScreen.isEmpty()
TRUEFALSE
yes
Evaluation Count:6183
yes
Evaluation Count:299
299-6183
839 QWidget *target = widget ? widget : tlw;
partially evaluated: widget
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6183
0-6183
840 qt_flush(target, dirtyOnScreen, store, tlw, tlwOffset); -
841 dirtyOnScreen = QRegion(); -
842 }
executed: }
Execution Count:6183
6183
843 -
844 if (!dirtyOnScreenWidgets || dirtyOnScreenWidgets->isEmpty())
evaluated: !dirtyOnScreenWidgets
TRUEFALSE
yes
Evaluation Count:6452
yes
Evaluation Count:30
evaluated: dirtyOnScreenWidgets->isEmpty()
TRUEFALSE
yes
Evaluation Count:14
yes
Evaluation Count:16
14-6452
845 return;
executed: return;
Execution Count:6466
6466
846 -
847 for (int i = 0; i < dirtyOnScreenWidgets->size(); ++i) {
evaluated: i < dirtyOnScreenWidgets->size()
TRUEFALSE
yes
Evaluation Count:23
yes
Evaluation Count:16
16-23
848 QWidget *w = dirtyOnScreenWidgets->at(i); -
849 QWidgetPrivate *wd = w->d_func(); -
850 qt_noop(); -
851 qt_flush(w, *wd->needsFlush, store, tlw, tlwOffset); -
852 *wd->needsFlush = QRegion(); -
853 }
executed: }
Execution Count:23
23
854 dirtyOnScreenWidgets->clear(); -
855}
executed: }
Execution Count:16
16
856 -
857static inline bool discardInvalidateBufferRequest(QWidget *widget, QTLWExtra *tlwExtra) -
858{ -
859 qt_noop(); -
860 if (QApplication::closingDown())
partially evaluated: QApplication::closingDown()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:53479
0-53479
861 return true;
never executed: return true;
0
862 -
863 if (!tlwExtra || tlwExtra->inTopLevelResize || !tlwExtra->backingStore)
evaluated: !tlwExtra
TRUEFALSE
yes
Evaluation Count:10326
yes
Evaluation Count:43153
partially evaluated: tlwExtra->inTopLevelResize
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:43153
evaluated: !tlwExtra->backingStore
TRUEFALSE
yes
Evaluation Count:9684
yes
Evaluation Count:33469
0-43153
864 return true;
executed: return true;
Execution Count:20010
20010
865 -
866 if (!widget->isVisible() || !widget->updatesEnabled())
evaluated: !widget->isVisible()
TRUEFALSE
yes
Evaluation Count:17273
yes
Evaluation Count:16196
evaluated: !widget->updatesEnabled()
TRUEFALSE
yes
Evaluation Count:501
yes
Evaluation Count:15695
501-17273
867 return true;
executed: return true;
Execution Count:17774
17774
868 -
869 return false;
executed: return false;
Execution Count:15695
15695
870} -
871 -
872 -
873 -
874 -
875 -
876void QWidgetPrivate::invalidateBuffer_resizeHelper(const QPoint &oldPos, const QSize &oldSize) -
877{ -
878 QWidget * const q = q_func(); -
879 qt_noop(); -
880 qt_noop(); -
881 -
882 const bool staticContents = q->testAttribute(Qt::WA_StaticContents); -
883 const bool sizeDecreased = (data.crect.width() < oldSize.width())
evaluated: (data.crect.width() < oldSize.width())
TRUEFALSE
yes
Evaluation Count:1065
yes
Evaluation Count:2844
1065-2844
884 || (data.crect.height() < oldSize.height());
evaluated: (data.crect.height() < oldSize.height())
TRUEFALSE
yes
Evaluation Count:1091
yes
Evaluation Count:1753
1091-1753
885 -
886 const QPoint offset(data.crect.x() - oldPos.x(), data.crect.y() - oldPos.y()); -
887 const bool parentAreaExposed = !offset.isNull() || sizeDecreased;
evaluated: !offset.isNull()
TRUEFALSE
yes
Evaluation Count:565
yes
Evaluation Count:3344
evaluated: sizeDecreased
TRUEFALSE
yes
Evaluation Count:1793
yes
Evaluation Count:1551
565-3344
888 const QRect newWidgetRect(q->rect()); -
889 const QRect oldWidgetRect(0, 0, oldSize.width(), oldSize.height()); -
890 -
891 if (!staticContents || graphicsEffect) {
evaluated: !staticContents
TRUEFALSE
yes
Evaluation Count:3903
yes
Evaluation Count:6
partially evaluated: graphicsEffect
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-3903
892 QRegion staticChildren; -
893 QWidgetBackingStore *bs = 0; -
894 if (offset.isNull() && (bs = maybeBackingStore()))
evaluated: offset.isNull()
TRUEFALSE
yes
Evaluation Count:3338
yes
Evaluation Count:565
partially evaluated: (bs = maybeBackingStore())
TRUEFALSE
yes
Evaluation Count:3338
no
Evaluation Count:0
0-3338
895 staticChildren = bs->staticContents(q, oldWidgetRect);
executed: staticChildren = bs->staticContents(q, oldWidgetRect);
Execution Count:3338
3338
896 const bool hasStaticChildren = !staticChildren.isEmpty(); -
897 -
898 if (hasStaticChildren) {
partially evaluated: hasStaticChildren
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3903
0-3903
899 QRegion dirty(newWidgetRect); -
900 dirty -= staticChildren; -
901 invalidateBuffer(dirty); -
902 } else {
never executed: }
0
903 -
904 invalidateBuffer(newWidgetRect); -
905 }
executed: }
Execution Count:3903
3903
906 -
907 if (!parentAreaExposed)
evaluated: !parentAreaExposed
TRUEFALSE
yes
Evaluation Count:1549
yes
Evaluation Count:2354
1549-2354
908 return;
executed: return;
Execution Count:1549
1549
909 -
910 -
911 if (!graphicsEffect && extra && extra->hasMask) {
partially evaluated: !graphicsEffect
TRUEFALSE
yes
Evaluation Count:2354
no
Evaluation Count:0
evaluated: extra
TRUEFALSE
yes
Evaluation Count:1667
yes
Evaluation Count:687
evaluated: extra->hasMask
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:1666
0-2354
912 QRegion parentExpose(extra->mask.translated(oldPos)); -
913 parentExpose &= QRect(oldPos, oldSize); -
914 if (hasStaticChildren)
partially evaluated: hasStaticChildren
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
915 parentExpose -= data.crect;
never executed: parentExpose -= data.crect;
0
916 q->parentWidget()->d_func()->invalidateBuffer(parentExpose); -
917 } else {
executed: }
Execution Count:1
1
918 if (hasStaticChildren && !graphicsEffect) {
partially evaluated: hasStaticChildren
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2353
never evaluated: !graphicsEffect
0-2353
919 QRegion parentExpose(QRect(oldPos, oldSize)); -
920 parentExpose -= data.crect; -
921 q->parentWidget()->d_func()->invalidateBuffer(parentExpose); -
922 } else {
never executed: }
0
923 q->parentWidget()->d_func()->invalidateBuffer(effectiveRectFor(QRect(oldPos, oldSize))); -
924 }
executed: }
Execution Count:2353
2353
925 } -
926 return;
executed: return;
Execution Count:2354
2354
927 } -
928 -
929 -
930 if (!offset.isNull()) {
partially evaluated: !offset.isNull()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-6
931 if (sizeDecreased) {
never evaluated: sizeDecreased
0
932 const QSize minSize(qMin(oldSize.width(), data.crect.width()), -
933 qMin(oldSize.height(), data.crect.height())); -
934 moveRect(QRect(oldPos, minSize), offset.x(), offset.y()); -
935 } else {
never executed: }
0
936 moveRect(QRect(oldPos, oldSize), offset.x(), offset.y()); -
937 }
never executed: }
0
938 } -
939 -
940 -
941 if (!sizeDecreased || !oldWidgetRect.contains(newWidgetRect)) {
evaluated: !sizeDecreased
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:4
evaluated: !oldWidgetRect.contains(newWidgetRect)
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:3
1-4
942 QRegion newVisible(newWidgetRect); -
943 newVisible -= oldWidgetRect; -
944 invalidateBuffer(newVisible); -
945 }
executed: }
Execution Count:3
3
946 -
947 if (!parentAreaExposed)
evaluated: !parentAreaExposed
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:4
2-4
948 return;
executed: return;
Execution Count:2
2
949 -
950 -
951 const QRect oldRect(oldPos, oldSize); -
952 if (extra && extra->hasMask) {
partially evaluated: extra
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
partially evaluated: extra->hasMask
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4
0-4
953 QRegion parentExpose(oldRect); -
954 parentExpose &= extra->mask.translated(oldPos); -
955 parentExpose -= (extra->mask.translated(data.crect.topLeft()) & data.crect); -
956 q->parentWidget()->d_func()->invalidateBuffer(parentExpose); -
957 } else {
never executed: }
0
958 QRegion parentExpose(oldRect); -
959 parentExpose -= data.crect; -
960 q->parentWidget()->d_func()->invalidateBuffer(parentExpose); -
961 }
executed: }
Execution Count:4
4
962} -
963void QWidgetPrivate::invalidateBuffer(const QRegion &rgn) -
964{ -
965 QWidget * const q = q_func(); -
966 -
967 QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData(); -
968 if (discardInvalidateBufferRequest(q, tlwExtra) || rgn.isEmpty())
evaluated: discardInvalidateBufferRequest(q, tlwExtra)
TRUEFALSE
yes
Evaluation Count:1917
yes
Evaluation Count:2558
evaluated: rgn.isEmpty()
TRUEFALSE
yes
Evaluation Count:270
yes
Evaluation Count:2288
270-2558
969 return;
executed: return;
Execution Count:2187
2187
970 -
971 QRegion wrgn(rgn); -
972 wrgn &= clipRect(); -
973 if (!graphicsEffect && extra && extra->hasMask)
partially evaluated: !graphicsEffect
TRUEFALSE
yes
Evaluation Count:2288
no
Evaluation Count:0
evaluated: extra
TRUEFALSE
yes
Evaluation Count:2265
yes
Evaluation Count:23
partially evaluated: extra->hasMask
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2265
0-2288
974 wrgn &= extra->mask;
never executed: wrgn &= extra->mask;
0
975 if (wrgn.isEmpty())
evaluated: wrgn.isEmpty()
TRUEFALSE
yes
Evaluation Count:193
yes
Evaluation Count:2095
193-2095
976 return;
executed: return;
Execution Count:193
193
977 -
978 tlwExtra->backingStoreTracker->markDirty(wrgn, q, false, true); -
979}
executed: }
Execution Count:2095
2095
980void QWidgetPrivate::invalidateBuffer(const QRect &rect) -
981{ -
982 QWidget * const q = q_func(); -
983 -
984 QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData(); -
985 if (discardInvalidateBufferRequest(q, tlwExtra) || rect.isEmpty())
evaluated: discardInvalidateBufferRequest(q, tlwExtra)
TRUEFALSE
yes
Evaluation Count:35867
yes
Evaluation Count:13137
evaluated: rect.isEmpty()
TRUEFALSE
yes
Evaluation Count:382
yes
Evaluation Count:12755
382-35867
986 return;
executed: return;
Execution Count:36249
36249
987 -
988 QRect wRect(rect); -
989 wRect &= clipRect(); -
990 if (wRect.isEmpty())
evaluated: wRect.isEmpty()
TRUEFALSE
yes
Evaluation Count:107
yes
Evaluation Count:12648
107-12648
991 return;
executed: return;
Execution Count:107
107
992 -
993 if (graphicsEffect || !extra || !extra->hasMask) {
partially evaluated: graphicsEffect
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12648
evaluated: !extra
TRUEFALSE
yes
Evaluation Count:2435
yes
Evaluation Count:10213
evaluated: !extra->hasMask
TRUEFALSE
yes
Evaluation Count:10160
yes
Evaluation Count:53
0-12648
994 tlwExtra->backingStoreTracker->markDirty(wRect, q, false, true); -
995 return;
executed: return;
Execution Count:12595
12595
996 } -
997 -
998 QRegion wRgn(extra->mask); -
999 wRgn &= wRect; -
1000 if (wRgn.isEmpty())
partially evaluated: wRgn.isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:53
0-53
1001 return;
never executed: return;
0
1002 -
1003 tlwExtra->backingStoreTracker->markDirty(wRgn, q, false, true); -
1004}
executed: }
Execution Count:53
53
1005 -
1006void QWidgetPrivate::repaint_sys(const QRegion &rgn) -
1007{ -
1008 if (data.in_destructor)
partially evaluated: data.in_destructor
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:13
0-13
1009 return;
never executed: return;
0
1010 -
1011 QWidget * const q = q_func(); -
1012 if (discardSyncRequest(q, maybeTopData()))
evaluated: discardSyncRequest(q, maybeTopData())
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:8
5-8
1013 return;
executed: return;
Execution Count:5
5
1014 -
1015 if (q->testAttribute(Qt::WA_StaticContents)) {
partially evaluated: q->testAttribute(Qt::WA_StaticContents)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
0-8
1016 if (!extra)
never evaluated: !extra
0
1017 createExtra();
never executed: createExtra();
0
1018 extra->staticContentsSize = data.crect.size(); -
1019 }
never executed: }
0
1020 -
1021 QPaintEngine *engine = q->paintEngine(); -
1022 -
1023 -
1024 -
1025 -
1026 const bool noPartialUpdateSupport = (engine && (engine->type() == QPaintEngine::OpenGL
partially evaluated: engine
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
never evaluated: engine->type() == QPaintEngine::OpenGL
0-8
1027 || engine->type() == QPaintEngine::OpenGL2))
never evaluated: engine->type() == QPaintEngine::OpenGL2
0
1028 && (usesDoubleBufferedGLContext || q->autoFillBackground());
never evaluated: usesDoubleBufferedGLContext
never evaluated: q->autoFillBackground()
0
1029 QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn); -
1030 -
1031 -
1032 -
1033 -
1034 -
1035 -
1036 -
1037 toBePainted &= clipRect(); -
1038 clipToEffectiveMask(toBePainted); -
1039 if (toBePainted.isEmpty())
partially evaluated: toBePainted.isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
0-8
1040 return;
never executed: return;
0
1041 -
1042 -
1043 -
1044 -
1045 -
1046 drawWidget(q, toBePainted, QPoint(), QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawPaintOnScreen, 0); -
1047 -
1048 -
1049 -
1050 -
1051 -
1052 -
1053 if (q->paintingActive())
partially evaluated: q->paintingActive()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
0-8
1054 QMessageLogger("kernel/qwidgetbackingstore.cpp", 1335, __PRETTY_FUNCTION__).warning("QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent");
never executed: QMessageLogger("kernel/qwidgetbackingstore.cpp", 1335, __PRETTY_FUNCTION__).warning("QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent");
0
1055}
executed: }
Execution Count:8
8
1056 -
1057 -
1058 -
1059 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial