[filesystem][SpecialProtocol] Removed assert from GetPath
[xbmc.git] / xbmc / windowing / X11 / WinSystemX11GLESContext.h
blobcdb1cc4f8e6b8ade4bb75347e4b361ed2f170158
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 "EGL/egl.h"
12 #include "WinSystemX11.h"
13 #include "rendering/gles/RenderSystemGLES.h"
15 class CGLContextEGL;
17 namespace KODI
19 namespace WINDOWING
21 namespace X11
24 class CWinSystemX11GLESContext : public CWinSystemX11, public CRenderSystemGLES
26 public:
27 CWinSystemX11GLESContext() = default;
28 virtual ~CWinSystemX11GLESContext() override;
30 static void Register();
31 static std::unique_ptr<CWinSystemBase> CreateWinSystem();
33 // Implementation of CWinSystem via CWinSystemX11
34 CRenderSystemBase* GetRenderSystem() override { return this; }
35 bool CreateNewWindow(const std::string& name, bool fullScreen, RESOLUTION_INFO& res) override;
36 bool ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop) override;
37 void FinishWindowResize(int newWidth, int newHeight) override;
38 bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override;
39 bool DestroyWindowSystem() override;
40 bool DestroyWindow() override;
42 bool IsExtSupported(const char* extension) const override;
44 EGLDisplay GetEGLDisplay() const;
45 EGLSurface GetEGLSurface() const;
46 EGLContext GetEGLContext() const;
47 EGLConfig GetEGLConfig() const;
49 protected:
50 bool SetWindow(int width, int height, bool fullscreen, const std::string& output, int* winstate = nullptr) override;
51 void PresentRenderImpl(bool rendered) override;
52 void SetVSyncImpl(bool enable) override;
53 bool RefreshGLContext(bool force);
54 XVisualInfo* GetVisual() override;
56 CGLContextEGL* m_pGLContext = nullptr;
57 bool m_newGlContext;
60 } // namespace X11
61 } // namespace WINDOWING
62 } // namespace KODI