kwin/src/dmabuftexture.cpp
Vlad Zahorodnii 992753c24a Rename GLRenderTarget to GLFramebuffer
GLRenderTarget doesn't provide a generic abstraction for framebuffer
objects, so let's call GLRenderTarget what it is - a framebuffer.

Renaming the GLRenderTarget class allows us to use the term "render
target" which abstracts fbos or shm images without creating confusion.
2022-04-12 13:41:19 +03:00

33 lines
610 B
C++

/*
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "dmabuftexture.h"
#include "kwineglimagetexture.h"
#include "kwinglutils.h"
namespace KWin
{
DmaBufTexture::DmaBufTexture(KWin::GLTexture *texture)
: m_texture(texture)
, m_framebuffer(new KWin::GLFramebuffer(texture))
{
}
DmaBufTexture::~DmaBufTexture() = default;
KWin::GLTexture *DmaBufTexture::texture() const
{
return m_texture.data();
}
KWin::GLFramebuffer *DmaBufTexture::framebuffer() const
{
return m_framebuffer.data();
}
} // namespace KWin