Changeset View
Changeset View
Standalone View
Standalone View
src/client/surface.cpp
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Line(s) | |||||
234 | } | 234 | } | ||
235 | 235 | | |||
236 | void Surface::damage(const QRect &rect) | 236 | void Surface::damage(const QRect &rect) | ||
237 | { | 237 | { | ||
238 | Q_ASSERT(isValid()); | 238 | Q_ASSERT(isValid()); | ||
239 | wl_surface_damage(d->surface, rect.x(), rect.y(), rect.width(), rect.height()); | 239 | wl_surface_damage(d->surface, rect.x(), rect.y(), rect.width(), rect.height()); | ||
240 | } | 240 | } | ||
241 | 241 | | |||
242 | void Surface::damageBuffer(const QRegion ®ion) | ||||
243 | { | ||||
244 | for (const QRect &r : region) { | ||||
zzag: `for (const QRect &r : region) {`
rects() is obsolete. http://doc.qt.io/qt-5/qregion-obsolete. | |||||
245 | damageBuffer(r); | ||||
246 | } | ||||
247 | } | ||||
248 | | ||||
249 | void Surface::damageBuffer(const QRect &rect) | ||||
250 | { | ||||
251 | Q_ASSERT(isValid()); | ||||
252 | wl_surface_damage_buffer(d->surface, rect.x(), rect.y(), rect.width(), rect.height()); | ||||
253 | } | ||||
254 | | ||||
242 | void Surface::attachBuffer(wl_buffer *buffer, const QPoint &offset) | 255 | void Surface::attachBuffer(wl_buffer *buffer, const QPoint &offset) | ||
243 | { | 256 | { | ||
244 | Q_ASSERT(isValid()); | 257 | Q_ASSERT(isValid()); | ||
245 | wl_surface_attach(d->surface, buffer, offset.x(), offset.y()); | 258 | wl_surface_attach(d->surface, buffer, offset.x(), offset.y()); | ||
246 | } | 259 | } | ||
247 | 260 | | |||
248 | void Surface::attachBuffer(Buffer *buffer, const QPoint &offset) | 261 | void Surface::attachBuffer(Buffer *buffer, const QPoint &offset) | ||
249 | { | 262 | { | ||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |
for (const QRect &r : region) {
rects() is obsolete. http://doc.qt.io/qt-5/qregion-obsolete.html#rects