2020-07-22 17:29:23 +00:00
|
|
|
/*
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
*/
|
2020-07-22 17:29:23 +00:00
|
|
|
|
|
|
|
#pragma once
|
2022-06-11 08:31:54 +00:00
|
|
|
|
2020-07-22 17:29:23 +00:00
|
|
|
#include "kwin_export.h"
|
2022-05-13 09:06:17 +00:00
|
|
|
|
2022-06-11 08:31:54 +00:00
|
|
|
#include "dmabufattributes.h"
|
|
|
|
|
2022-05-17 10:36:34 +00:00
|
|
|
#include <memory>
|
2020-07-22 17:29:23 +00:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
2022-04-11 16:46:10 +00:00
|
|
|
class GLFramebuffer;
|
2020-07-22 17:29:23 +00:00
|
|
|
class GLTexture;
|
|
|
|
|
|
|
|
class KWIN_EXPORT DmaBufTexture
|
|
|
|
{
|
|
|
|
public:
|
2022-05-17 10:36:34 +00:00
|
|
|
explicit DmaBufTexture(std::shared_ptr<GLTexture> texture, const DmaBufAttributes &attributes);
|
2020-07-22 17:29:23 +00:00
|
|
|
virtual ~DmaBufTexture();
|
|
|
|
|
2022-05-13 09:06:17 +00:00
|
|
|
DmaBufAttributes attributes() const;
|
|
|
|
GLTexture *texture() const;
|
|
|
|
GLFramebuffer *framebuffer() const;
|
2020-07-22 17:29:23 +00:00
|
|
|
|
|
|
|
protected:
|
2022-05-17 10:36:34 +00:00
|
|
|
std::shared_ptr<GLTexture> m_texture;
|
|
|
|
std::unique_ptr<GLFramebuffer> m_framebuffer;
|
2022-05-13 09:06:17 +00:00
|
|
|
DmaBufAttributes m_attributes;
|
2020-07-22 17:29:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|