| 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 | if (backingstore->size() != q->size()
| 0 | ||||||
| 13 | backingstore->resize(q->size()); | - | ||||||
| 14 | markWindowAsDirty(); | - | ||||||
| 15 | } never executed: end of block | 0 | ||||||
| 16 | backingstore->beginPaint(region); | - | ||||||
| 17 | } never executed: end of block | 0 | ||||||
| 18 | - | |||||||
| 19 | void endPaint() override | - | ||||||
| 20 | { | - | ||||||
| 21 | backingstore->endPaint(); | - | ||||||
| 22 | } never executed: end of block | 0 | ||||||
| 23 | - | |||||||
| 24 | void flush(const QRegion ®ion) override | - | ||||||
| 25 | { | - | ||||||
| 26 | QRasterWindow * const q = q_func(); | - | ||||||
| 27 | backingstore->flush(region, q); | - | ||||||
| 28 | } never executed: end of block | 0 | ||||||
| 29 | - | |||||||
| 30 | QScopedPointer<QBackingStore> backingstore; | - | ||||||
| 31 | }; | - | ||||||
| 32 | - | |||||||
| 33 | - | |||||||
| 34 | - | |||||||
| 35 | - | |||||||
| 36 | QRasterWindow::QRasterWindow(QWindow *parent) | - | ||||||
| 37 | : QPaintDeviceWindow(*(new QRasterWindowPrivate), parent) | - | ||||||
| 38 | { | - | ||||||
| 39 | setSurfaceType(QSurface::RasterSurface); | - | ||||||
| 40 | d_func()->backingstore.reset(new QBackingStore(this)); | - | ||||||
| 41 | } never executed: end of block | 0 | ||||||
| 42 | - | |||||||
| 43 | - | |||||||
| 44 | - | |||||||
| 45 | - | |||||||
| 46 | int QRasterWindow::metric(PaintDeviceMetric metric) const | - | ||||||
| 47 | { | - | ||||||
| 48 | const QRasterWindowPrivate * const d = d_func(); | - | ||||||
| 49 | - | |||||||
| 50 | switch (metric) { | - | ||||||
| 51 | case never executed: PdmDepth:case PdmDepth:never executed: case PdmDepth: | 0 | ||||||
| 52 | return never executed: d->backingstore->paintDevice()->depth();return d->backingstore->paintDevice()->depth();never executed: return d->backingstore->paintDevice()->depth(); | 0 | ||||||
| 53 | default never executed: :default:never executed: default: | 0 | ||||||
| 54 | break; never executed: break; | 0 | ||||||
| 55 | } | - | ||||||
| 56 | return never executed: QPaintDeviceWindow::metric(metric);return QPaintDeviceWindow::metric(metric);never executed: return QPaintDeviceWindow::metric(metric); | 0 | ||||||
| 57 | } | - | ||||||
| 58 | - | |||||||
| 59 | - | |||||||
| 60 | - | |||||||
| 61 | - | |||||||
| 62 | QPaintDevice *QRasterWindow::redirected(QPoint *) const | - | ||||||
| 63 | { | - | ||||||
| 64 | const QRasterWindowPrivate * const d = d_func(); | - | ||||||
| 65 | return never executed: d->backingstore->paintDevice();return d->backingstore->paintDevice();never executed: return d->backingstore->paintDevice(); | 0 | ||||||
| 66 | } | - | ||||||
| 67 | - | |||||||
| 68 | - | |||||||
| Switch to Source code | Preprocessed file |