diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2023-02-13 08:10:29 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-16 07:58:44 +0000 |
commit | 7d6b144818774573e07edbd652ad2209377046b3 (patch) | |
tree | 45ae230b3cdb9684c68b038dfa06ef58d249c7c7 /examples | |
parent | 90e2ade38721febbf2cb8897779153de4d789a10 (diff) | |
download | qtwayland-7d6b144818774573e07edbd652ad2209377046b3.tar.gz |
Move server-buffer example to manual tests
This is undocumented and demonstrates an experimental feature which
was never maintained or exercised. It's a nice feature, so we keep
the example around for when we get the time to bring it back.
Task-number: QTBUG-110993
Change-Id: I045cb2ef02a50017a26226c493607100ea0f1b95
Reviewed-by: Inho Lee <inho.lee@qt.io>
(cherry picked from commit acb68bd3bbbc0001bcf460dd175ff92cc3ce594a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
21 files changed, 0 insertions, 589 deletions
diff --git a/examples/wayland/CMakeLists.txt b/examples/wayland/CMakeLists.txt index 2783d7a9..93d7efa9 100644 --- a/examples/wayland/CMakeLists.txt +++ b/examples/wayland/CMakeLists.txt @@ -21,7 +21,4 @@ if(TARGET Qt::Quick AND TARGET Qt::WaylandClient) qt_internal_add_example(custom-extension) qt_internal_add_example(custom-shell) endif() -if(QT_FEATURE_opengl AND TARGET Qt::Quick AND TARGET Qt::WaylandClient) - qt_internal_add_example(server-buffer) -endif() endif() diff --git a/examples/wayland/server-buffer/CMakeLists.txt b/examples/wayland/server-buffer/CMakeLists.txt deleted file mode 100644 index 973063c7..00000000 --- a/examples/wayland/server-buffer/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.16) -project(server-buffer) - -add_subdirectory(cpp-client) -add_subdirectory(compositor) diff --git a/examples/wayland/server-buffer/README b/examples/wayland/server-buffer/README deleted file mode 100644 index da20b0f5..00000000 --- a/examples/wayland/server-buffer/README +++ /dev/null @@ -1,32 +0,0 @@ -This example shows how to use the low-level server buffer extension. This -version of Qt also provides a texture sharing extension that provides more -functionality and convenience for sharing graphical assets with Qt Quick -clients: see the texture-sharing example. - -Compile up both compositor and client. - -If you have the dmabuf-server buffer integration (and you are running Mesa) -then start the compositor with: - -$ QT_WAYLAND_SERVER_BUFFER_INTEGRATION=dmabuf-server ./compositor - - -Note: if you are running a compositor on an X11 desktop, you also need to -set QT_XCB_GL_INTEGRATION=xcb_egl as usual. - -The compositor broadcasts the name of the server buffer integration to -all clients through the hardware integration extension. Therefore, -all you need to do is to start the client with - -$ ./cpp-client -platform wayland - -The client will show all the buffers shared by the compositor. - -For testing on desktop, there is also a shared memory based server buffer -integration that works with any graphics hardware: - -$ QT_WAYLAND_SERVER_BUFFER_INTEGRATION=shm-emulation-server QT_XCB_GL_INTEGRATION=xcb_egl ./compositor - -Note: the shm-emulation-server integration does not actually share graphics -buffers, so it will not give any graphics memory savings. It is intended solely -for testing during development and should never be used in production. diff --git a/examples/wayland/server-buffer/compositor/CMakeLists.txt b/examples/wayland/server-buffer/compositor/CMakeLists.txt deleted file mode 100644 index 5f4fb0c5..00000000 --- a/examples/wayland/server-buffer/compositor/CMakeLists.txt +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required(VERSION 3.16) -project(compositor) - -set(CMAKE_AUTOMOC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/wayland/server-buffer/compositor") - -find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml WaylandCompositor) - -qt_add_executable(compositor - main.cpp - sharebufferextension.cpp sharebufferextension.h -) - -qt6_generate_wayland_protocol_server_sources(compositor - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/../share-buffer.xml -) - -set_target_properties(compositor PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) - -target_link_libraries(compositor PUBLIC - Qt::Core - Qt::Gui - Qt::Qml - Qt::WaylandCompositorPrivate -) - -# Resources: -set(compositor_resource_files - "images/Siberischer_tiger_de_edit02.jpg" - "images/background.png" - "qml/main.qml" -) - -qt6_add_resources(compositor "compositor" - PREFIX - "/" - FILES - ${compositor_resource_files} -) - -install(TARGETS compositor - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/wayland/server-buffer/compositor/compositor.pro b/examples/wayland/server-buffer/compositor/compositor.pro deleted file mode 100644 index 26334c63..00000000 --- a/examples/wayland/server-buffer/compositor/compositor.pro +++ /dev/null @@ -1,26 +0,0 @@ -QT += core gui qml - -QT += waylandcompositor-private - -CONFIG += wayland-scanner -CONFIG += c++11 -SOURCES += \ - main.cpp \ - sharebufferextension.cpp - -OTHER_FILES = \ - qml/main.qml \ - images/background.jpg - -WAYLANDSERVERSOURCES += \ - ../share-buffer.xml - -RESOURCES += compositor.qrc - -TARGET = compositor - -HEADERS += \ - sharebufferextension.h - -target.path = $$[QT_INSTALL_EXAMPLES]/wayland/server-buffer/compositor -INSTALLS += target diff --git a/examples/wayland/server-buffer/compositor/compositor.qrc b/examples/wayland/server-buffer/compositor/compositor.qrc deleted file mode 100644 index b50594b5..00000000 --- a/examples/wayland/server-buffer/compositor/compositor.qrc +++ /dev/null @@ -1,7 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>images/background.png</file> - <file>images/Siberischer_tiger_de_edit02.jpg</file> - <file>qml/main.qml</file> - </qresource> -</RCC> diff --git a/examples/wayland/server-buffer/compositor/images/Siberischer_tiger_de_edit02.jpg b/examples/wayland/server-buffer/compositor/images/Siberischer_tiger_de_edit02.jpg Binary files differdeleted file mode 100644 index eb1b73f8..00000000 --- a/examples/wayland/server-buffer/compositor/images/Siberischer_tiger_de_edit02.jpg +++ /dev/null diff --git a/examples/wayland/server-buffer/compositor/images/Siberischer_tiger_de_edit02.txt b/examples/wayland/server-buffer/compositor/images/Siberischer_tiger_de_edit02.txt deleted file mode 100644 index 3a26c00d..00000000 --- a/examples/wayland/server-buffer/compositor/images/Siberischer_tiger_de_edit02.txt +++ /dev/null @@ -1,5 +0,0 @@ -Image from https://en.wikipedia.org/wiki/File:Siberischer_tiger_de_edit02.jpg - -Author: S. Taheri, edited by Fir0002 - -License: Creative Commons Attribution-Share Alike 2.5 Generic diff --git a/examples/wayland/server-buffer/compositor/images/background.png b/examples/wayland/server-buffer/compositor/images/background.png Binary files differdeleted file mode 100644 index 292160cd..00000000 --- a/examples/wayland/server-buffer/compositor/images/background.png +++ /dev/null diff --git a/examples/wayland/server-buffer/compositor/main.cpp b/examples/wayland/server-buffer/compositor/main.cpp deleted file mode 100644 index 3c33620c..00000000 --- a/examples/wayland/server-buffer/compositor/main.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include <QtCore/QUrl> -#include <QtCore/QDebug> -#include <QtGui/QGuiApplication> -#include <QtQml/QQmlApplicationEngine> - -#include <QtQml/qqml.h> -#include <QtQml/QQmlEngine> - -#include "sharebufferextension.h" - -static void registerTypes() -{ - qmlRegisterType<ShareBufferExtensionQuickExtension>("io.qt.examples.sharebufferextension", 1, 0, "ShareBufferExtension"); -} - -int main(int argc, char *argv[]) -{ - // Make sure there is a valid OpenGL context in the main thread - qputenv("QSG_RENDER_LOOP", "basic"); - - QGuiApplication app(argc, argv); - registerTypes(); - QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); - - return app.exec(); -} diff --git a/examples/wayland/server-buffer/compositor/qml/main.qml b/examples/wayland/server-buffer/compositor/qml/main.qml deleted file mode 100644 index 484a9563..00000000 --- a/examples/wayland/server-buffer/compositor/qml/main.qml +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtWayland.Compositor -import QtWayland.Compositor.WlShell -import QtQuick.Window - -import io.qt.examples.sharebufferextension - -WaylandCompositor { - WaylandOutput { - sizeFollowsWindow: true - window: Window { - width: 1024 - height: 768 - visible: true - Image { - id: surfaceArea - anchors.fill: parent - fillMode: Image.Tile - source: "qrc:/images/background.png" - smooth: false - } - } - } - - Component { - id: chromeComponent - ShellSurfaceItem { - onSurfaceDestroyed: destroy() - } - } - - WlShell { - onWlShellSurfaceCreated: (shellSurface) => { - chromeComponent.createObject(surfaceArea, { "shellSurface": shellSurface } ); - } - } - - ShareBufferExtension { - } -} diff --git a/examples/wayland/server-buffer/compositor/sharebufferextension.cpp b/examples/wayland/server-buffer/compositor/sharebufferextension.cpp deleted file mode 100644 index b1b499ff..00000000 --- a/examples/wayland/server-buffer/compositor/sharebufferextension.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include "sharebufferextension.h" - -#include <QWaylandSurface> - -#include <QDebug> - -#include <QQuickWindow> - -#include <QPainter> -#include <QPen> - -ShareBufferExtension::ShareBufferExtension(QWaylandCompositor *compositor) - : QWaylandCompositorExtensionTemplate(compositor) -{ -} - -void ShareBufferExtension::initialize() -{ - QWaylandCompositorExtensionTemplate::initialize(); - QWaylandCompositor *compositor = static_cast<QWaylandCompositor *>(extensionContainer()); - init(compositor->display(), 1); -} - -QtWayland::ServerBuffer *ShareBufferExtension::addImage(const QImage &img) -{ - if (!m_server_buffer_integration) { - QWaylandCompositor *compositor = static_cast<QWaylandCompositor *>(extensionContainer()); - - m_server_buffer_integration = QWaylandCompositorPrivate::get(compositor)->serverBufferIntegration(); - if (!m_server_buffer_integration) { - qWarning("Could not find a server buffer integration"); - return nullptr; - } - } - - QImage image = img.convertToFormat(QImage::Format_RGBA8888); - - auto *buffer = m_server_buffer_integration->createServerBufferFromImage(image, QtWayland::ServerBuffer::RGBA32); - - m_server_buffers.append(buffer); - return buffer; -} - -void ShareBufferExtension::createServerBuffers() -{ - QImage image(100,100,QImage::Format_ARGB32_Premultiplied); - image.fill(QColor(0x55,0x0,0x55,0x01)); - { - QPainter p(&image); - QPen pen = p.pen(); - pen.setWidthF(3); - pen.setColor(Qt::red); - p.setPen(pen); - p.drawLine(0,0,100,100); - pen.setColor(Qt::green); - p.setPen(pen); - p.drawLine(100,0,0,100); - pen.setColor(Qt::blue); - p.setPen(pen); - p.drawLine(25,15,75,15); - } - - addImage(image); - - QImage image2(":/images/Siberischer_tiger_de_edit02.jpg"); - addImage(image2); - - m_server_buffers_created = true; -} - - -void ShareBufferExtension::share_buffer_bind_resource(Resource *resource) -{ - if (!m_server_buffers_created) - createServerBuffers(); - - for (auto *buffer : std::as_const(m_server_buffers)) { - qDebug() << "sending" << buffer << "to client"; - struct ::wl_client *client = wl_resource_get_client(resource->handle); - struct ::wl_resource *buffer_resource = buffer->resourceForClient(client); - send_cross_buffer(resource->handle, buffer_resource); - } -} diff --git a/examples/wayland/server-buffer/compositor/sharebufferextension.h b/examples/wayland/server-buffer/compositor/sharebufferextension.h deleted file mode 100644 index 98dcc7d8..00000000 --- a/examples/wayland/server-buffer/compositor/sharebufferextension.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#ifndef SHAREBUFFEREXTENSION_H -#define SHAREBUFFEREXTENSION_H - -#include "wayland-util.h" - -#include <QtCore/QMap> - -#include <QtWaylandCompositor/QWaylandCompositorExtensionTemplate> -#include <QtWaylandCompositor/QWaylandQuickExtension> -#include <QtWaylandCompositor/QWaylandCompositor> - -#include <QtWaylandCompositor/private/qwaylandcompositor_p.h> -#include <QtWaylandCompositor/private/qwlserverbufferintegration_p.h> - -#include "qwayland-server-share-buffer.h" - -QT_BEGIN_NAMESPACE - -namespace QtWayland -{ - class ServerBufferIntegration; -}; - - -class ShareBufferExtension : public QWaylandCompositorExtensionTemplate<ShareBufferExtension> - , public QtWaylandServer::qt_share_buffer -{ - Q_OBJECT -public: - ShareBufferExtension(QWaylandCompositor *compositor = nullptr); - void initialize() override; - -protected slots: - QtWayland::ServerBuffer *addImage(const QImage &image); - -protected: - void share_buffer_bind_resource(Resource *resource) override; - -private: - void createServerBuffers(); - QList<QtWayland::ServerBuffer *> m_server_buffers; - QtWayland::ServerBufferIntegration *m_server_buffer_integration = nullptr; - bool m_server_buffers_created = false; -}; - -Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(ShareBufferExtension) - -QT_END_NAMESPACE - -#endif // SHAREBUFFEREXTENSION_H diff --git a/examples/wayland/server-buffer/cpp-client/CMakeLists.txt b/examples/wayland/server-buffer/cpp-client/CMakeLists.txt deleted file mode 100644 index 01c0df44..00000000 --- a/examples/wayland/server-buffer/cpp-client/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required(VERSION 3.16) -project(server-buffer-cpp-client) - -set(CMAKE_AUTOMOC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/wayland/server-buffer/cpp-client") - -find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL WaylandClient) - -qt_add_executable(server-buffer-cpp-client - main.cpp - sharebufferextension.cpp sharebufferextension.h -) - -qt6_generate_wayland_protocol_client_sources(server-buffer-cpp-client - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/../share-buffer.xml -) - -set_target_properties(server-buffer-cpp-client PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) - -target_link_libraries(server-buffer-cpp-client PUBLIC - Qt::Core - Qt::Gui - Qt::GuiPrivate - Qt::OpenGL - Qt::WaylandClientPrivate -) - -install(TARGETS server-buffer-cpp-client - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/wayland/server-buffer/cpp-client/cpp-client.pro b/examples/wayland/server-buffer/cpp-client/cpp-client.pro deleted file mode 100644 index 6ac55132..00000000 --- a/examples/wayland/server-buffer/cpp-client/cpp-client.pro +++ /dev/null @@ -1,15 +0,0 @@ -QT += waylandclient-private gui-private opengl -CONFIG += wayland-scanner - -WAYLANDCLIENTSOURCES += ../share-buffer.xml - -SOURCES += main.cpp \ - sharebufferextension.cpp - -HEADERS += \ - sharebufferextension.h - -TARGET = server-buffer-cpp-client - -target.path = $$[QT_INSTALL_EXAMPLES]/wayland/server-buffer/cpp-client -INSTALLS += target diff --git a/examples/wayland/server-buffer/cpp-client/main.cpp b/examples/wayland/server-buffer/cpp-client/main.cpp deleted file mode 100644 index 8adac252..00000000 --- a/examples/wayland/server-buffer/cpp-client/main.cpp +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include <QGuiApplication> -#include <QtGui/private/qguiapplication_p.h> -#include <QOpenGLWindow> -#include <QOpenGLTexture> -#include <QOpenGLTextureBlitter> -#include <QPainter> -#include <QMouseEvent> -#include <QPlatformSurfaceEvent> - -#include <QtWaylandClient/private/qwaylanddisplay_p.h> -#include <QtWaylandClient/private/qwaylandintegration_p.h> -#include <QtWaylandClient/private/qwaylandserverbufferintegration_p.h> -#include "sharebufferextension.h" - -#include <QDebug> -#include <QtGui/qpa/qplatformnativeinterface.h> -#include <QTimer> -#include <QMap> - -class TestWindow : public QOpenGLWindow -{ - Q_OBJECT - -public: - TestWindow() - { - m_extension = new ShareBufferExtension; - connect(m_extension, SIGNAL(bufferReceived(QtWaylandClient::QWaylandServerBuffer*)), this, SLOT(receiveBuffer(QtWaylandClient::QWaylandServerBuffer*))); - } - -public slots: - void receiveBuffer(QtWaylandClient::QWaylandServerBuffer *buffer) - { - m_buffers.append(buffer); - update(); - } - -protected: - - void initializeGL() override - { - m_blitter = new QOpenGLTextureBlitter; - m_blitter->create(); - } - - void paintGL() override { - glClearColor(.5, .45, .42, 1.); - glClear(GL_COLOR_BUFFER_BIT); - int x = 0; - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - for (auto buffer: m_buffers) { - m_blitter->bind(); - QPointF pos(x,0); - QSize s(buffer->size()); - QRectF targetRect(pos, s); - QOpenGLTexture *texture = buffer->toOpenGlTexture(); - auto surfaceOrigin = QOpenGLTextureBlitter::OriginTopLeft; - QMatrix4x4 targetTransform = QOpenGLTextureBlitter::targetTransform(targetRect, QRect(QPoint(), size())); - m_blitter->blit(texture->textureId(), targetTransform, surfaceOrigin); - m_blitter->release(); - x += s.width() + 10; - } - } - -private: - - QOpenGLTextureBlitter *m_blitter = nullptr; - ShareBufferExtension *m_extension = nullptr; - QList<QtWaylandClient::QWaylandServerBuffer*> m_buffers; - -}; - -int main (int argc, char **argv) -{ - QGuiApplication app(argc, argv); - - TestWindow window; - window.show(); - - return app.exec(); -} - -#include "main.moc" diff --git a/examples/wayland/server-buffer/cpp-client/sharebufferextension.cpp b/examples/wayland/server-buffer/cpp-client/sharebufferextension.cpp deleted file mode 100644 index 3641ec63..00000000 --- a/examples/wayland/server-buffer/cpp-client/sharebufferextension.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include "sharebufferextension.h" -#include <QtWaylandClient/private/qwaylanddisplay_p.h> -#include <QtWaylandClient/private/qwaylandintegration_p.h> -#include <QtWaylandClient/private/qwaylandserverbufferintegration_p.h> -#include <QtGui/QGuiApplication> -#include <QtGui/private/qguiapplication_p.h> -#include <QtGui/QWindow> -#include <QtGui/QPlatformSurfaceEvent> -#include <QtGui/qpa/qplatformnativeinterface.h> -#include <QDebug> - -QT_BEGIN_NAMESPACE - -ShareBufferExtension::ShareBufferExtension() - : QWaylandClientExtensionTemplate(/* Supported protocol version */ 1 ) -{ - - auto *wayland_integration = static_cast<QtWaylandClient::QWaylandIntegration *>(QGuiApplicationPrivate::platformIntegration()); - m_server_buffer_integration = wayland_integration->serverBufferIntegration(); - if (!m_server_buffer_integration) { - qCritical() << "This application requires a working serverBufferIntegration"; - QGuiApplication::quit(); - } -} - -void ShareBufferExtension::share_buffer_cross_buffer(struct ::qt_server_buffer *buffer) -{ - QtWaylandClient::QWaylandServerBuffer *serverBuffer = m_server_buffer_integration->serverBuffer(buffer); - emit bufferReceived(serverBuffer); -} - - -QT_END_NAMESPACE diff --git a/examples/wayland/server-buffer/cpp-client/sharebufferextension.h b/examples/wayland/server-buffer/cpp-client/sharebufferextension.h deleted file mode 100644 index 78e3ca7f..00000000 --- a/examples/wayland/server-buffer/cpp-client/sharebufferextension.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#ifndef SHAREBUFFEREXTENSION_H -#define SHAREBUFFEREXTENSION_H - -#include <qpa/qwindowsysteminterface.h> -#include <QtWaylandClient/private/qwayland-wayland.h> -#include <QtWaylandClient/qwaylandclientextension.h> -#include "qwayland-share-buffer.h" - -QT_BEGIN_NAMESPACE - -namespace QtWaylandClient { - class QWaylandServerBuffer; - class QWaylandServerBufferIntegration; -}; - -class ShareBufferExtension : public QWaylandClientExtensionTemplate<ShareBufferExtension> - , public QtWayland::qt_share_buffer -{ - Q_OBJECT -public: - ShareBufferExtension(); - -signals: - void bufferReceived(QtWaylandClient::QWaylandServerBuffer *buffer); - -private: - void share_buffer_cross_buffer(struct ::qt_server_buffer *buffer) override; - QtWaylandClient::QWaylandServerBufferIntegration *m_server_buffer_integration = nullptr; -}; - -QT_END_NAMESPACE - -#endif // SHAREBUFFEREXTENSION_H diff --git a/examples/wayland/server-buffer/server-buffer.pro b/examples/wayland/server-buffer/server-buffer.pro deleted file mode 100644 index 0c737ea8..00000000 --- a/examples/wayland/server-buffer/server-buffer.pro +++ /dev/null @@ -1,6 +0,0 @@ -TEMPLATE=subdirs - -SUBDIRS += cpp-client compositor - -EXAMPLE_FILES += \ - share-buffer.xml diff --git a/examples/wayland/server-buffer/share-buffer.xml b/examples/wayland/server-buffer/share-buffer.xml deleted file mode 100644 index 53020c4e..00000000 --- a/examples/wayland/server-buffer/share-buffer.xml +++ /dev/null @@ -1,13 +0,0 @@ -<protocol name="share_buffer"> - - <copyright> - Copyright (C) 2015 The Qt Company Ltd. - SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - </copyright> - - <interface name="qt_share_buffer" version="1"> - <event name="cross_buffer"> - <arg name="buffer" type="object" interface="qt_server_buffer"/> - </event> - </interface> -</protocol> diff --git a/examples/wayland/wayland.pro b/examples/wayland/wayland.pro index 4a4aaf81..c0ff3ec9 100644 --- a/examples/wayland/wayland.pro +++ b/examples/wayland/wayland.pro @@ -22,11 +22,6 @@ qtHaveModule(quick) { SUBDIRS += \ custom-extension \ custom-shell - - qtConfig(opengl) { - SUBDIRS += \ - server-buffer - } } SUBDIRS += hwlayer-compositor } |