diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-03-19 11:12:03 +0100 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-05-13 08:42:27 +0000 |
commit | 02f1420dadfc9b68a31181d60d6dfd6e622ce3e8 (patch) | |
tree | a85e6740799dc8ff2e19cce78bcacaf1a78e8a1f /.tag | |
parent | 4bcd9000baf27241c52931365c91a42c5ae2f83c (diff) |
QGraphicsVideoItem: Always use generic painter when no gl paint engine
If eglfs is used, then there is valid current gl context
and it has OpenGL shader programs (QGLShaderProgram::hasOpenGLShaderPrograms).
This gl context makes QPainterVideoSurface to use QVideoSurfaceGlslPainter
instead of QVideoSurfaceGenericPainter.
QOpenGLCompositorBackingStore uses QImage as a QPaintDevice.
In this case QPainter::beginNativePainting does nothing because of QRasterPaintEngine.
Since QVideoSurfaceGlslPainter is supposed to work with a gl paint engine and not with a raster one,
this prevents rendering any video content.
To work this around, view->setViewport(new QOpenGLWidget) could be used,
where QOpenGL2PaintEngineEx will be taken into account.
If platform was not eglfs, QGLContext::currentContext() could be unavailable
which made QPainterVideoSurface to use QVideoSurfaceGenericPainter
and the video was rendered correctly.
QVideoSurfaceGenericPainter should be used when the paint engine is not gl based.
Task-number: QTBUG-57836
Change-Id: Id4839facddb2494ec5abf729ea80068eb5e2af1d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to '.tag')
0 files changed, 0 insertions, 0 deletions