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.
11 #include "WinSystemX11.h"
12 #include "rendering/gl/RenderSystemGL.h"
13 #include "system_egl.h"
28 class CWinSystemX11GLContext
: public CWinSystemX11
, public CRenderSystemGL
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
;
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;
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;
70 struct delete_CVaapiProxy
72 void operator()(CVaapiProxy
*p
) const;
74 std::unique_ptr
<CVaapiProxy
, delete_CVaapiProxy
> m_vaapiProxy
;