1// Copyright (C) 2020 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 QOFFSCREENSURFACE_P_H
5#define QOFFSCREENSURFACE_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 "qplatformoffscreensurface.h"
19
20#include <private/qwindow_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class Q_GUI_EXPORT QOffscreenSurfacePrivate : public QObjectPrivate
25{
26 Q_DECLARE_PUBLIC(QOffscreenSurface)
27
28public:
29 QOffscreenSurfacePrivate()
30 : QObjectPrivate()
31 , surfaceType(QSurface::OpenGLSurface)
32 , platformOffscreenSurface(nullptr)
33 , offscreenWindow(nullptr)
34 , requestedFormat(QSurfaceFormat::defaultFormat())
35 , screen(nullptr)
36 , size(1, 1)
37 {
38 }
39
40 ~QOffscreenSurfacePrivate()
41 {
42 }
43
44 static QOffscreenSurfacePrivate *get(QOffscreenSurface *surface)
45 {
46 return surface ? surface->d_func() : nullptr;
47 }
48
49 QSurface::SurfaceType surfaceType;
50 QPlatformOffscreenSurface *platformOffscreenSurface;
51 QWindow *offscreenWindow;
52 QSurfaceFormat requestedFormat;
53 QScreen *screen;
54 QSize size;
55};
56
57QT_END_NAMESPACE
58
59#endif // QOFFSCREENSURFACE_P_H
60

source code of qtbase/src/gui/kernel/qoffscreensurface_p.h