| 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() != q->size())| TRUE | never evaluated |  | FALSE | never evaluated |  
  ) { | 0 | 
| 14 |             backingstore->resize(q->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 |     } | - | 
| 24 |  | - | 
| 25 |     void flush(const QRegion ®ion) override | - | 
| 26 |     { | - | 
| 27 |         QRasterWindow * const q = q_func(); | - | 
| 28 |         backingstore->flush(region, q); | - | 
| 29 |     } | - | 
| 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 | } | - | 
| 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 PdmDepth: | - | 
| 53 |         return d->backingstore->paintDevice()->depth(); | - | 
| 54 |     default: | - | 
| 55 |         break; | - | 
| 56 |     } | - | 
| 57 |     return QPaintDeviceWindow::metric(metric); | - | 
| 58 | } | - | 
| 59 |  | - | 
| 60 |  | - | 
| 61 |  | - | 
| 62 |  | - | 
| 63 | QPaintDevice *QRasterWindow::redirected(QPoint *) const | - | 
| 64 | { | - | 
| 65 |     const QRasterWindowPrivate * const d = d_func(); | - | 
| 66 |     return d->backingstore->paintDevice(); | - | 
| 67 | } | - | 
| 68 |  | - | 
| 69 |  | - | 
 |  |  |