kwin/src/backends/drm/shadowbuffer.h
Xaver Hugl f2b29e3555 backends/drm: deep color support
This commit makes 10 bits per color channel the default color depth, which
should reduce banding on outputs that support color formats with more than
8 bits per color channel. In order to support this the commit also removes
the dependency of the EglGbmBackend on a specific format and EglConfig and
instead makes those per-Output properties.
2021-12-25 18:32:58 +00:00

44 lines
765 B
C++

/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2021 Xaver Hugl <xaver.hugl@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <QSize>
#include <kwinglutils.h>
#include "egl_gbm_backend.h"
namespace KWin
{
class DrmAbstractOutput;
class ShadowBuffer
{
public:
ShadowBuffer(const QSize &size, const GbmFormat &format);
~ShadowBuffer();
bool isComplete() const;
void bind();
void render(DrmAbstractOutput *output);
int texture() const;
QSize textureSize() const;
private:
GLint internalFormat(const GbmFormat &format);
GLuint m_texture;
GLuint m_framebuffer;
QScopedPointer<GLVertexBuffer> m_vbo;
QSize m_size;
};
}