summaryrefslogtreecommitdiffstats
path: root/tests/manual/texture-sharing-2/minimal-compositor.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/texture-sharing-2/minimal-compositor.qml')
-rw-r--r--tests/manual/texture-sharing-2/minimal-compositor.qml43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/manual/texture-sharing-2/minimal-compositor.qml b/tests/manual/texture-sharing-2/minimal-compositor.qml
new file mode 100644
index 000000000..d12216156
--- /dev/null
+++ b/tests/manual/texture-sharing-2/minimal-compositor.qml
@@ -0,0 +1,43 @@
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Window
+import QtWayland.Compositor
+import QtWayland.Compositor.XdgShell
+import QtWayland.Compositor.WlShell
+
+// importing the texture sharing extension:
+import QtWayland.Compositor.TextureSharingExtension
+
+WaylandCompositor {
+ WaylandOutput {
+ sizeFollowsWindow: true
+ window: Window {
+ width: 1024
+ height: 768
+ visible: true
+ Repeater {
+ model: shellSurfaces
+ ShellSurfaceItem {
+ shellSurface: modelData
+ onSurfaceDestroyed: shellSurfaces.remove(index)
+ }
+ }
+ }
+ }
+ WlShell {
+ onWlShellSurfaceCreated:
+ shellSurfaces.append({shellSurface: shellSurface});
+ }
+ XdgShell {
+ onToplevelCreated:
+ shellSurfaces.append({shellSurface: xdgSurface});
+ }
+ ListModel { id: shellSurfaces }
+
+ // instantiating the texture sharing extension:
+ TextureSharingExtension {
+ imageSearchPath: ".;/tmp;/usr/share/pixmaps"
+ }
+}