KWin
Loading...
Searching...
No Matches
backingstore.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org>
6 SPDX-FileCopyrightText: 2019 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
7
8 SPDX-License-Identifier: GPL-2.0-or-later
9*/
10#pragma once
11
12#include <QPointer>
13
14#include <qpa/qplatformbackingstore.h>
15
16namespace KWin
17{
18
19class GraphicsBuffer;
20class GraphicsBufferView;
21
22namespace QPA
23{
24
25class BackingStore : public QPlatformBackingStore
26{
27public:
28 explicit BackingStore(QWindow *window);
29
30 QPaintDevice *paintDevice() override;
31 void flush(QWindow *window, const QRegion &region, const QPoint &offset) override;
32 void resize(const QSize &size, const QRegion &staticContents) override;
33 void beginPaint(const QRegion &region) override;
34 void endPaint() override;
35
36private:
37 QPointer<GraphicsBuffer> m_buffer;
38 std::unique_ptr<GraphicsBufferView> m_bufferView;
39};
40
41}
42}
BackingStore(QWindow *window)
QPaintDevice * paintDevice() override
void resize(const QSize &size, const QRegion &staticContents) override
void endPaint() override
void beginPaint(const QRegion &region) override
void flush(QWindow *window, const QRegion &region, const QPoint &offset) override