Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CWinSystemX11GLContext Class Reference

#include <WinSystemX11GLContext.h>

Inheritance diagram for CWinSystemX11GLContext:
CWinSystemX11 CRenderSystemGL CWinSystemBase CRenderSystemBase

Classes

struct  delete_CVaapiProxy
 

Public Member Functions

 CWinSystemX11GLContext ()
 
 ~CWinSystemX11GLContext () override
 
CRenderSystemBaseGetRenderSystem () override
 
bool CreateNewWindow (const std::string &name, bool fullScreen, RESOLUTION_INFO &res) override
 
bool ResizeWindow (int newWidth, int newHeight, int newLeft, int newTop) override
 
void FinishWindowResize (int newWidth, int newHeight) override
 
bool SetFullScreen (bool fullScreen, RESOLUTION_INFO &res, bool blankOtherDisplays) override
 
bool DestroyWindowSystem () override
 
bool DestroyWindow () override
 
bool IsExtSupported (const char *extension) const override
 
std::unique_ptr< CVideoSyncGetVideoSync (void *clock) override
 
float GetFrameLatencyAdjustment () override
 
uint64_t GetVblankTiming (uint64_t &msc, uint64_t &interval)
 
XID GetWindow () const
 
voidGetGlxContext () const
 
EGLDisplay GetEGLDisplay () const
 
EGLSurface GetEGLSurface () const
 
EGLContext GetEGLContext () const
 
EGLConfig GetEGLConfig () const
 
- Public Member Functions inherited from CWinSystemX11
 CWinSystemX11 ()
 
 ~CWinSystemX11 () override
 
bool InitWindowSystem () override
 
void UpdateResolutions () override
 
void ShowOSMouse (bool show) override
 
void NotifyAppActiveChange (bool bActivated) override
 
void NotifyAppFocusChange (bool bGaining) override
 
bool Minimize () override
 
bool Restore () override
 
bool Hide () override
 
bool Show (bool raise=true) override
 
void Register (IDispResource *resource) override
 
void Unregister (IDispResource *resource) override
 
bool HasCalibration (const RESOLUTION_INFO &resInfo) override
 
bool UseLimitedColor () override
 
Display * GetDisplay ()
 
int GetScreen ()
 
void NotifyXRREvent ()
 
void GetConnectedOutputs (std::vector< std::string > *outputs)
 
bool IsCurrentOutput (std::string output)
 
void RecreateWindow ()
 
int GetCrtc ()
 
bool MessagePump () override
 
- Public Member Functions inherited from CWinSystemBase
 CWinSystemBase ()
 
virtual ~CWinSystemBase ()
 
virtual bool MoveWindow (int topLeft, int topRight)
 
virtual void FinishModeChange (RESOLUTION res)
 
virtual bool CenterWindow ()
 
virtual bool IsCreated ()
 
virtual bool HasCursor ()
 
virtual bool HasInertialGestures ()
 
virtual int NoOfBuffers ()
 
virtual float GetDisplayLatency ()
 
virtual void OnMove (int x, int y)
 
KODI::WINDOWING::COSScreenSaverManagerGetOSScreenSaver ()
 
unsigned int GetWidth ()
 
unsigned int GetHeight ()
 
virtual bool CanDoWindowed ()
 
bool IsFullScreen ()
 
void SetWindowResolution (int width, int height)
 
std::vector< RESOLUTION_WHRScreenResolutions (float refreshrate)
 
std::vector< REFRESHRATERefreshRates (int width, int height, uint32_t dwFlags)
 
REFRESHRATE DefaultRefreshRate (std::vector< REFRESHRATE > rates)
 
virtual std::string GetClipboardText (void)
 
void RegisterRenderLoop (IRenderLoop *client)
 
void UnregisterRenderLoop (IRenderLoop *client)
 
void DriveRenderLoop ()
 
CGraphicContextGetGfxContext ()
 
- Public Member Functions inherited from CRenderSystemGL
 CRenderSystemGL ()
 
 ~CRenderSystemGL () override
 
bool InitRenderSystem () override
 
bool DestroyRenderSystem () override
 
bool ResetRenderSystem (int width, int height) override
 
bool BeginRender () override
 
bool EndRender () override
 
void PresentRender (bool rendered, bool videoLayer) override
 
bool ClearBuffers (UTILS::Color color) override
 
void SetVSync (bool vsync)
 
void ResetVSync ()
 
void SetViewPort (const CRect &viewPort) override
 
void GetViewPort (CRect &viewPort) override
 
bool ScissorsCanEffectClipping () override
 
CRect ClipRectToScissorRect (const CRect &rect) override
 
void SetScissors (const CRect &rect) override
 
void ResetScissors () override
 
void CaptureStateBlock () override
 
void ApplyStateBlock () override
 
void SetCameraPosition (const CPoint &camera, int screenWidth, int screenHeight, float stereoFactor=0.0f) override
 
void SetStereoMode (RENDER_STEREO_MODE mode, RENDER_STEREO_VIEW view) override
 
bool SupportsStereo (RENDER_STEREO_MODE mode) const override
 
bool SupportsNPOT (bool dxt) const override
 
