Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qrasterwindow.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | class 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; | - | ||||||
8 | public: | - | ||||||
9 | void beginPaint(const QRegion ®ion) override | - | ||||||
10 | { | - | ||||||
11 | QRasterWindow * const q = q_func(); | - | ||||||
12 | const QSize size = q->size(); | - | ||||||
13 | if (backingstore->size() != size
| 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 ®ion) 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 | - | |||||||
37 | QRasterWindow::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 | - | |||||||
47 | int QRasterWindow::metric(PaintDeviceMetric metric) const | - | ||||||
48 | { | - | ||||||
49 | const QRasterWindowPrivate * const d = d_func(); | - | ||||||
50 | - | |||||||
51 | switch (metric) { | - | ||||||
52 | case never executed: PdmDepth:case PdmDepth: never executed: case PdmDepth: | 0 | ||||||
53 | return never executed: d->backingstore->paintDevice()->depth();return 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: QPaintDeviceWindow::metric(metric);return QPaintDeviceWindow::metric(metric); never executed: return QPaintDeviceWindow::metric(metric); | 0 | ||||||
58 | } | - | ||||||
59 | - | |||||||
60 | - | |||||||
61 | - | |||||||
62 | - | |||||||
63 | QPaintDevice *QRasterWindow::redirected(QPoint *) const | - | ||||||
64 | { | - | ||||||
65 | const QRasterWindowPrivate * const d = d_func(); | - | ||||||
66 | return never executed: d->backingstore->paintDevice();return d->backingstore->paintDevice(); never executed: return d->backingstore->paintDevice(); | 0 | ||||||
67 | } | - | ||||||
68 | - | |||||||
69 | - | |||||||
Switch to Source code | Preprocessed file |