summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcssstyle.h
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2022-11-14 09:12:34 +0100
committerMikolaj Boc <mikolaj.boc@qt.io>2022-11-26 11:23:13 +0100
commitfa27a59ec3cfc173d5ff202feb23e8b6e398dac9 (patch)
treea34f7a199611118e826a029a5bebf93f9425b32d /src/plugins/platforms/wasm/qwasmcssstyle.h
parentc675c1c56d3c00b3c1de5aee8c7c6f7eeeb70bc1 (diff)
Use the browser compositor for drawing windows on WASM
Make the browser compositor draw the window non-client area (using css + html). Get rid of OpenGL usage in non-OpenGL windows and use canvas 2d context instead to blit the texture (QImage). Also, as part of the change, remove the deprecated canvas element support in QScreen. Fixes: QTBUG-107116 Fixes: QTBUG-107219 Change-Id: I65f0d91831c806315685ca681ac0e416673f5cd5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcssstyle.h')
-rw-r--r--src/plugins/platforms/wasm/qwasmcssstyle.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcssstyle.h b/src/plugins/platforms/wasm/qwasmcssstyle.h
new file mode 100644
index 0000000000..fc4cc2d54c
--- /dev/null
+++ b/src/plugins/platforms/wasm/qwasmcssstyle.h
@@ -0,0 +1,18 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef QWASMCSSSTYLE_H
+#define QWASMCSSSTYLE_H
+
+#include <QtCore/qglobal.h>
+
+#include <emscripten/val.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QWasmCSSStyle {
+emscripten::val createStyleElement(emscripten::val parent);
+}
+
+QT_END_NAMESPACE
+#endif // QWASMINLINESTYLEREGISTRY_H