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: 2019 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #include "offscreensurface.h"
0011 #include "core/outputbackend.h"
0012 #include "eglhelpers.h"
0013 #include "main.h"
0014 #include "opengl/egldisplay.h"
0015 
0016 #include <QOffscreenSurface>
0017 
0018 namespace KWin
0019 {
0020 namespace QPA
0021 {
0022 
0023 OffscreenSurface::OffscreenSurface(QOffscreenSurface *surface)
0024     : QPlatformOffscreenSurface(surface)
0025     , m_format(surface->requestedFormat())
0026 {
0027 }
0028 
0029 QSurfaceFormat OffscreenSurface::format() const
0030 {
0031     return m_format;
0032 }
0033 
0034 bool OffscreenSurface::isValid() const
0035 {
0036     return true;
0037 }
0038 
0039 } // namespace QPA
0040 } // namespace KWin