blob: 097b3e79e68927dfed8f59736e659db07aa4c0ec (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*
* Copyright (C) 2017-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#pragma once
#include "WinSystemWayland.h"
#include "utils/EGLUtils.h"
#include "windowing/linux/WinSystemEGL.h"
#include <wayland-egl.hpp>
namespace KODI
{
namespace WINDOWING
{
namespace WAYLAND
{
class CWinSystemWaylandEGLContext : public KODI::WINDOWING::LINUX::CWinSystemEGL,
public CWinSystemWayland
{
public:
CWinSystemWaylandEGLContext();
~CWinSystemWaylandEGLContext() override = default;
bool CreateNewWindow(const std::string& name,
bool fullScreen,
RESOLUTION_INFO& res) override;
bool DestroyWindow() override;
bool DestroyWindowSystem() override;
protected:
/**
* Inheriting classes should override InitWindowSystem() without parameters
* and call this function there with appropriate parameters
*/
bool InitWindowSystemEGL(EGLint renderableType, EGLint apiType);
CSizeInt GetNativeWindowAttachedSize();
void PresentFrame(bool rendered);
void SetContextSize(CSizeInt size) override;
virtual bool CreateContext() = 0;
wayland::egl_window_t m_nativeWindow;
};
}
}
}
|