[Test] Added tests for CUtil::SplitParams
[xbmc.git] / xbmc / windowing / gbm / WinSystemGbmEGLContext.h
blobfbd52354ee7fd462c6c93cbec27709e295e2ee6e
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "WinSystemGbm.h"
12 #include "utils/EGLFence.h"
13 #include "utils/EGLUtils.h"
14 #include "windowing/linux/WinSystemEGL.h"
16 #include <memory>
18 namespace KODI
20 namespace WINDOWING
22 namespace GBM
25 class CVaapiProxy;
27 class CWinSystemGbmEGLContext : public KODI::WINDOWING::LINUX::CWinSystemEGL, public CWinSystemGbm
29 public:
30 ~CWinSystemGbmEGLContext() override = default;
32 bool DestroyWindowSystem() override;
33 bool CreateNewWindow(const std::string& name,
34 bool fullScreen,
35 RESOLUTION_INFO& res) override;
36 bool DestroyWindow() override;
38 protected:
39 CWinSystemGbmEGLContext(EGLenum platform, std::string const& platformExtension)
40 : CWinSystemEGL{platform, platformExtension}
43 /**
44 * Inheriting classes should override InitWindowSystem() without parameters
45 * and call this function there with appropriate parameters
47 bool InitWindowSystemEGL(EGLint renderableType, EGLint apiType);
48 virtual bool CreateContext() = 0;
50 std::unique_ptr<KODI::UTILS::EGL::CEGLFence> m_eglFence;
52 struct delete_CVaapiProxy
54 void operator()(CVaapiProxy *p) const;
56 std::unique_ptr<CVaapiProxy, delete_CVaapiProxy> m_vaapiProxy;