1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QFBBACKINGSTORE_P_H
5#define QFBBACKINGSTORE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qpa/qplatformbackingstore.h>
19#include <QtCore/QMutex>
20#include <QtCore/private/qglobal_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class QFbScreen;
25class QFbWindow;
26class QWindow;
27
28class QFbBackingStore : public QPlatformBackingStore
29{
30public:
31 QFbBackingStore(QWindow *window);
32 ~QFbBackingStore();
33
34 QPaintDevice *paintDevice() override { return &mImage; }
35 void flush(QWindow *window, const QRegion &region, const QPoint &offset) override;
36
37 void resize(const QSize &size, const QRegion &region) override;
38
39 const QImage image();
40 QImage toImage() const override;
41
42 void lock();
43 void unlock();
44
45 void beginPaint(const QRegion &) override;
46 void endPaint() override;
47
48protected:
49 friend class QFbWindow;
50
51 QImage mImage;
52 QMutex mImageMutex;
53};
54
55QT_END_NAMESPACE
56
57#endif // QFBBACKINGSTORE_P_H
58
59

source code of qtbase/src/platformsupport/fbconvenience/qfbbackingstore_p.h