KWin
Loading...
Searching...
No Matches
qpaintersurfacetexture.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "scene/surfaceitem.h"
10
11#include <QImage>
12
13namespace KWin
14{
15
16class QPainterBackend;
17
18class KWIN_EXPORT QPainterSurfaceTexture : public SurfaceTexture
19{
20public:
21 explicit QPainterSurfaceTexture(QPainterBackend *backend);
22
23 bool isValid() const override;
24
25 QPainterBackend *backend() const;
26 QImage image() const;
27
28 virtual bool create() = 0;
29 virtual void update(const QRegion &region) = 0;
30
31protected:
33 QImage m_image;
34};
35
36} // namespace KWin
virtual void update(const QRegion &region)=0