File indexing completed on 2024-11-10 04:57:06
0001 /* 0002 SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <memory> 0010 0011 namespace KWin 0012 { 0013 class GLFramebuffer; 0014 class GLTexture; 0015 class GraphicsBuffer; 0016 0017 class ScreenCastDmaBufTexture 0018 { 0019 public: 0020 explicit ScreenCastDmaBufTexture(std::shared_ptr<GLTexture> texture, GraphicsBuffer *buffer); 0021 virtual ~ScreenCastDmaBufTexture(); 0022 0023 GraphicsBuffer *buffer() const; 0024 GLTexture *texture() const; 0025 GLFramebuffer *framebuffer() const; 0026 0027 protected: 0028 std::shared_ptr<GLTexture> m_texture; 0029 std::unique_ptr<GLFramebuffer> m_framebuffer; 0030 GraphicsBuffer *m_buffer; 0031 }; 0032 0033 }