kwin/src/plugins/platforms/drm/abstract_egl_drm_backend.h

60 lines
1.3 KiB
C
Raw Normal View History

/*
* KWin - the KDE window manager
* This file is part of the KDE project.
*
* SPDX-FileCopyrightText: 2020 Xaver Hugl <xaver.hugl@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KWIN_ABSTRACTEGLDRMBACKEND_H
#define KWIN_ABSTRACTEGLDRMBACKEND_H
#include "abstract_egl_backend.h"
namespace KWin
{
class DrmBackend;
class DrmGpu;
2020-12-01 16:58:24 +00:00
class DrmOutput;
class AbstractEglDrmBackend : public AbstractEglBackend
{
public:
void screenGeometryChanged(const QSize &size) override;
virtual int screenCount() const = 0;
2020-12-01 16:58:24 +00:00
virtual void addOutput(DrmOutput *output) = 0;
virtual void removeOutput(DrmOutput *output) = 0;
virtual int getDmabufForSecondaryGpuOutput(AbstractOutput *output, uint32_t *format, uint32_t *stride) {
Q_UNUSED(output)
Q_UNUSED(format)
Q_UNUSED(stride)
return 0;
}
virtual QRegion beginFrameForSecondaryGpu(AbstractOutput *output) {
Q_UNUSED(output)
return QRegion();
}
2021-04-27 11:49:53 +00:00
DrmGpu *gpu() const {
return m_gpu;
}
static AbstractEglDrmBackend *renderingBackend() {
return static_cast<AbstractEglDrmBackend*>(primaryBackend());
}
protected:
AbstractEglDrmBackend(DrmBackend *drmBackend, DrmGpu *gpu);
DrmBackend *m_backend;
DrmGpu *m_gpu;
};
}
#endif // KWIN_ABSTRACTEGLDRMBACKEND_H