qrasterwindow.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qrasterwindow.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QRasterWindowPrivate : public QPaintDeviceWindowPrivate-
6{-
7 inline QRasterWindow* q_func() { return static_cast<QRasterWindow *>(q_ptr); } inline const QRasterWindow* q_func() const { return static_cast<const QRasterWindow *>(q_ptr); } friend class QRasterWindow;-
8public:-
9 void beginPaint(const QRegion &region) override-
10 {-
11 QRasterWindow * const q = q_func();-
12 const QSize size = q->size();-
13 if (backingstore->size() != size
backingstore->size() != sizeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
14 backingstore->resize(size);-
15 markWindowAsDirty();-
16 }
never executed: end of block
0
17 backingstore->beginPaint(region);-
18 }
never executed: end of block
0
19-
20 void endPaint() override-
21 {-
22 backingstore->endPaint();-
23 }
never executed: end of block
0
24-
25 void flush(const QRegion &region) override-
26 {-
27 QRasterWindow * const q = q_func();-
28 backingstore->flush(region, q);-
29 }
never executed: end of block
0
30-
31 QScopedPointer<QBackingStore> backingstore;-
32};-
33-
34-
35-
36-
37QRasterWindow::QRasterWindow(QWindow *parent)-
38 : QPaintDeviceWindow(*(new QRasterWindowPrivate), parent)-
39{-
40 setSurfaceType(QSurface::RasterSurface);-
41 d_func()->backingstore.reset(new QBackingStore(this));-
42}
never executed: end of block
0
43-
44-
45-
46-
47int QRasterWindow::metric(PaintDeviceMetric metric) const-
48{-
49 const QRasterWindowPrivate * const d = d_func();-
50-
51 switch (metric) {-
52 case
never executed: case PdmDepth:
PdmDepth:
never executed: case PdmDepth:
0
53 return
never executed: return d->backingstore->paintDevice()->depth();
d->backingstore->paintDevice()->depth();
never executed: return d->backingstore->paintDevice()->depth();
0
54 default
never executed: default:
:
never executed: default:
0
55 break;
never executed: break;
0
56 }-
57 return
never executed: return QPaintDeviceWindow::metric(metric);
QPaintDeviceWindow::metric(metric);
never executed: return QPaintDeviceWindow::metric(metric);
0
58}-
59-
60-
61-
62-
63QPaintDevice *QRasterWindow::redirected(QPoint *) const-
64{-
65 const QRasterWindowPrivate * const d = d_func();-
66 return
never executed: return d->backingstore->paintDevice();
d->backingstore->paintDevice();
never executed: return d->backingstore->paintDevice();
0
67}-
68-
69-
Switch to Source codePreprocessed file

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