Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/platformsupport/fbconvenience/qfbbackingstore.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | QFbBackingStore::QFbBackingStore(QWindow *window) | - | ||||||
6 | : QPlatformBackingStore(window) | - | ||||||
7 | { | - | ||||||
8 | if (window->handle()
| 0 | ||||||
9 | (static_cast< never executed: QFbWindow *>(window->handle()))->setBackingStore(this);(static_cast<QFbWindow *>(window->handle()))->setBackingStore(this); never executed: (static_cast<QFbWindow *>(window->handle()))->setBackingStore(this); | 0 | ||||||
10 | else | - | ||||||
11 | (static_cast< never executed: QFbScreen *>(window->screen()->handle()))->addPendingBackingStore(this);(static_cast<QFbScreen *>(window->screen()->handle()))->addPendingBackingStore(this); never executed: (static_cast<QFbScreen *>(window->screen()->handle()))->addPendingBackingStore(this); | 0 | ||||||
12 | } | - | ||||||
13 | - | |||||||
14 | QFbBackingStore::~QFbBackingStore() | - | ||||||
15 | { | - | ||||||
16 | } | - | ||||||
17 | - | |||||||
18 | void QFbBackingStore::flush(QWindow *window, const QRegion ®ion, const QPoint &offset) | - | ||||||
19 | { | - | ||||||
20 | (void)window;; | - | ||||||
21 | (void)offset;; | - | ||||||
22 | - | |||||||
23 | (static_cast<QFbWindow *>(window->handle()))->repaint(region); | - | ||||||
24 | } never executed: end of block | 0 | ||||||
25 | - | |||||||
26 | void QFbBackingStore::resize(const QSize &size, const QRegion &staticContents) | - | ||||||
27 | { | - | ||||||
28 | (void)staticContents;; | - | ||||||
29 | - | |||||||
30 | if (mImage.size() != size
| 0 | ||||||
31 | mImage = QImage(size, window()->screen()->handle()->format()); never executed: mImage = QImage(size, window()->screen()->handle()->format()); | 0 | ||||||
32 | } never executed: end of block | 0 | ||||||
33 | - | |||||||
34 | const QImage QFbBackingStore::image() | - | ||||||
35 | { | - | ||||||
36 | return never executed: mImage;return mImage; never executed: return mImage; | 0 | ||||||
37 | } | - | ||||||
38 | - | |||||||
39 | void QFbBackingStore::lock() | - | ||||||
40 | { | - | ||||||
41 | mImageMutex.lock(); | - | ||||||
42 | } never executed: end of block | 0 | ||||||
43 | - | |||||||
44 | void QFbBackingStore::unlock() | - | ||||||
45 | { | - | ||||||
46 | mImageMutex.unlock(); | - | ||||||
47 | } never executed: end of block | 0 | ||||||
48 | - | |||||||
49 | void QFbBackingStore::beginPaint(const QRegion ®ion) | - | ||||||
50 | { | - | ||||||
51 | lock(); | - | ||||||
52 | - | |||||||
53 | if (mImage.hasAlphaChannel()
| 0 | ||||||
54 | QPainter p(&mImage); | - | ||||||
55 | p.setCompositionMode(QPainter::CompositionMode_Source); | - | ||||||
56 | const QVector<QRect> rects = region.rects(); | - | ||||||
57 | for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end()
| 0 | ||||||
58 | p.fillRect(*it, Qt::transparent); never executed: p.fillRect(*it, Qt::transparent); | 0 | ||||||
59 | } never executed: end of block | 0 | ||||||
60 | } never executed: end of block | 0 | ||||||
61 | - | |||||||
62 | void QFbBackingStore::endPaint() | - | ||||||
63 | { | - | ||||||
64 | unlock(); | - | ||||||
65 | } never executed: end of block | 0 | ||||||
66 | - | |||||||
67 | - | |||||||
Switch to Source code | Preprocessed file |