kwin/src/cursorview_opengl.h
Vlad Zahorodnii dd6d0b22cc Port software cursor to RenderLayer
Software cursor has always been a major source of problems. Hopefully,
porting it to RenderLayer will help us with that.

Note that the cursor layer is currently visible only when using software
cursor, however it will be changed once the Compositor can allocate
a real hardware cursor plane.

Currently, software cursor uses graphics-specific APIs (OpenGL and
QPainter) to paint itself. That will be changed in the future when
rendering parts are extracted from the Scene in a reusable helper.
2022-02-21 09:33:59 +00:00

31 lines
562 B
C++

/*
SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "cursorview.h"
namespace KWin
{
class GLTexture;
class OpenGLCursorView final : public CursorView
{
Q_OBJECT
public:
explicit OpenGLCursorView(QObject *parent = nullptr);
~OpenGLCursorView() override;
void paint(AbstractOutput *output, const QRegion &region) override;
private:
QScopedPointer<GLTexture> m_cursorTexture;
bool m_cursorTextureDirty = false;
};
} // namespace KWin