From 53a6f7b7836ef5084106ed63f6745c20d663affa Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 6 Aug 2019 13:15:35 +0200 Subject: eglfs: Fix raster windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also sanitize the initial WebAssembly hack. Both eglfs and wasm lack the concept of true raster windows. A QWindow with RasterSurface is rendered with OpenGL no matter what. The two platforms took two different approaches to work around the rest of the machinery: - wasm disabled the QOpenGLContext warning for non-OpenGL QWindows, - eglfs forced the QWindow surfaceType to OpenGLSurface whenever it was originally set to RasterSurface. Now, the latter breaks since c4e9eabc309a275efc222f4127f31ba4677259b7, leaving all raster window applications failing on eglfs, because flush in the backingstore is now checking the surface type and disallows OpenGLSurface windows. (just like how QOpenGLContext disallows RasterSurface windows) To solve all this correctly, introduce a new platform capability, OpenGLOnRasterSurface, and remove the special handling in the platform plugins. Change-Id: I7785dfb1c955577bbdccdc14ebaaac5babdec57c Fixes: QTBUG-77100 Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qplatformintegration.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qplatformintegration.h') diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h index 1179daeb32..0b999de264 100644 --- a/src/gui/kernel/qplatformintegration.h +++ b/src/gui/kernel/qplatformintegration.h @@ -103,7 +103,8 @@ public: AllGLFunctionsQueryable, ApplicationIcon, SwitchableWidgetComposition, - TopStackedNativeChildWindows + TopStackedNativeChildWindows, + OpenGLOnRasterSurface }; virtual ~QPlatformIntegration() { } -- cgit v1.2.3