void Project (float &x, float &y, float &z) override
 
std::string GetShaderPath (const std::string &filename) override
 
void GetGLVersion (int &major, int &minor)
 
void GetGLSLVersion (int &major, int &minor)
 
void ResetGLErrors ()
 
void EnableShader (ESHADERMETHOD method)
 
void DisableShader ()
 
GLint ShaderGetPos ()
 
GLint ShaderGetCol ()
 
GLint ShaderGetCoord0 ()
 
GLint ShaderGetCoord1 ()
 
GLint ShaderGetUniCol ()
 
GLint ShaderGetModel ()
 
- Public Member Functions inherited from CRenderSystemBase
 CRenderSystemBase ()
 
virtual ~CRenderSystemBase ()
 
virtual void RestoreViewPort ()
 
void GetRenderVersion (unsigned int &major, unsigned int &minor) const
 
const std::string & GetRenderVendor () const
 
const std::string & GetRenderRenderer () const
 
const std::string & GetRenderVersionString () const
 
unsigned int GetMaxTextureSize () const
 
unsigned int GetMinDXTPitch () const
 
virtual void ShowSplash (const std::string &message)
 

Protected Member Functions

bool SetWindow (int width, int height, bool fullscreen, const std::string &output, int *winstate=NULL) override
 
void PresentRenderImpl (bool rendered) override
 
void SetVSyncImpl (bool enable) override
 
bool RefreshGLContext (bool force)
 
XVisualInfo * GetVisual () override
 
- Protected Member Functions inherited from CWinSystemX11
std::unique_ptr< KODI::WINDOWING::IOSScreenSaverGetOSScreenSaverImpl () override
 
void OnLostDevice ()
 
- Protected Member Functions inherited from CWinSystemBase
void UpdateDesktopResolution (RESOLUTION_INFO &newRes, const std::string &output, int width, int height, float refreshRate, uint32_t dwFlags)
 
- Protected Member Functions inherited from CRenderSystemGL
void CalculateMaxTexturesize ()
 
void InitialiseShaders ()
 
void ReleaseShaders ()
 

Protected Attributes

CGLContextm_pGLContext = nullptr
 
bool m_newGlContext
 
std::unique_ptr< CVaapiProxy, delete_CVaapiProxym_vaapiProxy
 
std::unique_ptr< OPTIONALS::CLircContainer, OPTIONALS::delete_CLircContainerm_lirc
 
- Protected Attributes inherited from CWinSystemX11
Window m_glWindow
 
Window m_mainWindow
 
int m_screen = 0
 
Display * m_dpy
 
Cursor m_invisibleCursor
 
Pixmap m_icon
 
bool m_bIsRotated
 
bool m_bWasFullScreenBeforeMinimize
 
bool m_minimized
 
bool m_bIgnoreNextFocusMessage
 
CCriticalSection m_resourceSection
 
std::vector< IDispResource * > m_resources
 
bool m_delayDispReset
 
XbmcThreads::EndTime m_dispResetTimer
 
std::string m_currentOutput
 
std::string m_userOutput
 
bool m_windowDirty
 
bool m_bIsInternalXrr
 
int m_MouseX
 
int m_MouseY
 
int m_crtc
 
CWinEventsX11m_winEventsX11
 
- Protected Attributes inherited from CWinSystemBase
int m_nWidth = 0
 
int m_nHeight = 0
 
int m_nTop = 0
 
int m_nLeft = 0
 
bool m_bWindowCreated = false
 
bool m_bFullScreen = false
 
bool m_bBlankOtherDisplay = false
 
float m_fRefreshRate = 0.0f
 
std::unique_ptr< KODI::WINDOWING::COSScreenSaverManagerm_screenSaverManager
 
CCriticalSection m_renderLoopSection
 
std::vector< IRenderLoop * > m_renderLoopClients
 
std::unique_ptr< IWinEventsm_winEvents
 
std::unique_ptr< CGraphicContextm_gfxContext
 
- Protected Attributes inherited from CRenderSystemGL
bool m_bVsyncInit = false
 
int m_width
 
int m_height
 
bool m_supportsNPOT = true
 
std::string m_RenderExtensions
 
int m_glslMajor = 0
 
int m_glslMinor = 0
 
GLint m_viewPort [4]
 
std::array< std::unique_ptr< CGLShader >, SM_MAXm_pShader
 
ESHADERMETHOD m_method = SM_DEFAULT
 
GLuint m_vertexArray = GL_NONE
 
- Protected Attributes inherited from CRenderSystemBase
bool m_bRenderCreated
 
bool m_bVSync
 
unsigned int m_maxTextureSize
 
unsigned int m_minDXTPitch
 
std::string m_RenderRenderer
 
std::string m_RenderVendor
 
std::string m_RenderVersion
 
int m_RenderVersionMinor
 
int m_RenderVersionMajor
 
RENDER_STEREO_VIEW m_stereoView = RENDER_STEREO_VIEW_OFF
 
RENDER_STEREO_MODE m_stereoMode = RENDER_STEREO_MODE_OFF
 
bool m_limitedColorRange = false
 
std::unique_ptr< CGUIImagem_splashImage
 
