/* KWin - the KDE window manager This file is part of the KDE project. SPDX-FileCopyrightText: 2021 Xaver Hugl SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include #include #include "drm_object_plane.h" #include "egl_gbm_backend.h" namespace KWin { class ShadowBuffer { public: ShadowBuffer(const QSize &size, const GbmFormat &format); ~ShadowBuffer(); bool isComplete() const; void render(DrmPlane::Transformations transform); GLFramebuffer *fbo() const; QSharedPointer texture() const; uint32_t drmFormat() const; private: GLint internalFormat(const GbmFormat &format) const; QSharedPointer m_texture; QScopedPointer m_fbo; QScopedPointer m_vbo; const QSize m_size; const uint32_t m_drmFormat; }; }