1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "qwlserverbufferintegrationfactory_p.h"
5#include "qwlserverbufferintegrationplugin_p.h"
6#include "qwlserverbufferintegration_p.h"
7#include <QtCore/private/qfactoryloader_p.h>
8#include <QtCore/QCoreApplication>
9#include <QtCore/QDir>
10
11QT_BEGIN_NAMESPACE
12
13namespace QtWayland {
14
15Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, qwsbifLoader,
16 (QtWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-server"), Qt::CaseInsensitive))
17
18QStringList ServerBufferIntegrationFactory::keys()
19{
20 return qwsbifLoader->keyMap().values();
21}
22
23ServerBufferIntegration *ServerBufferIntegrationFactory::create(const QString &name, const QStringList &args)
24{
25 return qLoadPlugin<ServerBufferIntegration, ServerBufferIntegrationPlugin>(loader: qwsbifLoader(), key: name, args);
26}
27
28}
29
30QT_END_NAMESPACE
31

source code of qtwayland/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp