/* 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_egl_backend.h" #include "drm_object_plane.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; std::shared_ptr texture() const; uint32_t drmFormat() const; private: GLint internalFormat(const GbmFormat &format) const; std::shared_ptr m_texture; std::unique_ptr m_fbo; std::unique_ptr m_vbo; const QSize m_size; const uint32_t m_drmFormat; }; }