kwin/src/renderbackend.h

37 lines
769 B
C
Raw Normal View History

/*
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
{
class AbstractOutput;
class OverlayWindow;
/**
* 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;
virtual OverlayWindow *overlayWindow() const;
virtual QRegion beginFrame(AbstractOutput *output) = 0;
virtual void endFrame(AbstractOutput *output, const QRegion &renderedRegion, const QRegion &damagedRegion) = 0;
};
} // namespace KWin