diff options
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbbackingstore.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index 366e043e98..1579797f85 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -280,6 +280,11 @@ void QXcbBackingStore::beginPaint(const QRegion ®ion) } } +QImage QXcbBackingStore::toImage() const +{ + return m_image && m_image->image() ? *m_image->image() : QImage(); +} + void QXcbBackingStore::flush(QWindow *window, const QRegion ®ion, const QPoint &offset) { if (!m_image || m_image->size().isEmpty()) @@ -319,6 +324,25 @@ void QXcbBackingStore::flush(QWindow *window, const QRegion ®ion, const QPoin } } +#ifndef QT_NO_OPENGL +void QXcbBackingStore::composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset, + QPlatformTextureList *textures, QOpenGLContext *context) +{ + QPlatformBackingStore::composeAndFlush(window, region, offset, textures, context); + + Q_XCB_NOOP(connection()); + + if (m_syncingResize) { + QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window->handle()); + connection()->sync(); + m_syncingResize = false; + platformWindow->updateSyncRequestCounter(); + } else { + xcb_flush(xcb_connection()); + } +} +#endif // QT_NO_OPENGL + void QXcbBackingStore::resize(const QSize &size, const QRegion &) { if (m_image && size == m_image->size()) |