painting/qbackingstore.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5class QBackingStorePrivate -
6{ -
7public: -
8 QBackingStorePrivate(QWindow *w) -
9 : window(w) -
10 { -
11 }
executed: }
Execution Count:2500
2500
12 -
13 QWindow *window; -
14 QPlatformBackingStore *platformBackingStore; -
15 QRegion staticContents; -
16 QSize size; -
17}; -
18void QBackingStore::flush(const QRegion &region, QWindow *win, const QPoint &offset) -
19{ -
20 if (!win)
evaluated: !win
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:8020
2-8020
21 win = window();
executed: win = window();
Execution Count:2
2
22 -
23 if (win && !qt_window_private(win)->receivedExpose)
partially evaluated: win
TRUEFALSE
yes
Evaluation Count:8022
no
Evaluation Count:0
evaluated: !qt_window_private(win)->receivedExpose
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:8013
0-8022
24 QMessageLogger("painting/qbackingstore.cpp", 101, __PRETTY_FUNCTION__).warning("QBackingStore::flush() called with non-exposed window, behavior is undefined");
executed: QMessageLogger("painting/qbackingstore.cpp", 101, __PRETTY_FUNCTION__).warning("QBackingStore::flush() called with non-exposed window, behavior is undefined");
Execution Count:9
9
25 -
26 d_ptr->platformBackingStore->flush(win, region, offset); -
27}
executed: }
Execution Count:8022
8022
28 -
29 -
30 -
31 -
32 -
33 -
34QPaintDevice *QBackingStore::paintDevice() -
35{ -
36 return d_ptr->platformBackingStore->paintDevice();
executed: return d_ptr->platformBackingStore->paintDevice();
Execution Count:9395
9395
37} -
38 -
39 -
40 -
41 -
42QBackingStore::QBackingStore(QWindow *window) -
43 : d_ptr(new QBackingStorePrivate(window)) -
44{ -
45 d_ptr->platformBackingStore = QGuiApplicationPrivate::platformIntegration()->createPlatformBackingStore(window); -
46}
executed: }
Execution Count:2500
2500
47 -
48 -
49 -
50 -
51QBackingStore::~QBackingStore() -
52{ -
53 delete d_ptr->platformBackingStore; -
54}
executed: }
Execution Count:2499
2499
55 -
56 -
57 -
58 -
59 -
60QWindow* QBackingStore::window() const -
61{ -
62 return d_ptr->window;
executed: return d_ptr->window;
Execution Count:2
2
63} -
64void QBackingStore::beginPaint(const QRegion &region) -
65{ -
66 d_ptr->platformBackingStore->beginPaint(region); -
67}
executed: }
Execution Count:6185
6185
68 -
69 -
70 -
71 -
72 -
73 -
74void QBackingStore::endPaint() -
75{ -
76 d_ptr->platformBackingStore->endPaint(); -
77}
executed: }
Execution Count:6185
6185
78 -
79 -
80 -
81 -
82 -
83 -
84void QBackingStore::resize(const QSize &size) -
85{ -
86 d_ptr->size = size; -
87 d_ptr->platformBackingStore->resize(size, d_ptr->staticContents); -
88}
executed: }
Execution Count:2703
2703
89 -
90 -
91 -
92 -
93QSize QBackingStore::size() const -
94{ -
95 return d_ptr->size;
executed: return d_ptr->size;
Execution Count:9055
9055
96} -
97 -
98 -
99 -
100 -
101 -
102 -
103 -
104bool QBackingStore::scroll(const QRegion &area, int dx, int dy) -
105{ -
106 (void)area;; -
107 (void)dx;; -
108 (void)dy;; -
109 -
110 return d_ptr->platformBackingStore->scroll(area, dx, dy);
executed: return d_ptr->platformBackingStore->scroll(area, dx, dy);
Execution Count:1975
1975
111} -
112 -
113void QBackingStore::setStaticContents(const QRegion &region) -
114{ -
115 d_ptr->staticContents = region; -
116}
never executed: }
0
117 -
118QRegion QBackingStore::staticContents() const -
119{ -
120 return d_ptr->staticContents;
never executed: return d_ptr->staticContents;
0
121} -
122 -
123bool QBackingStore::hasStaticContents() const -
124{ -
125 return !d_ptr->staticContents.isEmpty();
never executed: return !d_ptr->staticContents.isEmpty();
0
126} -
127 -
128void __attribute__((visibility("default"))) qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset) -
129{ -
130 -
131 uchar *mem = const_cast<uchar*>(const_cast<const QImage &>(img).bits()); -
132 -
133 int lineskip = img.bytesPerLine(); -
134 int depth = img.depth() >> 3; -
135 -
136 const QRect imageRect(0, 0, img.width(), img.height()); -
137 const QRect r = rect & imageRect & imageRect.translated(-offset); -
138 const QPoint p = rect.topLeft() + offset; -
139 -
140 if (r.isEmpty())
partially evaluated: r.isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1903
0-1903
141 return;
never executed: return;
0
142 -
143 const uchar *src; -
144 uchar *dest; -
145 -
146 if (r.top() < p.y()) {
evaluated: r.top() < p.y()
TRUEFALSE
yes
Evaluation Count:377
yes
Evaluation Count:1526
377-1526
147 src = mem + r.bottom() * lineskip + r.left() * depth; -
148 dest = mem + (p.y() + r.height() - 1) * lineskip + p.x() * depth; -
149 lineskip = -lineskip; -
150 } else {
executed: }
Execution Count:377
377
151 src = mem + r.top() * lineskip + r.left() * depth; -
152 dest = mem + p.y() * lineskip + p.x() * depth; -
153 }
executed: }
Execution Count:1526
1526
154 -
155 const int w = r.width(); -
156 int h = r.height(); -
157 const int bytes = w * depth; -
158 -
159 -
160 if (offset.y() == 0 && qAbs(offset.x()) < w) {
evaluated: offset.y() == 0
TRUEFALSE
yes
Evaluation Count:953
yes
Evaluation Count:950
evaluated: qAbs(offset.x()) < w
TRUEFALSE
yes
Evaluation Count:916
yes
Evaluation Count:37
37-953
161 do { -
162 ::memmove(dest, src, bytes); -
163 dest += lineskip; -
164 src += lineskip; -
165 } while (--h);
executed: }
Execution Count:149976
evaluated: --h
TRUEFALSE
yes
Evaluation Count:149060
yes
Evaluation Count:916
916-149976
166 } else {
executed: }
Execution Count:916
916
167 do { -
168 ::memcpy(dest, src, bytes); -
169 dest += lineskip; -
170 src += lineskip; -
171 } while (--h);
executed: }
Execution Count:147620
evaluated: --h
TRUEFALSE
yes
Evaluation Count:146633
yes
Evaluation Count:987
987-147620
172 }
executed: }
Execution Count:987
987
173} -
174 -
175QPlatformBackingStore *QBackingStore::handle() const -
176{ -
177 return d_ptr->platformBackingStore;
never executed: return d_ptr->platformBackingStore;
0
178} -
179 -
180 -
181 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial