qwidgetbackingstore.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13extern QRegion qt_dirtyRegion(QWidget *);-
14-
15-
16namespace { namespace Q_QGS_qt_dummy_platformTextureList { typedef QPlatformTextureList Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QPlatformTextureList, Q_QGS_qt_dummy_platformTextureList::innerFunction, Q_QGS_qt_dummy_platformTextureList::guard> qt_dummy_platformTextureList;
0
17-
18-
19-
20-
21-
22-
23-
24void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion &region, QBackingStore *backingStore,-
25 QWidget *tlw, const QPoint &tlwOffset, QPlatformTextureList *widgetTextures,-
26 QWidgetBackingStore *widgetBackingStore)-
27{-
28-
29-
30-
31-
32 ((!(!region.isEmpty() || widgetTextures)) ? qt_assert("!region.isEmpty() || widgetTextures",__FILE__,87) : qt_noop());-
33-
34 ((!(widget)) ? qt_assert("widget",__FILE__,89) : qt_noop());-
35 ((!(backingStore)) ? qt_assert("backingStore",__FILE__,90) : qt_noop());-
36 ((!(tlw)) ? qt_assert("tlw",__FILE__,91) : qt_noop());-
37-
38 static int flushUpdate = qEnvironmentVariableIntValue("QT_FLUSH_UPDATE");-
39 if (flushUpdate > 0
flushUpdate > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
40 QWidgetBackingStore::showYellowThing(widget, region, flushUpdate * 10, false);
never executed: QWidgetBackingStore::showYellowThing(widget, region, flushUpdate * 10, false);
0
41-
42-
43 if (tlw->testAttribute(Qt::WA_DontShowOnScreen)
tlw->testAttri...tShowOnScreen)Description
TRUEnever evaluated
FALSEnever evaluated
|| widget->testAttribute(Qt::WA_DontShowOnScreen)
widget->testAt...tShowOnScreen)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
44 return;
never executed: return;
0
45 static bool fpsDebug = qEnvironmentVariableIntValue("QT_DEBUG_FPS");-
46 if (fpsDebug
fpsDebugDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
47 if (!widgetBackingStore->perfFrames++
!widgetBacking...->perfFrames++Description
TRUEnever evaluated
FALSEnever evaluated
)
0
48 widgetBackingStore->perfTime.start();
never executed: widgetBackingStore->perfTime.start();
0
49 if (widgetBackingStore->perfTime.elapsed() > 5000
widgetBackingS...apsed() > 5000Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
50 double fps = double(widgetBackingStore->perfFrames * 1000) / widgetBackingStore->perfTime.restart();-
51 QMessageLogger(__FILE__, 106, __PRETTY_FUNCTION__).debug("FPS: %.1f\n", fps);-
52 widgetBackingStore->perfFrames = 0;-
53 }
never executed: end of block
0
54 }
never executed: end of block
0
55-
56 QPoint offset = tlwOffset;-
57 if (widget != tlw
widget != tlwDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
58 offset += widget->mapTo(tlw, QPoint());
never executed: offset += widget->mapTo(tlw, QPoint());
0
59-
60 QRegion effectiveRegion = region;-
61-
62 const bool compositionWasActive = widget->d_func()->renderToTextureComposeActive;-
63 if (!widgetTextures
!widgetTexturesDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
64 widget->d_func()->renderToTextureComposeActive = false;-
65-
66-
67-
68-
69 if (compositionWasActive
compositionWasActiveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
70 widgetTextures = qt_dummy_platformTextureList;
never executed: widgetTextures = qt_dummy_platformTextureList;
0
71 }
never executed: end of block
else {
0
72 widget->d_func()->renderToTextureComposeActive = true;-
73 }
never executed: end of block
0
74-
75-
76-
77 if (compositionWasActive != widget->d_func()->renderToTextureComposeActive
compositionWas...eComposeActiveDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
78 effectiveRegion = widget->rect();
never executed: effectiveRegion = widget->rect();
0
79-
80-
81 if (widgetTextures
widgetTexturesDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
82 qt_window_private(tlw->windowHandle())->compositing = true;-
83 widget->window()->d_func()->sendComposeStatus(widget->window(), false);-
84-
85-
86-
87 const bool translucentBackground = widget->testAttribute(Qt::WA_TranslucentBackground);-
88-
89-
90 backingStore->handle()->composeAndFlush(widget->windowHandle(), effectiveRegion, offset, widgetTextures,-
91 tlw->d_func()->shareContext(), translucentBackground);-
92 widget->window()->d_func()->sendComposeStatus(widget->window(), true);-
93 }
never executed: end of block
else
0
94-
95 backingStore->flush(effectiveRegion, widget->windowHandle(), offset);
never executed: backingStore->flush(effectiveRegion, widget->windowHandle(), offset);
0
96}-
97void QWidgetBackingStore::showYellowThing(QWidget *widget, const QRegion &toBePainted, int msec, bool unclipped)-
98{-
99-
100-
101-
102 QRegion paintRegion = toBePainted;-
103 QRect widgetRect = widget->rect();-
104-
105 if (!widget->internalWinId()
!widget->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
106 QWidget *nativeParent = widget->nativeParentWidget();-
107 const QPoint offset = widget->mapTo(nativeParent, QPoint(0, 0));-
108 paintRegion.translate(offset);-
109 widgetRect.translate(offset);-
110 widget = nativeParent;-
111 }
never executed: end of block
0
112-
113-
114-
115-
116-
117-
118 bool paintUnclipped = widget->testAttribute(Qt::WA_PaintUnclipped);-
119 if (unclipped
unclippedDescription
TRUEnever evaluated
FALSEnever evaluated
&& !widget->d_func()->paintOnScreen()
!widget->d_fun...aintOnScreen()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
120 widget->setAttribute(Qt::WA_PaintUnclipped);
never executed: widget->setAttribute(Qt::WA_PaintUnclipped);
0
121-
122 const bool setFlag = !widget->testAttribute(Qt::WA_WState_InPaintEvent);-
123 if (setFlag
setFlagDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
124 widget->setAttribute(Qt::WA_WState_InPaintEvent);
never executed: widget->setAttribute(Qt::WA_WState_InPaintEvent);
0
125-
126-
127 QPaintEngine *pe = widget->paintEngine();-
128 if (pe
peDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
129 pe->setSystemClip(paintRegion);-
130 {-
131 QPainter p(widget);-
132 p.setClipRegion(paintRegion);-
133 static int i = 0;-
134 switch (i) {-
135 case
never executed: case 0:
0:
never executed: case 0:
0
136 p.fillRect(widgetRect, QColor(255,255,0));-
137 break;
never executed: break;
0
138 case
never executed: case 1:
1:
never executed: case 1:
0
139 p.fillRect(widgetRect, QColor(255,200,55));-
140 break;
never executed: break;
0
141 case
never executed: case 2:
2:
never executed: case 2:
0
142 p.fillRect(widgetRect, QColor(200,255,55));-
143 break;
never executed: break;
0
144 case
never executed: case 3:
3:
never executed: case 3:
0
145 p.fillRect(widgetRect, QColor(200,200,0));-
146 break;
never executed: break;
0
147 }-
148 i = (i+1) & 3;-
149 p.end();-
150 }-
151 }
never executed: end of block
0
152-
153 if (setFlag
setFlagDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
154 widget->setAttribute(Qt::WA_WState_InPaintEvent, false);
never executed: widget->setAttribute(Qt::WA_WState_InPaintEvent, false);
0
155-
156-
157 widget->setAttribute(Qt::WA_PaintUnclipped, paintUnclipped);-
158-
159 if (pe
peDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
160 pe->setSystemClip(QRegion());
never executed: pe->setSystemClip(QRegion());
0
161-
162-
163 ::usleep(1000 * msec);-
164-
165-
166}
never executed: end of block
0
167-
168bool QWidgetBackingStore::flushPaint(QWidget *widget, const QRegion &rgn)-
169{-
170 if (!widget
!widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
171 return
never executed: return false;
false;
never executed: return false;
0
172-
173 int delay = 0;-
174 if (widget->testAttribute(Qt::WA_WState_InPaintEvent)
widget->testAt..._InPaintEvent)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
175 static int flushPaintEvent = qEnvironmentVariableIntValue("QT_FLUSH_PAINT_EVENT");-
176 if (!flushPaintEvent
!flushPaintEventDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
177 return
never executed: return false;
false;
never executed: return false;
0
178 delay = flushPaintEvent;-
179 }
never executed: end of block
else {
0
180 static int flushPaint = qEnvironmentVariableIntValue("QT_FLUSH_PAINT");-
181 if (!flushPaint
!flushPaintDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
182 return
never executed: return false;
false;
never executed: return false;
0
183 delay = flushPaint;-
184 }
never executed: end of block
0
185-
186 QWidgetBackingStore::showYellowThing(widget, rgn, delay * 10, true);-
187 return
never executed: return true;
true;
never executed: return true;
0
188}-
189-
190void QWidgetBackingStore::unflushPaint(QWidget *widget, const QRegion &rgn)-
191{-
192 if (widget->d_func()->paintOnScreen()
widget->d_func...aintOnScreen()Description
TRUEnever evaluated
FALSEnever evaluated
|| rgn.isEmpty()
rgn.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
193 return;
never executed: return;
0
194-
195 QWidget *tlw = widget->window();-
196 QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData();-
197 if (!tlwExtra
!tlwExtraDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
198 return;
never executed: return;
0
199-
200 const QPoint offset = widget->mapTo(tlw, QPoint());-
201 qt_flush(widget, rgn, tlwExtra->backingStoreTracker->store, tlw, offset, 0, tlw->d_func()->maybeBackingStore());-
202}
never executed: end of block
0
203-
204-
205-
206-
207-
208-
209bool QWidgetBackingStore::bltRect(const QRect &rect, int dx, int dy, QWidget *widget)-
210{-
211 const QPoint pos(tlwOffset + widget->mapTo(tlw, rect.topLeft()));-
212 const QRect tlwRect(QRect(pos, rect.size()));-
213 if (fullUpdatePending
fullUpdatePendingDescription
TRUEnever evaluated
FALSEnever evaluated
|| dirty.intersects(tlwRect)
dirty.intersects(tlwRect)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
214 return
never executed: return false;
false;
never executed: return false;
0
215 return
never executed: return store->scroll(tlwRect, dx, dy);
store->scroll(tlwRect, dx, dy);
never executed: return store->scroll(tlwRect, dx, dy);
0
216}-
217-
218void QWidgetBackingStore::releaseBuffer()-
219{-
220 if (store
storeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
221 store->resize(QSize());
never executed: store->resize(QSize());
0
222}
never executed: end of block
0
223-
224-
225-
226-
227-
228-
229-
230void QWidgetBackingStore::beginPaint(QRegion &toClean, QWidget *widget, QBackingStore *backingStore,-
231 BeginPaintInfo *returnInfo, bool toCleanIsInTopLevelCoordinates)-
232{-
233 (void)widget;;-
234 (void)toCleanIsInTopLevelCoordinates;;-
235-
236-
237 dirtyOnScreen += toClean;-
238-
239-
240-
241-
242 returnInfo->wasFlushed = QWidgetBackingStore::flushPaint(tlw, toClean);-
243-
244-
245-
246-
247 if (!returnInfo->wasFlushed
!returnInfo->wasFlushedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
248 backingStore->beginPaint(toClean);
never executed: backingStore->beginPaint(toClean);
0
249-
250-
251 (void)returnInfo;;-
252}
never executed: end of block
0
253-
254void QWidgetBackingStore::endPaint(const QRegion &cleaned, QBackingStore *backingStore,-
255 BeginPaintInfo *beginPaintInfo)-
256{-
257-
258 if (!beginPaintInfo->wasFlushed
!beginPaintInfo->wasFlushedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
259 backingStore->endPaint();
never executed: backingStore->endPaint();
0
260 else-
261 QWidgetBackingStore::unflushPaint(tlw, cleaned);
never executed: QWidgetBackingStore::unflushPaint(tlw, cleaned);
0
262-
263-
264-
265-
266-
267-
268 flush();-
269}
never executed: end of block
0
270-
271-
272-
273-
274-
275-
276-
277QRegion QWidgetBackingStore::dirtyRegion(QWidget *widget) const-
278{-
279 const bool widgetDirty = widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& widget != tlw
widget != tlwDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
280 const QRect tlwRect(topLevelRect());-
281 const QRect surfaceGeometry(tlwRect.topLeft(), store->size());-
282 if (fullUpdatePending
fullUpdatePendingDescription
TRUEnever evaluated
FALSEnever evaluated
|| (surfaceGeometry != tlwRect
surfaceGeometry != tlwRectDescription
TRUEnever evaluated
FALSEnever evaluated
&& surfaceGeometry.size() != tlwRect.size()
surfaceGeometr...tlwRect.size()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
283 if (widgetDirty
widgetDirtyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
284 const QRect dirtyTlwRect = QRect(QPoint(), tlwRect.size());-
285 const QPoint offset(widget->mapTo(tlw, QPoint()));-
286 const QRect dirtyWidgetRect(dirtyTlwRect & widget->rect().translated(offset));-
287 return
never executed: return dirtyWidgetRect.translated(-offset);
dirtyWidgetRect.translated(-offset);
never executed: return dirtyWidgetRect.translated(-offset);
0
288 }-
289 return
never executed: return QRect(QPoint(), tlwRect.size());
QRect(QPoint(), tlwRect.size());
never executed: return QRect(QPoint(), tlwRect.size());
0
290 }-
291-
292-
293 QRegion r(dirty);-
294 for (int i = 0; i < dirtyWidgets.size()
i < dirtyWidgets.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
295 QWidget *w = dirtyWidgets.at(i);-
296 if (widgetDirty
widgetDirtyDescription
TRUEnever evaluated
FALSEnever evaluated
&& w != widget
w != widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& !widget->isAncestorOf(w)
!widget->isAncestorOf(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
297 continue;
never executed: continue;
0
298 r += w->d_func()->dirty.translated(w->mapTo(tlw, QPoint()));-
299 }
never executed: end of block
0
300-
301-
302 r += dirtyOnScreen;-
303-
304 if (dirtyOnScreenWidgets
dirtyOnScreenWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
305 for (int i = 0; i < dirtyOnScreenWidgets->size()
i < dirtyOnScr...idgets->size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
306 QWidget *w = dirtyOnScreenWidgets->at(i);-
307 if (widgetDirty
widgetDirtyDescription
TRUEnever evaluated
FALSEnever evaluated
&& w != widget
w != widgetDescription
TRUEnever evaluated
FALSEnever evaluated
&& !widget->isAncestorOf(w)
!widget->isAncestorOf(w)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
308 continue;
never executed: continue;
0
309 QWidgetPrivate *wd = w->d_func();-
310 ((!(wd->needsFlush)) ? qt_assert("wd->needsFlush",__FILE__,409) : qt_noop());-
311 r += wd->needsFlush->translated(w->mapTo(tlw, QPoint()));-
312 }
never executed: end of block
0
313 }
never executed: end of block
0
314-
315 if (widgetDirty
widgetDirtyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
316-
317 const QPoint offset(widget->mapTo(tlw, QPoint()));-
318 r &= widget->rect().translated(offset);-
319 r.translate(-offset);-
320 }
never executed: end of block
0
321 return
never executed: return r;
r;
never executed: return r;
0
322}-
323-
324-
325-
326-
327-
328-
329QRegion QWidgetBackingStore::staticContents(QWidget *parent, const QRect &withinClipRect) const-
330{-
331 if (!parent
!parentDescription
TRUEnever evaluated
FALSEnever evaluated
&& tlw->testAttribute(Qt::WA_StaticContents)
tlw->testAttri...taticContents)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
332 const QSize surfaceGeometry(store->size());-
333 QRect surfaceRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height());-
334 if (!withinClipRect.isEmpty()
!withinClipRect.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
335 surfaceRect &= withinClipRect;
never executed: surfaceRect &= withinClipRect;
0
336 return
never executed: return QRegion(surfaceRect);
QRegion(surfaceRect);
never executed: return QRegion(surfaceRect);
0
337 }-
338-
339 QRegion region;-
340 if (parent
parentDescription
TRUEnever evaluated
FALSEnever evaluated
&& parent->d_func()->children.isEmpty()
parent->d_func...dren.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
341 return
never executed: return region;
region;
never executed: return region;
0
342-
343 const bool clipToRect = !withinClipRect.isEmpty();-
344 const int count = staticWidgets.count();-
345 for (int i = 0; i < count
i < countDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
346 QWidget *w = staticWidgets.at(i);-
347 QWidgetPrivate *wd = w->d_func();-
348 if (!wd->isOpaque
!wd->isOpaqueDescription
TRUEnever evaluated
FALSEnever evaluated
|| !wd->extra
!wd->extraDescription
TRUEnever evaluated
FALSEnever evaluated
|| wd->extra->staticContentsSize.isEmpty()
wd->extra->sta...Size.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
349 || !w->isVisible()
!w->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
|| (parent
parentDescription
TRUEnever evaluated
FALSEnever evaluated
&& !parent->isAncestorOf(w)
!parent->isAncestorOf(w)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
350 continue;
never executed: continue;
0
351 }-
352-
353 QRect rect(0, 0, wd->extra->staticContentsSize.width(), wd->extra->staticContentsSize.height());-
354 const QPoint offset = w->mapTo(parent ? parent : tlw, QPoint());-
355 if (clipToRect
clipToRectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
356 rect &= withinClipRect.translated(-offset);
never executed: rect &= withinClipRect.translated(-offset);
0
357 if (rect.isEmpty()
rect.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
358 continue;
never executed: continue;
0
359-
360 rect &= wd->clipRect();-
361 if (rect.isEmpty()
rect.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
362 continue;
never executed: continue;
0
363-
364 QRegion visible(rect);-
365 wd->clipToEffectiveMask(visible);-
366 if (visible.isEmpty()
visible.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
367 continue;
never executed: continue;
0
368 wd->subtractOpaqueSiblings(visible, 0, true);-
369-
370 visible.translate(offset);-
371 region += visible;-
372 }
never executed: end of block
0
373-
374 return
never executed: return region;
region;
never executed: return region;
0
375}-
376-
377void QWidgetBackingStore::sendUpdateRequest(QWidget *widget, UpdateTime updateTime)-
378{-
379 if (!widget
!widgetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
380 return;
never executed: return;
0
381-
382-
383-
384-
385-
386-
387 QWidget *w = widget->window();-
388 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
&& w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& w->windowHandle()
w->windowHandle()Description
TRUEnever evaluated
FALSEnever evaluated
&& QWindowPrivate::get(w->windowHandle())->compositing
QWindowPrivate...)->compositingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
389 int refresh = 60;-
390 QScreen *ws = w->windowHandle()->screen();-
391 if (ws
wsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
392 refresh = ws->refreshRate();
never executed: refresh = ws->refreshRate();
0
393 QWindowPrivate *wd = QWindowPrivate::get(w->windowHandle());-
394 if (wd->lastComposeTime.isValid()
wd->lastComposeTime.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
395 const qint64 elapsed = wd->lastComposeTime.elapsed();-
396 if (elapsed <= qint64(1000.0f / refresh)
elapsed <= qin....0f / refresh)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
397 updateTime = UpdateLater;
never executed: updateTime = UpdateLater;
0
398 }
never executed: end of block
0
399 }
never executed: end of block
0
400-
401-
402 switch (updateTime) {-
403 case
never executed: case UpdateLater:
UpdateLater:
never executed: case UpdateLater:
0
404 updateRequestSent = true;-
405 QApplication::postEvent(widget, new QEvent(QEvent::UpdateRequest), Qt::LowEventPriority);-
406 break;
never executed: break;
0
407 case
never executed: case UpdateNow:
UpdateNow:
never executed: case UpdateNow:
{
0
408 QEvent event(QEvent::UpdateRequest);-
409 QApplication::sendEvent(widget, &event);-
410 break;
never executed: break;
0
411 }-
412 }-
413}
never executed: end of block
0
414void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget,-
415 UpdateTime updateTime, BufferState bufferState)-
416{-
417 ((!(tlw->d_func()->extra)) ? qt_assert("tlw->d_func()->extra",__FILE__,530) : qt_noop());-
418 ((!(tlw->d_func()->extra->topextra)) ? qt_assert("tlw->d_func()->extra->topextra",__FILE__,531) : qt_noop());-
419 ((!(!tlw->d_func()->extra->topextra->inTopLevelResize)) ? qt_assert("!tlw->d_func()->extra->topextra->inTopLevelResize",__FILE__,532) : qt_noop());-
420 ((!(widget->isVisible() && widget->updatesEnabled())) ? qt_assert("widget->isVisible() && widget->updatesEnabled()",__FILE__,533) : qt_noop());-
421 ((!(widget->window() == tlw)) ? qt_assert("widget->window() == tlw",__FILE__,534) : qt_noop());-
422 ((!(!rgn.isEmpty())) ? qt_assert("!rgn.isEmpty()",__FILE__,535) : qt_noop());-
423-
424-
425 widget->d_func()->invalidateGraphicsEffectsRecursively();-
426-
427-
428 if (widget->d_func()->paintOnScreen()
widget->d_func...aintOnScreen()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
429 if (widget->d_func()->dirty.isEmpty()
widget->d_func...irty.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
430 widget->d_func()->dirty = rgn;-
431 sendUpdateRequest(widget, updateTime);-
432 return;
never executed: return;
0
433 } else if (qt_region_strictContains(widget->d_func()->dirty, widget->rect())
qt_region_stri...idget->rect())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
434 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
435 sendUpdateRequest(widget, updateTime);
never executed: sendUpdateRequest(widget, updateTime);
0
436 return;
never executed: return;
0
437 }-
438-
439 const bool eventAlreadyPosted = !widget->d_func()->dirty.isEmpty();-
440 widget->d_func()->dirty += rgn;-
441 if (!eventAlreadyPosted
!eventAlreadyPostedDescription
TRUEnever evaluated
FALSEnever evaluated
|| updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
442 sendUpdateRequest(widget, updateTime);
never executed: sendUpdateRequest(widget, updateTime);
0
443 return;
never executed: return;
0
444 }-
445-
446-
447 if (fullUpdatePending
fullUpdatePendingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
448 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
449 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
450 return;
never executed: return;
0
451 }-
452-
453 const QPoint offset = widget->mapTo(tlw, QPoint());-
454-
455 if (QWidgetPrivate::get(widget)->renderToTexture
QWidgetPrivate...enderToTextureDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
456 if (!widget->d_func()->inDirtyList
!widget->d_func()->inDirtyListDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
457 addDirtyRenderToTextureWidget(widget);
never executed: addDirtyRenderToTextureWidget(widget);
0
458 if (!updateRequestSent
!updateRequestSentDescription
TRUEnever evaluated
FALSEnever evaluated
|| updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
459 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
460 return;
never executed: return;
0
461 }-
462-
463 const QRect widgetRect = widget->d_func()->effectiveRectFor(widget->rect());-
464 if (qt_region_strictContains(dirty, widgetRect.translated(offset))
qt_region_stri...lated(offset))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
465 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
466 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
467 return;
never executed: return;
0
468 }-
469-
470 if (bufferState == BufferInvalid
bufferState == BufferInvalidDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
471 const bool eventAlreadyPosted = !dirty.isEmpty()
!dirty.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| updateRequestSent
updateRequestSentDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
472-
473 if (widget->d_func()->graphicsEffect
widget->d_func...graphicsEffectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
474 dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect()).translated(offset);
never executed: dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect()).translated(offset);
0
475 else-
476-
477 dirty += rgn.translated(offset);
never executed: dirty += rgn.translated(offset);
0
478 if (!eventAlreadyPosted
!eventAlreadyPostedDescription
TRUEnever evaluated
FALSEnever evaluated
|| updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
479 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
480 return;
never executed: return;
0
481 }-
482-
483 if (dirtyWidgets.isEmpty()
dirtyWidgets.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
484 addDirtyWidget(widget, rgn);-
485 sendUpdateRequest(tlw, updateTime);-
486 return;
never executed: return;
0
487 }-
488-
489 if (widget->d_func()->inDirtyList
widget->d_func()->inDirtyListDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
490 if (!qt_region_strictContains(widget->d_func()->dirty, widgetRect)
!qt_region_str...y, widgetRect)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
491-
492 if (widget->d_func()->graphicsEffect
widget->d_func...graphicsEffectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
493 widget->d_func()->dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect());
never executed: widget->d_func()->dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect());
0
494 else-
495-
496 widget->d_func()->dirty += rgn;
never executed: widget->d_func()->dirty += rgn;
0
497 }-
498 }
never executed: end of block
else {
0
499 addDirtyWidget(widget, rgn);-
500 }
never executed: end of block
0
501-
502 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
503 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
504}
never executed: end of block
0
505void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget,-
506 UpdateTime updateTime, BufferState bufferState)-
507{-
508 ((!(tlw->d_func()->extra)) ? qt_assert("tlw->d_func()->extra",__FILE__,629) : qt_noop());-
509 ((!(tlw->d_func()->extra->topextra)) ? qt_assert("tlw->d_func()->extra->topextra",__FILE__,630) : qt_noop());-
510 ((!(!tlw->d_func()->extra->topextra->inTopLevelResize)) ? qt_assert("!tlw->d_func()->extra->topextra->inTopLevelResize",__FILE__,631) : qt_noop());-
511 ((!(widget->isVisible() && widget->updatesEnabled())) ? qt_assert("widget->isVisible() && widget->updatesEnabled()",__FILE__,632) : qt_noop());-
512 ((!(widget->window() == tlw)) ? qt_assert("widget->window() == tlw",__FILE__,633) : qt_noop());-
513 ((!(!rect.isEmpty())) ? qt_assert("!rect.isEmpty()",__FILE__,634) : qt_noop());-
514-
515-
516 widget->d_func()->invalidateGraphicsEffectsRecursively();-
517-
518-
519 if (widget->d_func()->paintOnScreen()
widget->d_func...aintOnScreen()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
520 if (widget->d_func()->dirty.isEmpty()
widget->d_func...irty.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
521 widget->d_func()->dirty = QRegion(rect);-
522 sendUpdateRequest(widget, updateTime);-
523 return;
never executed: return;
0
524 } else if (qt_region_strictContains(widget->d_func()->dirty, rect)
qt_region_stri...->dirty, rect)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
525 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
526 sendUpdateRequest(widget, updateTime);
never executed: sendUpdateRequest(widget, updateTime);
0
527 return;
never executed: return;
0
528 }-
529-
530 const bool eventAlreadyPosted = !widget->d_func()->dirty.isEmpty();-
531 widget->d_func()->dirty += rect;-
532 if (!eventAlreadyPosted
!eventAlreadyPostedDescription
TRUEnever evaluated
FALSEnever evaluated
|| updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
533 sendUpdateRequest(widget, updateTime);
never executed: sendUpdateRequest(widget, updateTime);
0
534 return;
never executed: return;
0
535 }-
536-
537 if (fullUpdatePending
fullUpdatePendingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
538 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
539 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
540 return;
never executed: return;
0
541 }-
542-
543 if (QWidgetPrivate::get(widget)->renderToTexture
QWidgetPrivate...enderToTextureDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
544 if (!widget->d_func()->inDirtyList
!widget->d_func()->inDirtyListDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
545 addDirtyRenderToTextureWidget(widget);
never executed: addDirtyRenderToTextureWidget(widget);
0
546 if (!updateRequestSent
!updateRequestSentDescription
TRUEnever evaluated
FALSEnever evaluated
|| updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
547 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
548 return;
never executed: return;
0
549 }-
550-
551-
552 const QRect widgetRect = widget->d_func()->effectiveRectFor(rect);-
553 QRect translatedRect = widgetRect;-
554 if (widget != tlw
widget != tlwDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
555 translatedRect.translate(widget->mapTo(tlw, QPoint()));
never executed: translatedRect.translate(widget->mapTo(tlw, QPoint()));
0
556-
557 translatedRect = translatedRect.intersected(QRect(QPoint(), tlw->size()));-
558 if (qt_region_strictContains(dirty, translatedRect)
qt_region_stri...ranslatedRect)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
559 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
560 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
561 return;
never executed: return;
0
562 }-
563-
564 if (bufferState == BufferInvalid
bufferState == BufferInvalidDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
565 const bool eventAlreadyPosted = !dirty.isEmpty();-
566 dirty += translatedRect;-
567 if (!eventAlreadyPosted
!eventAlreadyPostedDescription
TRUEnever evaluated
FALSEnever evaluated
|| updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
568 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
569 return;
never executed: return;
0
570 }-
571-
572 if (dirtyWidgets.isEmpty()
dirtyWidgets.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
573 addDirtyWidget(widget, rect);-
574 sendUpdateRequest(tlw, updateTime);-
575 return;
never executed: return;
0
576 }-
577-
578 if (widget->d_func()->inDirtyList
widget->d_func()->inDirtyListDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
579 if (!qt_region_strictContains(widget->d_func()->dirty, widgetRect)
!qt_region_str...y, widgetRect)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
580 widget->d_func()->dirty += widgetRect;
never executed: widget->d_func()->dirty += widgetRect;
0
581 }
never executed: end of block
else {
0
582 addDirtyWidget(widget, rect);-
583 }
never executed: end of block
0
584-
585 if (updateTime == UpdateNow
updateTime == UpdateNowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
586 sendUpdateRequest(tlw, updateTime);
never executed: sendUpdateRequest(tlw, updateTime);
0
587}
never executed: end of block
0
588-
589-
590-
591-
592-
593-
594-
595void QWidgetBackingStore::markDirtyOnScreen(const QRegion &region, QWidget *widget, const QPoint &topLevelOffset)-
596{-
597 if (!widget
!widgetDescription
TRUEnever evaluated
FALSEnever evaluated
|| widget->d_func()->paintOnScreen()
widget->d_func...aintOnScreen()Description
TRUEnever evaluated
FALSEnever evaluated
|| region.isEmpty()
region.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
598 return;
never executed: return;
0
599 if (widget == tlw
widget == tlwDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
600 if (!widget->testAttribute(Qt::WA_WState_InPaintEvent)
!widget->testA..._InPaintEvent)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
601 dirtyOnScreen += region;
never executed: dirtyOnScreen += region;
0
602 return;
never executed: return;
0
603 }-
604-
605-
606 if (!widget->internalWinId()
!widget->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
&& !widget->isWindow()
!widget->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
607 QWidget *nativeParent = widget->nativeParentWidget();-
608 if (nativeParent == tlw
nativeParent == tlwDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
609 if (!widget->testAttribute(Qt::WA_WState_InPaintEvent)
!widget->testA..._InPaintEvent)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
610 dirtyOnScreen += region.translated(topLevelOffset);
never executed: dirtyOnScreen += region.translated(topLevelOffset);
0
611 return;
never executed: return;
0
612 }-
613-
614-
615 QWidgetPrivate *nativeParentPrivate = nativeParent->d_func();-
616 if (!nativeParentPrivate->needsFlush
!nativeParentP...te->needsFlushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
617 nativeParentPrivate->needsFlush = new QRegion;
never executed: nativeParentPrivate->needsFlush = new QRegion;
0
618 const QPoint nativeParentOffset = widget->mapTo(nativeParent, QPoint());-
619 *nativeParentPrivate->needsFlush += region.translated(nativeParentOffset);-
620 appendDirtyOnScreenWidget(nativeParent);-
621 return;
never executed: return;
0
622 }-
623-
624-
625 QWidgetPrivate *widgetPrivate = widget->d_func();-
626 if (!widgetPrivate->needsFlush
!widgetPrivate->needsFlushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
627 widgetPrivate->needsFlush = new QRegion;
never executed: widgetPrivate->needsFlush = new QRegion;
0
628 *widgetPrivate->needsFlush += region;-
629 appendDirtyOnScreenWidget(widget);-
630}
never executed: end of block
0
631-
632void QWidgetBackingStore::removeDirtyWidget(QWidget *w)-
633{-
634 if (!w
!wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
635 return;
never executed: return;
0
636-
637 dirtyWidgetsRemoveAll(w);-
638 dirtyOnScreenWidgetsRemoveAll(w);-
639 dirtyRenderToTextureWidgets.removeAll(w);-
640 resetWidget(w);-
641-
642 QWidgetPrivate *wd = w->d_func();-
643 const int n = wd->children.count();-
644 for (int i = 0; i < n
i < nDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
645 if (QWidget *child = qobject_cast<QWidget*>(wd->children.at(i))
QWidget *child...hildren.at(i))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
646 removeDirtyWidget(child);
never executed: removeDirtyWidget(child);
0
647 }
never executed: end of block
0
648}
never executed: end of block
0
649-
650void QWidgetBackingStore::updateLists(QWidget *cur)-
651{-
652 if (!cur
!curDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
653 return;
never executed: return;
0
654-
655 QList<QObject*> children = cur->children();-
656 for (int i = 0; i < children.size()
i < children.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
657 QWidget *child = qobject_cast<QWidget*>(children.at(i));-
658 if (!child
!childDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
659 continue;
never executed: continue;
0
660-
661 updateLists(child);-
662 }
never executed: end of block
0
663-
664 if (cur->testAttribute(Qt::WA_StaticContents)
cur->testAttri...taticContents)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
665 addStaticWidget(cur);
never executed: addStaticWidget(cur);
0
666}
never executed: end of block
0
667-
668QWidgetBackingStore::QWidgetBackingStore(QWidget *topLevel)-
669 : tlw(topLevel),-
670 dirtyOnScreenWidgets(0),-
671 fullUpdatePending(0),-
672 updateRequestSent(0),-
673 textureListWatcher(0),-
674 perfFrames(0)-
675{-
676 store = tlw->backingStore();-
677 ((!(store)) ? qt_assert("store",__FILE__,806) : qt_noop());-
678-
679-
680 updateLists(topLevel);-
681}
never executed: end of block
0
682-
683QWidgetBackingStore::~QWidgetBackingStore()-
684{-
685 for (int c = 0; c < dirtyWidgets.size()
c < dirtyWidgets.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++c)
0
686 resetWidget(dirtyWidgets.at(c));
never executed: resetWidget(dirtyWidgets.at(c));
0
687 for (int c = 0; c < dirtyRenderToTextureWidgets.size()
c < dirtyRende...Widgets.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++c)
0
688 resetWidget(dirtyRenderToTextureWidgets.at(c));
never executed: resetWidget(dirtyRenderToTextureWidgets.at(c));
0
689-
690 delete dirtyOnScreenWidgets;-
691}
never executed: end of block
0
692-
693-
694-
695void QWidgetPrivate::moveRect(const QRect &rect, int dx, int dy)-
696{-
697 QWidget * const q = q_func();-
698 if (!q->isVisible()
!q->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
|| (dx == 0
dx == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& dy == 0
dy == 0Description
TRUEnever evaluated
FALSEnever evaluated
))
0
699 return;
never executed: return;
0
700-
701 QWidget *tlw = q->window();-
702 QTLWExtra* x = tlw->d_func()->topData();-
703 if (x->inTopLevelResize
x->inTopLevelResizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
704 return;
never executed: return;
0
705-
706 static const bool accelEnv = qEnvironmentVariableIntValue("QT_NO_FAST_MOVE") == 0;-
707-
708 QWidget *pw = q->parentWidget();-
709 QPoint toplevelOffset = pw->mapTo(tlw, QPoint());-
710 QWidgetPrivate *pd = pw->d_func();-
711 QRect clipR(pd->clipRect());-
712 const QRect newRect(rect.translated(dx, dy));-
713 QRect destRect = rect.intersected(clipR);-
714 if (destRect.isValid()
destRect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
715 destRect = destRect.translated(dx, dy).intersected(clipR);
never executed: destRect = destRect.translated(dx, dy).intersected(clipR);
0
716 const QRect sourceRect(destRect.translated(-dx, -dy));-
717 const QRect parentRect(rect & clipR);-
718 const bool nativeWithTextureChild = textureChildSeen
textureChildSeenDescription
TRUEnever evaluated
FALSEnever evaluated
&& q->internalWinId()
q->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
719-
720 bool accelerateMove = accelEnv
accelEnvDescription
TRUEnever evaluated
FALSEnever evaluated
&& isOpaque
isOpaqueDescription
TRUEnever evaluated
FALSEnever evaluated
&& !nativeWithTextureChild
!nativeWithTextureChildDescription
TRUEnever evaluated
FALSEnever evaluated
0
721-
722-
723 && !tlw->d_func()->extra->proxyWidget
!tlw->d_func()...a->proxyWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
0
724-
725 && !isOverlapped(sourceRect)
!isOverlapped(sourceRect)Description
TRUEnever evaluated
FALSEnever evaluated
&& !isOverlapped(destRect)
!isOverlapped(destRect)Description
TRUEnever evaluated
FALSEnever evaluated
;
0
726-
727 if (!accelerateMove
!accelerateMoveDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
728 QRegion parentR(effectiveRectFor(parentRect));-
729 if (!extra
!extraDescription
TRUEnever evaluated
FALSEnever evaluated
|| !extra->hasMask
!extra->hasMaskDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
730 parentR -= newRect;-
731 }
never executed: end of block
else {
0
732-
733 parentR += newRect & clipR;-
734 }
never executed: end of block
0
735 pd->invalidateBuffer(parentR);-
736 invalidateBuffer((newRect & clipR).translated(-data.crect.topLeft()));-
737 }
never executed: end of block
else {
0
738-
739 QWidgetBackingStore *wbs = x->backingStoreTracker.data();-
740 QRegion childExpose(newRect & clipR);-
741-
742 if (sourceRect.isValid()
sourceRect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& wbs->bltRect(sourceRect, dx, dy, pw)
wbs->bltRect(s...t, dx, dy, pw)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
743 childExpose -= destRect;
never executed: childExpose -= destRect;
0
744-
745 if (!pw->updatesEnabled()
!pw->updatesEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
746 return;
never executed: return;
0
747-
748 const bool childUpdatesEnabled = q->updatesEnabled();-
749 if (childUpdatesEnabled
childUpdatesEnabledDescription
TRUEnever evaluated
FALSEnever evaluated
&& !childExpose.isEmpty()
!childExpose.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
750 childExpose.translate(-data.crect.topLeft());-
751 wbs->markDirty(childExpose, q);-
752 isMoved = true;-
753 }
never executed: end of block
0
754-
755 QRegion parentExpose(parentRect);-
756 parentExpose -= newRect;-
757 if (extra
extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& extra->hasMask
extra->hasMaskDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
758 parentExpose += QRegion(newRect) - extra->mask.translated(data.crect.topLeft());
never executed: parentExpose += QRegion(newRect) - extra->mask.translated(data.crect.topLeft());
0
759-
760 if (!parentExpose.isEmpty()
!parentExpose.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
761 wbs->markDirty(parentExpose, pw);-
762 pd->isMoved = true;-
763 }
never executed: end of block
0
764-
765 if (childUpdatesEnabled
childUpdatesEnabledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
766 QRegion needsFlush(sourceRect);-
767 needsFlush += destRect;-
768 wbs->markDirtyOnScreen(needsFlush, pw, toplevelOffset);-
769 }
never executed: end of block
0
770 }
never executed: end of block
0
771}-
772-
773-
774void QWidgetPrivate::scrollRect(const QRect &rect, int dx, int dy)-
775{-
776 QWidget * const q = q_func();-
777 QWidget *tlw = q->window();-
778 QTLWExtra* x = tlw->d_func()->topData();-
779 if (x->inTopLevelResize
x->inTopLevelResizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
780 return;
never executed: return;
0
781-
782 QWidgetBackingStore *wbs = x->backingStoreTracker.data();-
783 if (!wbs
!wbsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
784 return;
never executed: return;
0
785-
786 static const bool accelEnv = qEnvironmentVariableIntValue("QT_NO_FAST_SCROLL") == 0;-
787-
788 QRect scrollRect = rect & clipRect();-
789 bool overlapped = false;-
790 bool accelerateScroll = accelEnv
accelEnvDescription
TRUEnever evaluated
FALSEnever evaluated
&& isOpaque
isOpaqueDescription
TRUEnever evaluated
FALSEnever evaluated
&& !q_func()->testAttribute(Qt::WA_WState_InPaintEvent)
!q_func()->tes..._InPaintEvent)Description
TRUEnever evaluated
FALSEnever evaluated
0
791 && !(overlapped = isOverlapped(scrollRect.translated(data.crect.topLeft())))
!(overlapped =...t.topLeft())))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
792-
793 if (!accelerateScroll
!accelerateScrollDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
794 if (overlapped
overlappedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
795 QRegion region(scrollRect);-
796 subtractOpaqueSiblings(region);-
797 invalidateBuffer(region);-
798 }
never executed: end of block
else {
0
799 invalidateBuffer(scrollRect);-
800 }
never executed: end of block
0
801 } else {-
802 const QPoint toplevelOffset = q->mapTo(tlw, QPoint());-
803 const QRect destRect = scrollRect.translated(dx, dy) & scrollRect;-
804 const QRect sourceRect = destRect.translated(-dx, -dy);-
805-
806 QRegion childExpose(scrollRect);-
807 if (sourceRect.isValid()
sourceRect.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
808 if (wbs->bltRect(sourceRect, dx, dy, q)
wbs->bltRect(s...ct, dx, dy, q)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
809 childExpose -= destRect;
never executed: childExpose -= destRect;
0
810 }
never executed: end of block
0
811-
812 if (inDirtyList
inDirtyListDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
813 if (rect == q->rect()
rect == q->rect()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
814 dirty.translate(dx, dy);-
815 }
never executed: end of block
else {
0
816 QRegion dirtyScrollRegion = dirty.intersected(scrollRect);-
817 if (!dirtyScrollRegion.isEmpty()
!dirtyScrollRegion.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
818 dirty -= dirtyScrollRegion;-
819 dirtyScrollRegion.translate(dx, dy);-
820 dirty += dirtyScrollRegion;-
821 }
never executed: end of block
0
822 }
never executed: end of block
0
823 }-
824-
825 if (!q->updatesEnabled()
!q->updatesEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
826 return;
never executed: return;
0
827-
828 if (!childExpose.isEmpty()
!childExpose.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
829 wbs->markDirty(childExpose, q);-
830 isScrolled = true;-
831 }
never executed: end of block
0
832-
833-
834-
835-
836 wbs->markDirtyOnScreen(destRect, q, toplevelOffset);-
837 }
never executed: end of block
0
838}-
839-
840-
841static void findTextureWidgetsRecursively(QWidget *tlw, QWidget *widget, QPlatformTextureList *widgetTextures, QVector<QWidget *> *nativeChildren)-
842{-
843 QWidgetPrivate *wd = QWidgetPrivate::get(widget);-
844 if (wd->renderToTexture
wd->renderToTextureDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
845 QPlatformTextureList::Flags flags = 0;-
846 if (widget->testAttribute(Qt::WA_AlwaysStackOnTop)
widget->testAt...aysStackOnTop)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
847 flags |= QPlatformTextureList::StacksOnTop;
never executed: flags |= QPlatformTextureList::StacksOnTop;
0
848 const QRect rect(widget->mapTo(tlw, QPoint()), widget->size());-
849 widgetTextures->appendTexture(widget, wd->textureId(), rect, wd->clipRect(), flags);-
850 }
never executed: end of block
0
851-
852 for (int i = 0; i < wd->children.size()
i < wd->children.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
853 QWidget *w = qobject_cast<QWidget *>(wd->children.at(i));-
854-
855 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& !w->isWindow()
!w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->internalWinId()
w->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
856 nativeChildren->append(w);
never executed: nativeChildren->append(w);
0
857 if (w
wDescription
TRUEnever evaluated
FALSEnever evaluated
&& !w->isWindow()
!w->isWindow()Description
TRUEnever evaluated
FALSEnever evaluated
&& !w->internalWinId()
!w->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
&& !w->isHidden()
!w->isHidden()Description
TRUEnever evaluated
FALSEnever evaluated
&& QWidgetPrivate::get(w)->textureChildSeen
QWidgetPrivate...xtureChildSeenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
858 findTextureWidgetsRecursively(tlw, w, widgetTextures, nativeChildren);
never executed: findTextureWidgetsRecursively(tlw, w, widgetTextures, nativeChildren);
0
859 }
never executed: end of block
0
860}
never executed: end of block
0
861-
862static void findAllTextureWidgetsRecursively(QWidget *tlw, QWidget *widget)-
863{-
864-
865 if (QWidgetPrivate::get(widget)->textureChildSeen
QWidgetPrivate...xtureChildSeenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
866 QVector<QWidget *> nativeChildren;-
867 QScopedPointer<QPlatformTextureList> tl(new QPlatformTextureList);-
868-
869-
870 findTextureWidgetsRecursively(tlw, widget, tl.data(), &nativeChildren);-
871-
872 if (!tl->isEmpty()
!tl->isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
873 QWidgetPrivate::get(tlw)->topData()->widgetTextures.append(tl.take());
never executed: QWidgetPrivate::get(tlw)->topData()->widgetTextures.append(tl.take());
0
874-
875 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(nativeChildren)>::type> _container_((nativeChildren)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QWidget *ncw = *_container_.i; _container_.control; _container_.control = 0) {-
876 if (QWidgetPrivate::get(ncw)->textureChildSeen
QWidgetPrivate...xtureChildSeenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
877 findAllTextureWidgetsRecursively(tlw, ncw);
never executed: findAllTextureWidgetsRecursively(tlw, ncw);
0
878 }
never executed: end of block
0
879 }
never executed: end of block
0
880}
never executed: end of block
0
881-
882static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget)-
883{-
884 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(QWidgetPrivate::get(tlw)->topData()->widgetTextures)>::type> _container_((QWidgetPrivate::get(tlw)->topData()->widgetTextures)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QPlatformTextureList *tl = *_container_.i; _container_.control; _container_.control = 0) {-
885 ((!(!tl->isEmpty())) ? qt_assert("!tl->isEmpty()",__FILE__,1014) : qt_noop());-
886 for (int i = 0; i < tl->count()
i < tl->count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
887 QWidget *w = static_cast<QWidget *>(tl->source(i));-
888 if ((w->internalWinId()
w->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
&& w == widget
w == widgetDescription
TRUEnever evaluated
FALSEnever evaluated
) || (!w->internalWinId()
!w->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
&& w->nativeParentWidget() == widget
w->nativeParen...et() == widgetDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
889 return
never executed: return tl;
tl;
never executed: return tl;
0
890 }
never executed: end of block
0
891 }
never executed: end of block
0
892-
893 if (QWidgetPrivate::get(tlw)->textureChildSeen
QWidgetPrivate...xtureChildSeenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
894-
895-
896-
897-
898-
899 static bool switchableWidgetComposition =-
900 QGuiApplicationPrivate::instance()->platformIntegration()-
901 ->hasCapability(QPlatformIntegration::SwitchableWidgetComposition);-
902 if (!switchableWidgetComposition
!switchableWidgetCompositionDescription
TRUEnever evaluated
FALSEnever evaluated
0
903 )-
904 {-
905 return
never executed: return qt_dummy_platformTextureList();
qt_dummy_platformTextureList();
never executed: return qt_dummy_platformTextureList();
0
906 }-
907 }
never executed: end of block
0
908-
909 return
never executed: return 0;
0;
never executed: return 0;
0
910}-
911-
912-
913-
914-
915-
916-
917QPlatformTextureListWatcher::QPlatformTextureListWatcher(QWidgetBackingStore *backingStore)-
918 : m_backingStore(backingStore)-
919{-
920}
never executed: end of block
0
921-
922void QPlatformTextureListWatcher::watch(QPlatformTextureList *textureList)-
923{-
924 connect(textureList, qFlagLocation("2""locked(bool)" "\0" __FILE__ ":" "1062"), qFlagLocation("1""onLockStatusChanged(bool)" "\0" __FILE__ ":" "1062"));-
925 m_locked[textureList] = textureList->isLocked();-
926}
never executed: end of block
0
927-
928bool QPlatformTextureListWatcher::isLocked() const-
929{-
930 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(m_locked)>::type> _container_((m_locked)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (bool v = *_container_.i; _container_.control; _container_.control = 0) {-
931 if (v
vDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
932 return
never executed: return true;
true;
never executed: return true;
0
933 }
never executed: end of block
0
934 return
never executed: return false;
false;
never executed: return false;
0
935}-
936-
937void QPlatformTextureListWatcher::onLockStatusChanged(bool locked)-
938{-
939 QPlatformTextureList *tl = static_cast<QPlatformTextureList *>(sender());-
940 m_locked[tl] = locked;-
941 if (!isLocked()
!isLocked()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
942 m_backingStore->sync();
never executed: m_backingStore->sync();
0
943}
never executed: end of block
0
944static inline bool discardSyncRequest(QWidget *tlw, QTLWExtra *tlwExtra)-
945{-
946 if (!tlw
!tlwDescription
TRUEnever evaluated
FALSEnever evaluated
|| !tlwExtra
!tlwExtraDescription
TRUEnever evaluated
FALSEnever evaluated
|| !tlw->testAttribute(Qt::WA_Mapped)
!tlw->testAttr...Qt::WA_Mapped)Description
TRUEnever evaluated
FALSEnever evaluated
|| !tlw->isVisible()
!tlw->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
947 return
never executed: return true;
true;
never executed: return true;
0
948-
949 return
never executed: return false;
false;
never executed: return false;
0
950}-
951-
952bool QWidgetBackingStore::syncAllowed()-
953{-
954-
955 QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData();-
956 if (textureListWatcher
textureListWatcherDescription
TRUEnever evaluated
FALSEnever evaluated
&& !textureListWatcher->isLocked()
!textureListWa...er->isLocked()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
957 textureListWatcher->deleteLater();-
958 textureListWatcher = 0;-
959 }
never executed: end of block
else if (!tlwExtra->widgetTextures.isEmpty()
!tlwExtra->wid...ures.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
960 bool skipSync = false;-
961 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(tlwExtra->widgetTextures)>::type> _container_((tlwExtra->widgetTextures)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QPlatformTextureList *tl = *_container_.i; _container_.control; _container_.control = 0) {-
962 if (tl->isLocked()
tl->isLocked()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
963 if (!textureListWatcher
!textureListWatcherDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
964 textureListWatcher = new QPlatformTextureListWatcher(this);
never executed: textureListWatcher = new QPlatformTextureListWatcher(this);
0
965 if (!textureListWatcher->isLocked()
!textureListWa...er->isLocked()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
966 textureListWatcher->watch(tl);
never executed: textureListWatcher->watch(tl);
0
967 skipSync = true;-
968 }
never executed: end of block
0
969 }
never executed: end of block
0
970 if (skipSync
skipSyncDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
971 return
never executed: return false;
false;
never executed: return false;
0
972 }
never executed: end of block
0
973-
974 return
never executed: return true;
true;
never executed: return true;
0
975}-
976void QWidgetBackingStore::sync(QWidget *exposedWidget, const QRegion &exposedRegion)-
977{-
978 QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData();-
979 if (!tlw->isVisible()
!tlw->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
|| !tlwExtra
!tlwExtraDescription
TRUEnever evaluated
FALSEnever evaluated
|| tlwExtra->inTopLevelResize
tlwExtra->inTopLevelResizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
980 return;
never executed: return;
0
981-
982 if (!exposedWidget
!exposedWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
|| !exposedWidget->internalWinId()
!exposedWidget...nternalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
|| !exposedWidget->isVisible()
!exposedWidget->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
|| !exposedWidget->testAttribute(Qt::WA_Mapped)
!exposedWidget...Qt::WA_Mapped)Description
TRUEnever evaluated
FALSEnever evaluated
0
983 || !exposedWidget->updatesEnabled()
!exposedWidget...datesEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
|| exposedRegion.isEmpty()
exposedRegion.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
984 return;
never executed: return;
0
985 }-
986-
987-
988 if (!isDirty()
!isDirty()Description
TRUEnever evaluated
FALSEnever evaluated
&& store->size().isValid()
store->size().isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
989 QPlatformTextureList *tl = widgetTexturesFor(tlw, exposedWidget);-
990 qt_flush(exposedWidget, tl ? QRegion() : exposedRegion, store, tlw, tlwOffset, tl, this);-
991 return;
never executed: return;
0
992 }-
993-
994 if (exposedWidget != tlw
exposedWidget != tlwDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
995 markDirtyOnScreen(exposedRegion, exposedWidget, exposedWidget->mapTo(tlw, QPoint()));
never executed: markDirtyOnScreen(exposedRegion, exposedWidget, exposedWidget->mapTo(tlw, QPoint()));
0
996 else-
997 markDirtyOnScreen(exposedRegion, exposedWidget, QPoint());
never executed: markDirtyOnScreen(exposedRegion, exposedWidget, QPoint());
0
998-
999 if (syncAllowed()
syncAllowed()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1000 doSync();
never executed: doSync();
0
1001}
never executed: end of block
0
1002-
1003-
1004-
1005-
1006void QWidgetBackingStore::sync()-
1007{-
1008 updateRequestSent = false;-
1009 QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData();-
1010 if (discardSyncRequest(tlw, tlwExtra)
discardSyncReq...tlw, tlwExtra)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1011-
1012-
1013-
1014-
1015-
1016 if (!tlw->isVisible()
!tlw->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1017 dirty = QRegion();-
1018 for (int i = 0; i < dirtyWidgets.size()
i < dirtyWidgets.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1019 resetWidget(dirtyWidgets.at(i));
never executed: resetWidget(dirtyWidgets.at(i));
0
1020 dirtyWidgets.clear();-
1021 fullUpdatePending = false;-
1022 }
never executed: end of block
0
1023 return;
never executed: return;
0
1024 }-
1025-
1026 if (syncAllowed()
syncAllowed()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1027 doSync();
never executed: doSync();
0
1028}
never executed: end of block
0
1029-
1030void QWidgetBackingStore::doSync()-
1031{-
1032 const bool updatesDisabled = !tlw->updatesEnabled();-
1033 bool repaintAllWidgets = false;-
1034-
1035 const bool inTopLevelResize = tlw->d_func()->maybeTopData()->inTopLevelResize;-
1036 const QRect tlwRect(topLevelRect());-
1037 const QRect surfaceGeometry(tlwRect.topLeft(), store->size());-
1038 if ((fullUpdatePending
fullUpdatePendingDescription
TRUEnever evaluated
FALSEnever evaluated
|| inTopLevelResize
inTopLevelResizeDescription
TRUEnever evaluated
FALSEnever evaluated
|| surfaceGeometry.size() != tlwRect.size()
surfaceGeometr...tlwRect.size()Description
TRUEnever evaluated
FALSEnever evaluated
) && !updatesDisabled
!updatesDisabledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1039 if (hasStaticContents()
hasStaticContents()Description
TRUEnever evaluated
FALSEnever evaluated
&& !store->size().isEmpty()
!store->size().isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1040-
1041 const QRect clipRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height());-
1042 const QRegion staticRegion(staticContents(0, clipRect));-
1043 QRegion newVisible(0, 0, tlwRect.width(), tlwRect.height());-
1044 newVisible -= staticRegion;-
1045 dirty += newVisible;-
1046 store->setStaticContents(staticRegion);-
1047 }
never executed: end of block
else {
0
1048-
1049 dirty = QRegion(0, 0, tlwRect.width(), tlwRect.height());-
1050 for (int i = 0; i < dirtyWidgets.size()
i < dirtyWidgets.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1051 resetWidget(dirtyWidgets.at(i));
never executed: resetWidget(dirtyWidgets.at(i));
0
1052 dirtyWidgets.clear();-
1053 repaintAllWidgets = true;-
1054 }
never executed: end of block
0
1055 }-
1056-
1057 if (inTopLevelResize
inTopLevelResizeDescription
TRUEnever evaluated
FALSEnever evaluated
|| surfaceGeometry.size() != tlwRect.size()
surfaceGeometr...tlwRect.size()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1058 store->resize(tlwRect.size());
never executed: store->resize(tlwRect.size());
0
1059-
1060 if (updatesDisabled
updatesDisabledDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1061 return;
never executed: return;
0
1062-
1063-
1064 QRegion toClean(dirty);-
1065-
1066-
1067-
1068-
1069-
1070 QVarLengthArray<QWidget *, 32> opaqueNonOverlappedWidgets;-
1071 for (int i = 0; i < dirtyWidgets.size()
i < dirtyWidgets.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1072 QWidget *w = dirtyWidgets.at(i);-
1073 QWidgetPrivate *wd = w->d_func();-
1074 if (wd->data.in_destructor
wd->data.in_destructorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1075 continue;
never executed: continue;
0
1076-
1077-
1078 wd->dirty &= wd->clipRect();-
1079 wd->clipToEffectiveMask(wd->dirty);-
1080-
1081-
1082 bool hasDirtySiblingsAbove = false;-
1083-
1084 if (!wd->isMoved
!wd->isMovedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1085 wd->subtractOpaqueSiblings(wd->dirty, &hasDirtySiblingsAbove);
never executed: wd->subtractOpaqueSiblings(wd->dirty, &hasDirtySiblingsAbove);
0
1086-
1087-
1088-
1089-
1090-
1091 const QRegion dirtyBeforeSubtractedOpaqueChildren = wd->dirty;-
1092-
1093-
1094 if (!wd->isScrolled
!wd->isScrolledDescription
TRUEnever evaluated
FALSEnever evaluated
&& !wd->isMoved
!wd->isMovedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1095 wd->subtractOpaqueChildren(wd->dirty, w->rect());
never executed: wd->subtractOpaqueChildren(wd->dirty, w->rect());
0
1096-
1097 if (wd->dirty.isEmpty()
wd->dirty.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& wd->textureChildSeen
wd->textureChildSeenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1098 wd->dirty = dirtyBeforeSubtractedOpaqueChildren;
never executed: wd->dirty = dirtyBeforeSubtractedOpaqueChildren;
0
1099-
1100 if (wd->dirty.isEmpty()
wd->dirty.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1101 resetWidget(w);-
1102 continue;
never executed: continue;
0
1103 }-
1104-
1105 const QRegion widgetDirty(w != tlw ? wd->dirty.translated(w->mapTo(tlw, QPoint()))-
1106 : wd->dirty);-
1107 toClean += widgetDirty;-
1108-
1109-
1110 if (tlw->d_func()->extra->proxyWidget
tlw->d_func()-...a->proxyWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1111 resetWidget(w);-
1112 continue;
never executed: continue;
0
1113 }-
1114-
1115-
1116 if (!hasDirtySiblingsAbove
!hasDirtySiblingsAboveDescription
TRUEnever evaluated
FALSEnever evaluated
&& wd->isOpaque
wd->isOpaqueDescription
TRUEnever evaluated
FALSEnever evaluated
&& !dirty.intersects(widgetDirty.boundingRect())
!dirty.interse...oundingRect())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1117 opaqueNonOverlappedWidgets.append(w);-
1118 }
never executed: end of block
else {
0
1119 resetWidget(w);-
1120 dirty += widgetDirty;-
1121 }
never executed: end of block
0
1122 }-
1123 dirtyWidgets.clear();-
1124-
1125-
1126-
1127-
1128-
1129 QTLWExtra *tlwExtra = tlw->d_func()->topData();-
1130 qDeleteAll(tlwExtra->widgetTextures);-
1131 tlwExtra->widgetTextures.clear();-
1132 findAllTextureWidgetsRecursively(tlw, tlw);-
1133 qt_window_private(tlw->windowHandle())->compositing = false;-
1134 fullUpdatePending = false;-
1135-
1136-
1137 if (toClean.isEmpty()
toClean.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1138-
1139-
1140-
1141-
1142-
1143 QVarLengthArray<QWidget *, 16> paintPending;-
1144 const int numPaintPending = dirtyRenderToTextureWidgets.count();-
1145 paintPending.reserve(numPaintPending);-
1146 for (int i = 0; i < numPaintPending
i < numPaintPendingDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1147 QWidget *w = dirtyRenderToTextureWidgets.at(i);-
1148 paintPending << w;-
1149 resetWidget(w);-
1150 }
never executed: end of block
0
1151 dirtyRenderToTextureWidgets.clear();-
1152 for (int i = 0; i < numPaintPending
i < numPaintPendingDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1153 QWidget *w = paintPending[i];-
1154 w->d_func()->sendPaintEvent(w->rect());-
1155 if (w != tlw
w != tlwDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1156 QWidget *npw = w->nativeParentWidget();-
1157 if (w->internalWinId()
w->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
|| (npw
npwDescription
TRUEnever evaluated
FALSEnever evaluated
&& npw != tlw
npw != tlwDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1158 if (!w->internalWinId()
!w->internalWinId()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1159 w = npw;
never executed: w = npw;
0
1160 QWidgetPrivate *wPrivate = w->d_func();-
1161 if (!wPrivate->needsFlush
!wPrivate->needsFlushDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1162 wPrivate->needsFlush = new QRegion;
never executed: wPrivate->needsFlush = new QRegion;
0
1163 appendDirtyOnScreenWidget(w);-
1164 }
never executed: end of block
0
1165 }
never executed: end of block
0
1166 }
never executed: end of block
0
1167-
1168-
1169-
1170-
1171 flush();-
1172-
1173 return;
never executed: return;
0
1174 }-
1175-
1176-
1177 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(tlwExtra->widgetTextures)>::type> _container_((tlwExtra->widgetTextures)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QPlatformTextureList *tl = *_container_.i; _container_.control; _container_.control = 0) {-
1178 for (int i = 0; i < tl->count()
i < tl->count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1179 QWidget *w = static_cast<QWidget *>(tl->source(i));-
1180 if (dirtyRenderToTextureWidgets.contains(w)
dirtyRenderToT...ts.contains(w)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1181 const QRect rect = tl->geometry(i);-
1182-
1183-
1184 w->d_func()->renderToTextureReallyDirty = 1;-
1185 dirty += rect;-
1186 toClean += rect;-
1187 }
never executed: end of block
0
1188 }
never executed: end of block
0
1189 }
never executed: end of block
0
1190 for (int i = 0; i < dirtyRenderToTextureWidgets.count()
i < dirtyRende...idgets.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1191 resetWidget(dirtyRenderToTextureWidgets.at(i));
never executed: resetWidget(dirtyRenderToTextureWidgets.at(i));
0
1192 dirtyRenderToTextureWidgets.clear();-
1193-
1194-
1195-
1196 if (tlw->d_func()->extra->proxyWidget
tlw->d_func()-...a->proxyWidgetDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1197 updateStaticContentsSize();-
1198 dirty = QRegion();-
1199 updateRequestSent = false;-
1200 const QVector<QRect> rects(toClean.rects());-
1201 for (int i = 0; i < rects.size()
i < rects.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1202 tlw->d_func()->extra->proxyWidget->update(rects.at(i));
never executed: tlw->d_func()->extra->proxyWidget->update(rects.at(i));
0
1203 return;
never executed: return;
0
1204 }-
1205-
1206-
1207 BeginPaintInfo beginPaintInfo;-
1208 beginPaint(toClean, tlw, store, &beginPaintInfo);-
1209 if (beginPaintInfo.nothingToPaint
beginPaintInfo.nothingToPaintDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1210 for (int i = 0; i < opaqueNonOverlappedWidgets.size()
i < opaqueNonO...Widgets.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
1211 resetWidget(opaqueNonOverlappedWidgets[i]);
never executed: resetWidget(opaqueNonOverlappedWidgets[i]);
0
1212 dirty = QRegion();-
1213 updateRequestSent = false;-
1214 return;
never executed: return;
0
1215 }-
1216-
1217-
1218-
1219 updateStaticContentsSize();-
1220 const QRegion dirtyCopy(dirty);-
1221 dirty = QRegion();-
1222 updateRequestSent = false;-
1223-
1224-
1225 for (int i = 0; i < opaqueNonOverlappedWidgets.size()
i < opaqueNonO...Widgets.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1226 QWidget *w = opaqueNonOverlappedWidgets[i];-
1227 QWidgetPrivate *wd = w->d_func();-
1228-
1229 int flags = QWidgetPrivate::DrawRecursive;-
1230-
1231 if (!wd->isScrolled
!wd->isScrolledDescription
TRUEnever evaluated
FALSEnever evaluated
&& !wd->isMoved
!wd->isMovedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1232 flags |= QWidgetPrivate::DontDrawOpaqueChildren;
never executed: flags |= QWidgetPrivate::DontDrawOpaqueChildren;
0
1233 if (w == tlw
w == tlwDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1234 flags |= QWidgetPrivate::DrawAsRoot;
never executed: flags |= QWidgetPrivate::DrawAsRoot;
0
1235-
1236 QRegion toBePainted(wd->dirty);-
1237 resetWidget(w);-
1238-
1239 QPoint offset(tlwOffset);-
1240 if (w != tlw
w != tlwDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1241 offset += w->mapTo(tlw, QPoint());
never executed: offset += w->mapTo(tlw, QPoint());
0
1242 wd->drawWidget(store->paintDevice(), toBePainted, offset, flags, 0, this);-
1243 }
never executed: end of block
0
1244-
1245-
1246 if (repaintAllWidgets
repaintAllWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
|| !dirtyCopy.isEmpty()
!dirtyCopy.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1247 const int flags = QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawRecursive;-
1248 tlw->d_func()->drawWidget(store->paintDevice(), dirtyCopy, tlwOffset, flags, 0, this);-
1249 }
never executed: end of block
0
1250-
1251 endPaint(toClean, store, &beginPaintInfo);-
1252}
never executed: end of block
0
1253-
1254-
1255-
1256-
1257-
1258-
1259void QWidgetBackingStore::flush(QWidget *widget)-
1260{-
1261 const bool hasDirtyOnScreenWidgets = dirtyOnScreenWidgets
dirtyOnScreenWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
&& !dirtyOnScreenWidgets->isEmpty()
!dirtyOnScreen...ets->isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
;
0
1262 bool flushed = false;-
1263-
1264-
1265 if (!dirtyOnScreen.isEmpty()
!dirtyOnScreen.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1266 QWidget *target = widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
? widget : tlw;
0
1267 qt_flush(target, dirtyOnScreen, store, tlw, tlwOffset, widgetTexturesFor(tlw, tlw), this);-
1268 dirtyOnScreen = QRegion();-
1269 flushed = true;-
1270 }
never executed: end of block
0
1271-
1272-
1273 if (!flushed
!flushedDescription
TRUEnever evaluated
FALSEnever evaluated
&& !hasDirtyOnScreenWidgets
!hasDirtyOnScreenWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1274-
1275 if (!tlw->d_func()->topData()->widgetTextures.isEmpty()
!tlw->d_func()...ures.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1276 QPlatformTextureList *tl = widgetTexturesFor(tlw, tlw);-
1277 if (tl
tlDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1278 QWidget *target = widget
widgetDescription
TRUEnever evaluated
FALSEnever evaluated
? widget : tlw;
0
1279 qt_flush(target, QRegion(), store, tlw, tlwOffset, tl, this);-
1280 }
never executed: end of block
0
1281 }
never executed: end of block
0
1282-
1283 }
never executed: end of block
0
1284-
1285 if (!hasDirtyOnScreenWidgets
!hasDirtyOnScreenWidgetsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1286 return;
never executed: return;
0
1287-
1288 for (int i = 0; i < dirtyOnScreenWidgets->size()
i < dirtyOnScr...idgets->size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1289 QWidget *w = dirtyOnScreenWidgets->at(i);-
1290 QWidgetPrivate *wd = w->d_func();-
1291 ((!(wd->needsFlush)) ? qt_assert("wd->needsFlush",__FILE__,1449) : qt_noop());-
1292 QPlatformTextureList *widgetTexturesForNative = wd->textureChildSeen
wd->textureChildSeenDescription
TRUEnever evaluated
FALSEnever evaluated
? widgetTexturesFor(tlw, w) : 0;
0
1293 qt_flush(w, *wd->needsFlush, store, tlw, tlwOffset, widgetTexturesForNative, this);-
1294 *wd->needsFlush = QRegion();-
1295 }
never executed: end of block
0
1296 dirtyOnScreenWidgets->clear();-
1297}
never executed: end of block
0
1298-
1299static inline bool discardInvalidateBufferRequest(QWidget *widget, QTLWExtra *tlwExtra)-
1300{-
1301 ((!(widget)) ? qt_assert("widget",__FILE__,1459) : qt_noop());-
1302 if (QApplication::closingDown()
QApplication::closingDown()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1303 return
never executed: return true;
true;
never executed: return true;
0
1304-
1305 if (!tlwExtra
!tlwExtraDescription
TRUEnever evaluated
FALSEnever evaluated
|| tlwExtra->inTopLevelResize
tlwExtra->inTopLevelResizeDescription
TRUEnever evaluated
FALSEnever evaluated
|| !tlwExtra->backingStore
!tlwExtra->backingStoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1306 return
never executed: return true;
true;
never executed: return true;
0
1307-
1308 if (!widget->isVisible()
!widget->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
|| !widget->updatesEnabled()
!widget->updatesEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1309 return
never executed: return true;
true;
never executed: return true;
0
1310-
1311 return
never executed: return false;
false;
never executed: return false;
0
1312}-
1313-
1314-
1315-
1316-
1317-
1318void QWidgetPrivate::invalidateBuffer_resizeHelper(const QPoint &oldPos, const QSize &oldSize)-
1319{-
1320 QWidget * const q = q_func();-
1321 ((!(!q->isWindow())) ? qt_assert("!q->isWindow()",__FILE__,1479) : qt_noop());-
1322 ((!(q->parentWidget())) ? qt_assert("q->parentWidget()",__FILE__,1480) : qt_noop());-
1323-
1324 const bool staticContents = q->testAttribute(Qt::WA_StaticContents);-
1325 const bool sizeDecreased = (
(data.crect.wi...dSize.width())Description
TRUEnever evaluated
FALSEnever evaluated
data.crect.width() < oldSize.width())
(data.crect.wi...dSize.width())Description
TRUEnever evaluated
FALSEnever evaluated
0
1326 || (
(data.crect.he...Size.height())Description
TRUEnever evaluated
FALSEnever evaluated
data.crect.height() < oldSize.height())
(data.crect.he...Size.height())Description
TRUEnever evaluated
FALSEnever evaluated
;
0
1327-
1328 const QPoint offset(data.crect.x() - oldPos.x(), data.crect.y() - oldPos.y());-
1329 const bool parentAreaExposed = !offset.isNull()
!offset.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
|| sizeDecreased
sizeDecreasedDescription
TRUEnever evaluated
FALSEnever evaluated
;
0
1330 const QRect newWidgetRect(q->rect());-
1331 const QRect oldWidgetRect(0, 0, oldSize.width(), oldSize.height());-
1332-
1333 if (!staticContents
!staticContentsDescription
TRUEnever evaluated
FALSEnever evaluated
|| graphicsEffect
graphicsEffectDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1334 QRegion staticChildren;-
1335 QWidgetBackingStore *bs = 0;-
1336 if (offset.isNull()
offset.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(bs = maybeBackingStore())Description
TRUEnever evaluated
FALSEnever evaluated
bs = maybeBackingStore())
(bs = maybeBackingStore())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1337 staticChildren = bs->staticContents(q, oldWidgetRect);
never executed: staticChildren = bs->staticContents(q, oldWidgetRect);
0
1338 const bool hasStaticChildren = !staticChildren.isEmpty();-
1339-
1340 if (hasStaticChildren
hasStaticChildrenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1341 QRegion dirty(newWidgetRect);-
1342 dirty -= staticChildren;-
1343 invalidateBuffer(dirty);-
1344 }
never executed: end of block
else {
0
1345-
1346 invalidateBuffer(newWidgetRect);-
1347 }
never executed: end of block
0
1348-
1349 if (!parentAreaExposed
!parentAreaExposedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1350 return;
never executed: return;
0
1351-
1352-
1353 if (!graphicsEffect
!graphicsEffectDescription
TRUEnever evaluated
FALSEnever evaluated
&& extra
extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& extra->hasMask
extra->hasMaskDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1354 QRegion parentExpose(extra->mask.translated(oldPos));-
1355 parentExpose &= QRect(oldPos, oldSize);-
1356 if (hasStaticChildren
hasStaticChildrenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1357 parentExpose -= data.crect;
never executed: parentExpose -= data.crect;
0
1358 q->parentWidget()->d_func()->invalidateBuffer(parentExpose);-
1359 }
never executed: end of block
else {
0
1360 if (hasStaticChildren
hasStaticChildrenDescription
TRUEnever evaluated
FALSEnever evaluated
&& !graphicsEffect
!graphicsEffectDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1361 QRegion parentExpose(QRect(oldPos, oldSize));-
1362 parentExpose -= data.crect;-
1363 q->parentWidget()->d_func()->invalidateBuffer(parentExpose);-
1364 }
never executed: end of block
else {
0
1365 q->parentWidget()->d_func()->invalidateBuffer(effectiveRectFor(QRect(oldPos, oldSize)));-
1366 }
never executed: end of block
0
1367 }-
1368 return;
never executed: return;
0
1369 }-
1370-
1371-
1372 if (!offset.isNull()
!offset.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1373 if (sizeDecreased
sizeDecreasedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1374 const QSize minSize(qMin(oldSize.width(), data.crect.width()),-
1375 qMin(oldSize.height(), data.crect.height()));-
1376 moveRect(QRect(oldPos, minSize), offset.x(), offset.y());-
1377 }
never executed: end of block
else {
0
1378 moveRect(QRect(oldPos, oldSize), offset.x(), offset.y());-
1379 }
never executed: end of block
0
1380 }-
1381-
1382-
1383 if (!sizeDecreased
!sizeDecreasedDescription
TRUEnever evaluated
FALSEnever evaluated
|| !oldWidgetRect.contains(newWidgetRect)
!oldWidgetRect...newWidgetRect)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1384 QRegion newVisible(newWidgetRect);-
1385 newVisible -= oldWidgetRect;-
1386 invalidateBuffer(newVisible);-
1387 }
never executed: end of block
0
1388-
1389 if (!parentAreaExposed
!parentAreaExposedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1390 return;
never executed: return;
0
1391-
1392-
1393 const QRect oldRect(oldPos, oldSize);-
1394 if (extra
extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& extra->hasMask
extra->hasMaskDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1395 QRegion parentExpose(oldRect);-
1396 parentExpose &= extra->mask.translated(oldPos);-
1397 parentExpose -= (extra->mask.translated(data.crect.topLeft()) & data.crect);-
1398 q->parentWidget()->d_func()->invalidateBuffer(parentExpose);-
1399 }
never executed: end of block
else {
0
1400 QRegion parentExpose(oldRect);-
1401 parentExpose -= data.crect;-
1402 q->parentWidget()->d_func()->invalidateBuffer(parentExpose);-
1403 }
never executed: end of block
0
1404}-
1405void QWidgetPrivate::invalidateBuffer(const QRegion &rgn)-
1406{-
1407 QWidget * const q = q_func();-
1408-
1409 QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData();-
1410 if (discardInvalidateBufferRequest(q, tlwExtra)
discardInvalid...t(q, tlwExtra)Description
TRUEnever evaluated
FALSEnever evaluated
|| rgn.isEmpty()
rgn.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1411 return;
never executed: return;
0
1412-
1413 QRegion wrgn(rgn);-
1414 wrgn &= clipRect();-
1415 if (!graphicsEffect
!graphicsEffectDescription
TRUEnever evaluated
FALSEnever evaluated
&& extra
extraDescription
TRUEnever evaluated
FALSEnever evaluated
&& extra->hasMask
extra->hasMaskDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1416 wrgn &= extra->mask;
never executed: wrgn &= extra->mask;
0
1417 if (wrgn.isEmpty()
wrgn.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1418 return;
never executed: return;
0
1419-
1420 tlwExtra->backingStoreTracker->markDirty(wrgn, q,-
1421 QWidgetBackingStore::UpdateLater, QWidgetBackingStore::BufferInvalid);-
1422}
never executed: end of block
0
1423void QWidgetPrivate::invalidateBuffer(const QRect &rect)-
1424{-
1425 QWidget * const q = q_func();-
1426-
1427 QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData();-
1428 if (discardInvalidateBufferRequest(q, tlwExtra)
discardInvalid...t(q, tlwExtra)Description
TRUEnever evaluated
FALSEnever evaluated
|| rect.isEmpty()
rect.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1429 return;
never executed: return;
0
1430-
1431 QRect wRect(rect);-
1432 wRect &= clipRect();-
1433 if (wRect.isEmpty()
wRect.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1434 return;
never executed: return;
0
1435-
1436 if (graphicsEffect
graphicsEffectDescription
TRUEnever evaluated
FALSEnever evaluated
|| !extra
!extraDescription
TRUEnever evaluated
FALSEnever evaluated
|| !extra->hasMask
!extra->hasMaskDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1437 tlwExtra->backingStoreTracker->markDirty(wRect, q,-
1438 QWidgetBackingStore::UpdateLater, QWidgetBackingStore::BufferInvalid);-
1439 return;
never executed: return;
0
1440 }-
1441-
1442 QRegion wRgn(extra->mask);-
1443 wRgn &= wRect;-
1444 if (wRgn.isEmpty()
wRgn.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1445 return;
never executed: return;
0
1446-
1447 tlwExtra->backingStoreTracker->markDirty(wRgn, q,-
1448 QWidgetBackingStore::UpdateLater, QWidgetBackingStore::BufferInvalid);-
1449}
never executed: end of block
0
1450-
1451void QWidgetPrivate::repaint_sys(const QRegion &rgn)-
1452{-
1453 if (data.in_destructor
data.in_destructorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1454 return;
never executed: return;
0
1455-
1456 QWidget * const q = q_func();-
1457 if (discardSyncRequest(q, maybeTopData())
discardSyncReq...aybeTopData())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1458 return;
never executed: return;
0
1459-
1460 if (q->testAttribute(Qt::WA_StaticContents)
q->testAttribu...taticContents)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1461 if (!extra
!extraDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1462 createExtra();
never executed: createExtra();
0
1463 extra->staticContentsSize = data.crect.size();-
1464 }
never executed: end of block
0
1465-
1466 QPaintEngine *engine = q->paintEngine();-
1467-
1468-
1469-
1470-
1471 const bool noPartialUpdateSupport = (engine
engineDescription
TRUEnever evaluated
FALSEnever evaluated
&& (engine->type() == QPaintEngine::OpenGL
engine->type()...Engine::OpenGLDescription
TRUEnever evaluated
FALSEnever evaluated
0
1472 || engine->type() == QPaintEngine::OpenGL2
engine->type()...ngine::OpenGL2Description
TRUEnever evaluated
FALSEnever evaluated
))
0
1473 && (usesDoubleBufferedGLContext
usesDoubleBufferedGLContextDescription
TRUEnever evaluated
FALSEnever evaluated
|| q->autoFillBackground()
q->autoFillBackground()Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1474 QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn);-
1475-
1476-
1477-
1478-
1479-
1480-
1481-
1482 toBePainted &= clipRect();-
1483 clipToEffectiveMask(toBePainted);-
1484 if (toBePainted.isEmpty()
toBePainted.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1485 return;
never executed: return;
0
1486-
1487-
1488 bool flushed = QWidgetBackingStore::flushPaint(q, toBePainted);-
1489-
1490-
1491 drawWidget(q, toBePainted, QPoint(), QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawPaintOnScreen, 0);-
1492-
1493-
1494 if (flushed
flushedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1495 QWidgetBackingStore::unflushPaint(q, toBePainted);
never executed: QWidgetBackingStore::unflushPaint(q, toBePainted);
0
1496-
1497-
1498 if (__builtin_expect(!!(q->paintingActive()), false)
__builtin_expe...ive()), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1499 QMessageLogger(__FILE__, 1673, __PRETTY_FUNCTION__).warning("QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent");
never executed: QMessageLogger(__FILE__, 1673, __PRETTY_FUNCTION__).warning("QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent");
0
1500}
never executed: end of block
0
1501-
1502-
1503-
1504-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9