diff options
author | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-11-28 16:35:24 +0100 |
---|---|---|
committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-01-30 20:10:25 +0100 |
commit | 0eea2238f37a5eaa83ada6cd262eceaed20e415c (patch) | |
tree | 02f88e6033c5bb4ef08ebe4bc88b932725a576f4 /src/plugins/platforms/wasm/qwasmintegration.cpp | |
parent | 39daa368d47bc676efb19a8e7478ef1c270ae959 (diff) |
Quasi-support for offscreen surface on WASM
Since context sharing is not currently supported with WebGL, offscreen
contexts have a limited usability on Qt for WASM.
If a context is shared, use the same underlaying WebGL context so that
the two can actually share resources. This is not full-blown context
sharing by any means but it makes e.g. the Open GL widget work as the
readback texture for it is 'shared' between the virtual Qt contexts.
If no sharing is desired, we use an OffscreenCanvas and actually create
a separate WebGL context.
Fixes: QTBUG-107558
Pick-to: 6.5
Change-Id: If57e44739ddb57c167d5f8881a74d8dee52531f6
Reviewed-by: MikoĊaj Boc <Mikolaj.Boc@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.cpp')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmintegration.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp index b92e456668..9f139ad446 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.cpp +++ b/src/plugins/platforms/wasm/qwasmintegration.cpp @@ -184,7 +184,7 @@ void QWasmIntegration::removeBackingStore(QWindow* window) #ifndef QT_NO_OPENGL QPlatformOpenGLContext *QWasmIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const { - return new QWasmOpenGLContext(context->format()); + return new QWasmOpenGLContext(context); } #endif |