baf05ec4a5
This is, primarily, to make naming consistent with SurfaceItem, SurfacePixmap and just "Surface" in the future.
36 lines
692 B
C++
36 lines
692 B
C++
/*
|
|
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "surfaceitem.h"
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
class GLTexture;
|
|
class OpenGLBackend;
|
|
|
|
class KWIN_EXPORT OpenGLSurfaceTexture : public SurfaceTexture
|
|
{
|
|
public:
|
|
explicit OpenGLSurfaceTexture(OpenGLBackend *backend);
|
|
~OpenGLSurfaceTexture() override;
|
|
|
|
bool isValid() const override;
|
|
|
|
OpenGLBackend *backend() const;
|
|
GLTexture *texture() const;
|
|
|
|
virtual bool create() = 0;
|
|
virtual void update(const QRegion ®ion) = 0;
|
|
|
|
protected:
|
|
OpenGLBackend *m_backend;
|
|
QScopedPointer<GLTexture> m_texture;
|
|
};
|
|
|
|
} // namespace KWin
|