kodi
WinSystemGbmEGLContext.h
1 /*
2  * Copyright (C) 2005-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 "WinSystemGbm.h"
12 #include "utils/EGLFence.h"
13 #include "utils/EGLUtils.h"
14 #include "windowing/linux/WinSystemEGL.h"
15 
16 #include <memory>
17 
18 namespace KODI
19 {
20 namespace WINDOWING
21 {
22 namespace GBM
23 {
24 
25 class CVaapiProxy;
26 
28 {
29 public:
30  ~CWinSystemGbmEGLContext() override = default;
31 
32  bool DestroyWindowSystem() override;
33  bool CreateNewWindow(const std::string& name,
34  bool fullScreen,
35  RESOLUTION_INFO& res) override;
36  bool DestroyWindow() override;
37 
38 protected:
39  CWinSystemGbmEGLContext(EGLenum platform, std::string const& platformExtension)
40  : CWinSystemEGL{platform, platformExtension}
41  {}
42 
47  bool InitWindowSystemEGL(EGLint renderableType, EGLint apiType);
48  virtual bool CreateContext() = 0;
49 
50  std::unique_ptr<KODI::UTILS::EGL::CEGLFence> m_eglFence;
51 
53  {
54  void operator()(CVaapiProxy *p) const;
55  };
56  std::unique_ptr<CVaapiProxy, delete_CVaapiProxy> m_vaapiProxy;
57 };
58 
59 }
60 }
61 }
Definition: WinSystemGbmEGLContext.h:27
Definition: WinSystemGbm.h:36
Definition: OptionalsReg.cpp:100
bool InitWindowSystemEGL(EGLint renderableType, EGLint apiType)
Inheriting classes should override InitWindowSystem() without parameters and call this function there...
Definition: WinSystemGbmEGLContext.cpp:19
Definition: WinSystemEGL.h:20
Provide info of a resolution.
Definition: Resolution.h:66
Definition: AudioDecoder.h:18