kwin/platformsupport/scenes/opengl/texture.h
Vlad Zahorodnii 1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00

59 lines
1.4 KiB
C++

/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2006 Lubos Lunak <l.lunak@kde.org>
SPDX-FileCopyrightText: 2009, 2010, 2011 Martin Gräßlin <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*********************************************************************/
#pragma once
#include <kwingltexture.h>
#include <kwingltexture_p.h>
namespace KWin
{
class OpenGLBackend;
class SceneOpenGLTexturePrivate;
class WindowPixmap;
class SceneOpenGLTexture : public GLTexture
{
public:
explicit SceneOpenGLTexture(OpenGLBackend *backend);
~SceneOpenGLTexture() override;
SceneOpenGLTexture & operator = (const SceneOpenGLTexture& tex);
void discard() override final;
private:
SceneOpenGLTexture(SceneOpenGLTexturePrivate& dd);
bool load(WindowPixmap *pixmap);
void updateFromPixmap(WindowPixmap *pixmap);
Q_DECLARE_PRIVATE(SceneOpenGLTexture)
friend class OpenGLWindowPixmap;
};
class SceneOpenGLTexturePrivate : public GLTexturePrivate
{
public:
~SceneOpenGLTexturePrivate() override;
virtual bool loadTexture(WindowPixmap *pixmap) = 0;
virtual void updateTexture(WindowPixmap *pixmap);
virtual OpenGLBackend *backend() = 0;
protected:
SceneOpenGLTexturePrivate();
private:
Q_DISABLE_COPY(SceneOpenGLTexturePrivate)
};
}