kodi
WinSystemWaylandEGLContext.h
1 /*
2  * Copyright (C) 2017-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "WinSystemWayland.h"
12 #ifdef TARGET_WEBOS
13 #include "WinSystemWaylandWebOS.h"
14 #endif
15 #include "utils/EGLUtils.h"
16 #include "windowing/linux/WinSystemEGL.h"
17 
18 #include <wayland-egl.hpp>
19 
20 namespace KODI
21 {
22 namespace WINDOWING
23 {
24 namespace WAYLAND
25 {
26 
27 #ifdef TARGET_WEBOS
28 using CWinSystemWaylandImpl = CWinSystemWaylandWebOS;
29 #else
30 using CWinSystemWaylandImpl = CWinSystemWayland;
31 #endif
32 
35 {
36 public:
38  ~CWinSystemWaylandEGLContext() override = default;
39 
40  bool CreateNewWindow(const std::string& name,
41  bool fullScreen,
42  RESOLUTION_INFO& res) override;
43  bool DestroyWindow() override;
44  bool DestroyWindowSystem() override;
45 
46 protected:
51  bool InitWindowSystemEGL(EGLint renderableType, EGLint apiType);
52 
53  CSizeInt GetNativeWindowAttachedSize();
54  void PresentFrame(bool rendered);
55  void SetContextSize(CSizeInt size) override;
56 
57  virtual bool CreateContext() = 0;
58 
59  wayland::egl_window_t m_nativeWindow;
60 };
61 
62 }
63 }
64 }
Definition: WinSystemWayland.h:47
Definition: WinSystemEGL.h:20
Provide info of a resolution.
Definition: Resolution.h:66
bool InitWindowSystemEGL(EGLint renderableType, EGLint apiType)
Inheriting classes should override InitWindowSystem() without parameters and call this function there...
Definition: WinSystemWaylandEGLContext.cpp:26
Definition: AudioDecoder.h:18
Definition: WinSystemWaylandEGLContext.h:33