kwin/src/compositor_wayland.h
Xaver Hugl 06ba20cc2e compositor: move the composite method into X11 and Wayland implementations
There's a bunch of differences between them, like direct scanout, adaptive sync, content type
and the actually painted output in the Wayland session but not on Xorg, so keeping them in one
method doesn't really make sense
2024-04-29 14:56:20 +02:00

43 lines
956 B
C++

/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2011 Arthur Arlt <a.arlt@stud.uni-heidelberg.de>
SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "compositor.h"
#include "effect/globals.h"
namespace KWin
{
class KWIN_EXPORT WaylandCompositor final : public Compositor
{
Q_OBJECT
public:
static WaylandCompositor *create(QObject *parent = nullptr);
~WaylandCompositor() override;
protected:
void start() override;
void stop() override;
void composite(RenderLoop *loop) override;
private:
explicit WaylandCompositor(QObject *parent);
bool attemptOpenGLCompositing();
bool attemptQPainterCompositing();
void addOutput(Output *output);
void removeOutput(Output *output);
CompositingType m_selectedCompositor = NoCompositing;
};
} // namespace KWin