diff options
author | Andy Nichols <andy.nichols@qt.io> | 2016-04-28 16:07:52 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2016-04-30 20:20:31 +0000 |
commit | c7b6e1345059faa73d0f5e2e436ae1b80850f16a (patch) | |
tree | e39aeb603719ea1265283d19704930e7dc19ce2f /src/plugins/platforms/xcb | |
parent | 3650cbc323eb4fbd32668b97212118c4d0acddc0 (diff) |
Add QPlatformBackingStore::toImage() implementations
On platforms where it makes sense, add the implementation that makes
returning a QImage possible. This makes it possible to grab raster
windows.
Change-Id: I89241728aa6f7811c56bb66cd86a64aa961d71f8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbbackingstore.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbbackingstore.h | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index 9fa9db158b..d635c69175 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -549,12 +549,10 @@ void QXcbBackingStore::endPaint() } } -#ifndef QT_NO_OPENGL QImage QXcbBackingStore::toImage() const { return m_image && m_image->image() ? *m_image->image() : QImage(); } -#endif QPlatformGraphicsBuffer *QXcbBackingStore::graphicsBuffer() const { diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.h b/src/plugins/platforms/xcb/qxcbbackingstore.h index 1f5652d918..4b8c040729 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.h +++ b/src/plugins/platforms/xcb/qxcbbackingstore.h @@ -62,8 +62,8 @@ public: void composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, QOpenGLContext *context, bool translucentBackground) Q_DECL_OVERRIDE; - QImage toImage() const Q_DECL_OVERRIDE; #endif + QImage toImage() const Q_DECL_OVERRIDE; QPlatformGraphicsBuffer *graphicsBuffer() const Q_DECL_OVERRIDE; |