2021-11-10 10:34:18 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "kwinglobals.h"
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
2021-11-11 11:24:02 +00:00
|
|
|
class AbstractOutput;
|
2021-11-11 09:48:43 +00:00
|
|
|
class OverlayWindow;
|
|
|
|
|
2021-11-10 10:34:18 +00:00
|
|
|
/**
|
|
|
|
* The RenderBackend class is the base class for all rendering backends.
|
|
|
|
*/
|
|
|
|
class KWIN_EXPORT RenderBackend : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit RenderBackend(QObject *parent = nullptr);
|
|
|
|
|
|
|
|
virtual CompositingType compositingType() const = 0;
|
2021-11-11 09:48:43 +00:00
|
|
|
virtual OverlayWindow *overlayWindow() const;
|
2021-11-11 11:24:02 +00:00
|
|
|
|
|
|
|
virtual QRegion beginFrame(AbstractOutput *output) = 0;
|
|
|
|
virtual void endFrame(AbstractOutput *output, const QRegion &renderedRegion, const QRegion &damagedRegion) = 0;
|
2021-11-10 10:34:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWin
|