kwin/dmabuftexture.cpp
Vlad Zahorodnii 0dda9dc7d0 Use namespace kwin only in autotests
In kwin core, we prefer not to put `using namespace KWin` because it
makes defining forward declared classes more trickier.
2020-08-21 22:06:36 +00:00

28 lines
533 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::GLRenderTarget(*m_texture))
{
}
DmaBufTexture::~DmaBufTexture() = default;
KWin::GLRenderTarget *DmaBufTexture::framebuffer() const
{
return m_framebuffer.data();
}
} // namespace KWin