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 <laszlo.agocs@theqtcompany.com>bb10
parent
b4d2ae0676
commit
3650cbc323
|
|
@ -411,7 +411,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i
|
|||
|
||||
context->swapBuffers(window);
|
||||
}
|
||||
|
||||
#endif
|
||||
/*!
|
||||
Implemented in subclasses to return the content of the backingstore as a QImage.
|
||||
|
||||
|
|
@ -424,7 +424,7 @@ QImage QPlatformBackingStore::toImage() const
|
|||
{
|
||||
return QImage();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
/*!
|
||||
May be reimplemented in subclasses to return the content of the
|
||||
backingstore as an OpenGL texture. \a dirtyRegion is the part of the
|
||||
|
|
|
|||
|
|
@ -121,7 +121,9 @@ public:
|
|||
virtual void composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset,
|
||||
QPlatformTextureList *textures, QOpenGLContext *context,
|
||||
bool translucentBackground);
|
||||
#endif
|
||||
virtual QImage toImage() const;
|
||||
#ifndef QT_NO_OPENGL
|
||||
enum TextureFlag {
|
||||
TextureSwizzle = 0x01,
|
||||
TextureFlip = 0x02,
|
||||
|
|
|
|||
Loading…
Reference in New Issue