[filesystem][SpecialProtocol] Removed assert from GetPath
[xbmc.git] / xbmc / windowing / X11 / WinSystemX11GLContext.h
blob7d227b2cf3d08862336d95ca770c2370a3bed515
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 "WinSystemX11.h"
12 #include "rendering/gl/RenderSystemGL.h"
13 #include "system_egl.h"
15 #include <memory>
17 class CGLContext;
19 namespace KODI
21 namespace WINDOWING
23 namespace X11
26 class CVaapiProxy;
28 class CWinSystemX11GLContext : public CWinSystemX11, public CRenderSystemGL
30 public:
31 CWinSystemX11GLContext() = default;
32 ~CWinSystemX11GLContext() override;
34 static void Register();
35 static std::unique_ptr<CWinSystemBase> CreateWinSystem();
37 // Implementation of CWinSystem via CWinSystemX11
38 CRenderSystemBase *GetRenderSystem() override { return this; }
39 bool CreateNewWindow(const std::string& name, bool fullScreen, RESOLUTION_INFO& res) override;
40 bool ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop) override;
41 void FinishWindowResize(int newWidth, int newHeight) override;
42 bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override;
43 bool DestroyWindowSystem() override;
44 bool DestroyWindow() override;
46 bool IsExtSupported(const char* extension) const override;
48 // videosync
49 std::unique_ptr<CVideoSync> GetVideoSync(void *clock) override;
50 float GetFrameLatencyAdjustment() override;
51 uint64_t GetVblankTiming(uint64_t &msc, uint64_t &interval);
53 XID GetWindow() const;
54 void* GetGlxContext() const;
55 EGLDisplay GetEGLDisplay() const;
56 EGLSurface GetEGLSurface() const;
57 EGLContext GetEGLContext() const;
58 EGLConfig GetEGLConfig() const;
60 protected:
61 bool SetWindow(int width, int height, bool fullscreen, const std::string &output, int *winstate = NULL) override;
62 void PresentRenderImpl(bool rendered) override;
63 void SetVSyncImpl(bool enable) override;
64 bool RefreshGLContext(bool force);
65 XVisualInfo* GetVisual() override;
67 CGLContext *m_pGLContext = nullptr;
68 bool m_newGlContext;
70 struct delete_CVaapiProxy
72 void operator()(CVaapiProxy *p) const;
74 std::unique_ptr<CVaapiProxy, delete_CVaapiProxy> m_vaapiProxy;