File indexing completed on 2024-06-09 05:26:04
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org> 0006 SPDX-FileCopyrightText: 2019 Vlad Zahorodnii <vlad.zahorodnii@kde.org> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 #pragma once 0011 0012 #include <QPointer> 0013 0014 #include <qpa/qplatformbackingstore.h> 0015 0016 namespace KWin 0017 { 0018 0019 class GraphicsBuffer; 0020 class GraphicsBufferView; 0021 0022 namespace QPA 0023 { 0024 0025 class BackingStore : public QPlatformBackingStore 0026 { 0027 public: 0028 explicit BackingStore(QWindow *window); 0029 0030 QPaintDevice *paintDevice() override; 0031 void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override; 0032 void resize(const QSize &size, const QRegion &staticContents) override; 0033 void beginPaint(const QRegion ®ion) override; 0034 void endPaint() override; 0035 0036 private: 0037 QPointer<GraphicsBuffer> m_buffer; 0038 std::unique_ptr<GraphicsBufferView> m_bufferView; 0039 }; 0040 0041 } 0042 }