path: root/src/gui/painting/qplatformbackingstore.h
diff options
authorAndy Nichols <>2016-04-28 13:13:57 +0200
committerAndy Nichols <>2016-04-30 20:20:27 +0000
commit3650cbc323eb4fbd32668b97212118c4d0acddc0 (patch)
tree93d41633a2012dd88ad630fd30068049276c15ad /src/gui/painting/qplatformbackingstore.h
parentb4d2ae0676f6d404fa693068642e3721f0b8d1a8 (diff)
Enable QPlatformBackingStore::toImage() when QT_NO_OPENGL is defined
There are cases where you would want to grab the contents of a QWidget with a QSurfaceType of Raster, and in the case of a -no-opengl build there is no way to get the contents of a QBackingStore. The toImage() function was unnecessarily lumped into the QT_NO_OPENGL ifdef, so this commit removes this truncation of the API. Change-Id: I2644e3dc85339eecd8bae8b91f23ef2f29a7eee4 Reviewed-by: Laszlo Agocs <>
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index 9b09620cce..52e6f40f44 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -121,7 +121,9 @@ public:
virtual void composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,
QPlatformTextureList *textures, QOpenGLContext *context,
bool translucentBackground);
virtual QImage toImage() const;
+#ifndef QT_NO_OPENGL
enum TextureFlag {
TextureSwizzle = 0x01,
TextureFlip = 0x02,