File indexing completed on 2024-04-28 05:30:13

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2011 Arthur Arlt <a.arlt@stud.uni-heidelberg.de>
0006     SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #pragma once
0012 
0013 #include "compositor.h"
0014 #include "effect/globals.h"
0015 
0016 namespace KWin
0017 {
0018 
0019 class KWIN_EXPORT WaylandCompositor final : public Compositor
0020 {
0021     Q_OBJECT
0022 public:
0023     static WaylandCompositor *create(QObject *parent = nullptr);
0024     ~WaylandCompositor() override;
0025 
0026 protected:
0027     void start() override;
0028     void stop() override;
0029 
0030 private:
0031     explicit WaylandCompositor(QObject *parent);
0032 
0033     bool attemptOpenGLCompositing();
0034     bool attemptQPainterCompositing();
0035 
0036     void addOutput(Output *output);
0037     void removeOutput(Output *output);
0038 
0039     CompositingType m_selectedCompositor = NoCompositing;
0040 };
0041 
0042 } // namespace KWin