2015-08-14 14:52:40 +00:00
|
|
|
/********************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
2020-08-02 22:10:35 +00:00
|
|
|
SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org>
|
2015-08-14 14:52:40 +00:00
|
|
|
|
2020-08-02 22:10:35 +00:00
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
2015-08-14 14:52:40 +00:00
|
|
|
*********************************************************************/
|
|
|
|
#ifndef KWIN_QPA_SHARINGPLATFORMCONTEXT_H
|
|
|
|
#define KWIN_QPA_SHARINGPLATFORMCONTEXT_H
|
|
|
|
|
|
|
|
#include "abstractplatformcontext.h"
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
namespace QPA
|
|
|
|
{
|
|
|
|
|
|
|
|
class SharingPlatformContext : public AbstractPlatformContext
|
|
|
|
{
|
|
|
|
public:
|
2017-07-31 16:09:15 +00:00
|
|
|
explicit SharingPlatformContext(QOpenGLContext *context);
|
2019-06-29 00:01:07 +00:00
|
|
|
SharingPlatformContext(QOpenGLContext *context, const EGLSurface &surface, EGLConfig config = nullptr);
|
2015-08-14 14:52:40 +00:00
|
|
|
|
|
|
|
void swapBuffers(QPlatformSurface *surface) override;
|
|
|
|
|
|
|
|
GLuint defaultFramebufferObject(QPlatformSurface *surface) const override;
|
|
|
|
|
|
|
|
bool makeCurrent(QPlatformSurface *surface) override;
|
|
|
|
|
|
|
|
bool isSharing() const override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void create();
|
2016-07-18 09:17:54 +00:00
|
|
|
|
|
|
|
EGLSurface m_surface;
|
2015-08-14 14:52:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|