std::unique_ptr< CGUITextLayoutm_splashMessageLayout
 

Additional Inherited Members

- Static Public Member Functions inherited from CWinSystemBase
static std::unique_ptr< CWinSystemBaseCreateWinSystem ()
 

Constructor & Destructor Documentation

◆ CWinSystemX11GLContext()

CWinSystemX11GLContext::CWinSystemX11GLContext ( )

◆ ~CWinSystemX11GLContext()

CWinSystemX11GLContext::~CWinSystemX11GLContext ( )
override

Member Function Documentation

◆ CreateNewWindow()

bool CWinSystemX11GLContext::CreateNewWindow ( const std::string &  name,
bool  fullScreen,
RESOLUTION_INFO res 
)
overridevirtual

Reimplemented from CWinSystemX11.

◆ DestroyWindow()

bool CWinSystemX11GLContext::DestroyWindow ( )
overridevirtual

Reimplemented from CWinSystemX11.

◆ DestroyWindowSystem()

bool CWinSystemX11GLContext::DestroyWindowSystem ( )
overridevirtual

Reimplemented from CWinSystemX11.

◆ FinishWindowResize()

void CWinSystemX11GLContext::FinishWindowResize ( int  newWidth,
int  newHeight 
)
overridevirtual

Reimplemented from CWinSystemX11.

◆ GetEGLConfig()

EGLConfig CWinSystemX11GLContext::GetEGLConfig ( ) const

◆ GetEGLContext()

EGLContext CWinSystemX11GLContext::GetEGLContext ( ) const

◆ GetEGLDisplay()

EGLDisplay CWinSystemX11GLContext::GetEGLDisplay ( ) const

◆ GetEGLSurface()

EGLSurface CWinSystemX11GLContext::GetEGLSurface ( ) const

◆ GetFrameLatencyAdjustment()

float CWinSystemX11GLContext::GetFrameLatencyAdjustment ( )
overridevirtual

Get time that should be subtracted from the display latency for this frame in milliseconds

Contrary to GetDisplayLatency, this value is calculated ad-hoc for the frame currently being rendered and not a value that is calculated/ averaged from past frames and their presentation times

Reimplemented from CWinSystemBase.

◆ GetGlxContext()

void * CWinSystemX11GLContext::GetGlxContext ( ) const

◆ GetRenderSystem()

CRenderSystemBase * CWinSystemX11GLContext::GetRenderSystem ( )
inlineoverridevirtual

Reimplemented from CWinSystemBase.

◆ GetVblankTiming()

uint64_t CWinSystemX11GLContext::GetVblankTiming ( uint64_t &  msc,
uint64_t &  interval 
)

◆ GetVideoSync()

std::unique_ptr< CVideoSync > CWinSystemX11GLContext::GetVideoSync ( void clock)
overridevirtual

Reimplemented from CWinSystemBase.

◆ GetVisual()

XVisualInfo * CWinSystemX11GLContext::GetVisual ( )
overrideprotectedvirtual

Implements CWinSystemX11.

◆ GetWindow()

XID CWinSystemX11GLContext::GetWindow ( ) const

◆ IsExtSupported()

bool CWinSystemX11GLContext::IsExtSupported ( const char *  extension) const
overridevirtual

Reimplemented from CRenderSystemGL.

◆ PresentRenderImpl()

void CWinSystemX11GLContext::PresentRenderImpl ( bool  rendered)
overrideprotectedvirtual

Implements CRenderSystemGL.

◆ RefreshGLContext()

bool CWinSystemX11GLContext::RefreshGLContext ( bool  force)
protected

◆ ResizeWindow()

bool CWinSystemX11GLContext::ResizeWindow ( int  newWidth,
int  newHeight,
int  newLeft,
int  newTop 
)
overridevirtual

Reimplemented from CWinSystemX11.

◆ SetFullScreen()

bool CWinSystemX11GLContext::SetFullScreen ( bool  fullScreen,
RESOLUTION_INFO res,
bool  blankOtherDisplays 
)
overridevirtual

Reimplemented from CWinSystemX11.

◆ SetVSyncImpl()

void CWinSystemX11GLContext::SetVSyncImpl ( bool  enable)
overrideprotectedvirtual

Implements CRenderSystemGL.

◆ SetWindow()

bool CWinSystemX11GLContext::SetWindow ( int  width,
int  height,
bool  fullscreen,
const std::string &  output,
int *  winstate = NULL 
)
overrideprotectedvirtual

Implements CWinSystemX11.

Member Data Documentation

◆ m_lirc

std::unique_ptr<OPTIONALS::CLircContainer, OPTIONALS::delete_CLircContainer> CWinSystemX11GLContext::m_lirc
protected

◆ m_newGlContext

bool CWinSystemX11GLContext::m_newGlContext
protected

◆ m_pGLContext

CGLContext* CWinSystemX11GLContext::m_pGLContext = nullptr
protected

◆ m_vaapiProxy

std::unique_ptr<CVaapiProxy, delete_CVaapiProxy> CWinSystemX11GLContext::m_vaapiProxy
protected

The documentation for this class was generated from the following files: