1// Copyright (C) 2017 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#include "qplatformoffscreensurface.h"
5
6#include "qoffscreensurface.h"
7#include "qscreen.h"
8
9QT_BEGIN_NAMESPACE
10
11class QPlatformOffscreenSurfacePrivate
12{
13public:
14};
15
16QPlatformOffscreenSurface::QPlatformOffscreenSurface(QOffscreenSurface *offscreenSurface)
17 : QPlatformSurface(offscreenSurface)
18 , d_ptr(new QPlatformOffscreenSurfacePrivate)
19{
20}
21
22QPlatformOffscreenSurface::~QPlatformOffscreenSurface()
23{
24}
25
26QOffscreenSurface *QPlatformOffscreenSurface::offscreenSurface() const
27{
28 return static_cast<QOffscreenSurface*>(m_surface);
29}
30
31/*!
32 Returns the platform screen handle corresponding to this QPlatformOffscreenSurface.
33*/
34QPlatformScreen *QPlatformOffscreenSurface::screen() const
35{
36 return offscreenSurface()->screen()->handle();
37}
38
39/*!
40 Returns the actual surface format of the offscreen surface.
41*/
42QSurfaceFormat QPlatformOffscreenSurface::format() const
43{
44 return QSurfaceFormat();
45}
46
47/*!
48 Returns \c true if the platform offscreen surface has been allocated.
49*/
50bool QPlatformOffscreenSurface::isValid() const
51{
52 return false;
53}
54
55QT_END_NAMESPACE
56

source code of qtbase/src/gui/kernel/qplatformoffscreensurface.cpp