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
|
|
|
|
|
|
|
#include "dmabuftexture.h"
|
|
|
|
|
|
|
|
#include "kwineglimagetexture.h"
|
|
|
|
#include "kwinglutils.h"
|
|
|
|
|
2020-08-21 10:32:04 +00:00
|
|
|
namespace KWin
|
|
|
|
{
|
2020-07-22 17:29:23 +00:00
|
|
|
|
|
|
|
DmaBufTexture::DmaBufTexture(KWin::GLTexture *texture)
|
|
|
|
: m_texture(texture)
|
2022-02-15 11:17:43 +00:00
|
|
|
, m_framebuffer(new KWin::GLRenderTarget(texture))
|
2020-07-22 17:29:23 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
DmaBufTexture::~DmaBufTexture() = default;
|
|
|
|
|
2021-11-14 13:43:53 +00:00
|
|
|
KWin::GLTexture *DmaBufTexture::texture() const
|
|
|
|
{
|
|
|
|
return m_texture.data();
|
|
|
|
}
|
|
|
|
|
2020-07-22 17:29:23 +00:00
|
|
|
KWin::GLRenderTarget *DmaBufTexture::framebuffer() const
|
|
|
|
{
|
|
|
|
return m_framebuffer.data();
|
|
|
|
}
|
|
|
|
|
2020-08-21 10:32:04 +00:00
|
|
|
} // namespace KWin
|