summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/minimal/qminimalbackingstore.h
blob: 4bd58fd23d909429c75ae5eb1c5d7b1f2c2638b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QBACKINGSTORE_MINIMAL_H
#define QBACKINGSTORE_MINIMAL_H

#include <qpa/qplatformbackingstore.h>
#include <qpa/qplatformwindow.h>
#include <QtGui/QImage>

QT_BEGIN_NAMESPACE

class QMinimalBackingStore : public QPlatformBackingStore
{
public:
    QMinimalBackingStore(QWindow *window);
    ~QMinimalBackingStore();

    QPaintDevice *paintDevice() override;
    void flush(QWindow *window, const QRegion &region, const QPoint &offset) override;
    void resize(const QSize &size, const QRegion &staticContents) override;

private:
    QImage mImage;
    const bool mDebug;
};

QT_END_NAMESPACE

#endif