Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
No Matches
KODI::WINDOWING::X11::CWinSystemX11GLESContext Class Reference

#include <WinSystemX11GLESContext.h>

Inheritance diagram for KODI::WINDOWING::X11::CWinSystemX11GLESContext:
KODI::WINDOWING::X11::CWinSystemX11 CRenderSystemGLES CWinSystemBase CRenderSystemBase

Public Member Functions

 CWinSystemX11GLESContext ()=default
virtual ~CWinSystemX11GLESContext () 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
EGLDisplay GetEGLDisplay () const
EGLSurface GetEGLSurface () const
EGLContext GetEGLContext () const
EGLConfig GetEGLConfig () const
bool BindTextureUploadContext () override
 Binds a shared context to the current thread, in order to upload textures asynchronously.
bool UnbindTextureUploadContext () override
 Unbinds the shared context.
bool HasContext () override
 Checks if a graphics context is already bound to the current thread.
- Public Member Functions inherited from KODI::WINDOWING::X11::CWinSystemX11
 CWinSystemX11 ()
 ~CWinSystemX11 () override
const std::string GetName () 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
std::vector< std::string > GetConnectedOutputs () override
Display * GetDisplay ()
int GetScreen ()
void NotifyXRREvent ()
bool IsCurrentOutput (const std::string &output)
void RecreateWindow ()
int GetCrtc ()
bool MessagePump () override
- Public Member Functions inherited from CWinSystemBase
 CWinSystemBase ()
virtual ~CWinSystemBase ()
virtual bool DisplayHardwareScalingEnabled ()
virtual void UpdateDisplayHardwareScaling (const RESOLUTION_INFO &resInfo)
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 void ForceFullScreen (const RESOLUTION_INFO &resInfo)
 Forces the window to fullscreen provided the window resolution.
virtual float GetDisplayLatency ()
 Get average display latency.
virtual float GetFrameLatencyAdjustment ()
 Get time that should be subtracted from the display latency for this frame in milliseconds.
virtual std::unique_ptr< CVideoSyncGetVideoSync (CVideoReferenceClock *clock)
virtual void OnMove (int x, int y)
virtual unsigned int GetScreenId (const std::string &screen)
 Get the screen ID provided the screen name.
virtual void MoveToScreen (unsigned int screenIdx)
 Window was requested to move to the given screen.
virtual void OnChangeScreen (unsigned int screenIdx)
 Used to signal the windowing system about the change of the current screen.
KODI::WINDOWING::COSScreenSaverManagerGetOSScreenSaver ()
 Get OS screen saver inhibit implementation if available.
unsigned int GetWidth ()
unsigned int GetHeight ()
virtual bool CanDoWindowed ()
bool IsFullScreen ()
virtual bool SupportsScreenMove ()
 Check if the windowing system supports moving windows across screens.
void SetWindowResolution (int width, int height)
std::vector< RESOLUTION_WHRScreenResolutions (float refreshrate)
std::vector< REFRESHRATERefreshRates (int width, int height, uint32_t dwFlags)
REFRESHRATE DefaultRefreshRate (const std::vector< REFRESHRATE > &rates)
virtual std::string GetClipboardText (void)
void RegisterRenderLoop (IRenderLoop *client)
void UnregisterRenderLoop (IRenderLoop *client)
void DriveRenderLoop ()
virtual CGraphicContextGetGfxContext () const
virtual voidGetHWContext ()
 Get OS specific hardware context.
std::shared_ptr< CDPMSSupportGetDPMSManager ()
virtual bool SetHDR (const VideoPicture *videoPicture)
 Set the HDR metadata. Passing nullptr as the parameter should disable HDR.
virtual bool IsHDRDisplay ()
virtual HDR_STATUS ToggleHDR ()
virtual HDR_STATUS GetOSHDRStatus ()
virtual CHDRCapabilities GetDisplayHDRCapabilities () const
virtual float GetGuiSdrPeakLuminance () const
virtual bool HasSystemSdrPeakLuminance ()
virtual bool SupportsVideoSuperResolution ()
 System supports Video Super Resolution HW upscaler i.e.: "NVIDIA RTX Video Super Resolution" or "Intel Video Super Resolution".
virtual DEBUG_INFO_RENDER GetDebugInfo ()
 Gets debug info from video renderer for use in "Debug Info OSD" (Alt + O)
bool IsHDRDisplaySettingEnabled ()
 Return true when HDR display is available and enabled in settings.
bool IsVideoSuperResolutionSettingEnabled ()
 Return true when "Video Super Resolution" is supported and enabled in settings.
bool IsHighPrecisionProcessingSettingEnabled ()
 Return true when setting "High Precision Processing" is enabled.
std::pair< bool, intGetDitherSettings ()
 Get dither settings.
- Public Member Functions inherited from CRenderSystemGLES
 CRenderSystemGLES ()
 ~CRenderSystemGLES () override=default
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
void InvalidateColorBuffer () override
bool ClearBuffers (UTILS::COLOR::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 SetDepthCulling (DEPTH_CULLING culling) override
void CaptureStateBlock () override
void ApplyStateBlock () override
void SetCameraPosition (const CPoint &camera, int screenWidth, int screenHeight, float stereoFactor=0.0f) override
bool SupportsStereo (RENDER_STEREO_MODE mode) const override
void Project (float &x, float &y, float &z) override
std::string GetShaderPath (const std::string &filename) override
void InitialiseShaders ()
void ReleaseShaders ()
void EnableGUIShader (ShaderMethodGLES method)
void DisableGUIShader ()
GLint GUIShaderGetPos ()
GLint GUIShaderGetCol ()
GLint GUIShaderGetCoord0 ()
GLint GUIShaderGetCoord1 ()
GLint GUIShaderGetUniCol ()
GLint GUIShaderGetCoord0Matrix ()
GLint GUIShaderGetField ()
GLint GUIShaderGetStep ()
GLint GUIShaderGetContrast ()
GLint GUIShaderGetBrightness ()
GLint GUIShaderGetModel ()
GLint GUIShaderGetMatrix ()
GLint GUIShaderGetClip ()
GLint GUIShaderGetCoordStep ()
GLint GUIShaderGetDepth ()
- Public Member Functions inherited from CRenderSystemBase
 CRenderSystemBase ()
virtual ~CRenderSystemBase ()
virtual void RestoreViewPort ()
virtual void SetStereoMode (RENDER_STEREO_MODE mode, RENDER_STEREO_VIEW view)
void GetRenderVersion (unsigned int &major, unsigned int &minor) const
const std::string & GetRenderVendor () const
const std::string & GetRenderRenderer () const
const std::string & GetRenderVersionString () const
virtual bool SupportsNPOT (bool dxt) const
unsigned int GetMaxTextureSize () const
unsigned int GetMinDXTPitch () const
virtual void ShowSplash (const std::string &message)

Static Public Member Functions

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

Protected Member Functions

bool SetWindow (int width, int height, bool fullscreen, const std::string &output, int *winstate=nullptr) override
void PresentRenderImpl (bool rendered) override
void SetVSyncImpl (bool enable) override
bool RefreshGLContext (bool force)
XVisualInfo * GetVisual () override
- Protected Member Functions inherited from KODI::WINDOWING::X11::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)
void UpdateDesktopResolution (RESOLUTION_INFO &newRes, const std::string &output, int width, int height, int screenWidth, int screenHeight, float refreshRate, uint32_t dwFlags)
- Protected Member Functions inherited from CRenderSystemGLES
void CalculateMaxTexturesize ()

Protected Attributes

CGLContextEGLm_pGLContext = nullptr
bool m_newGlContext
- Protected Attributes inherited from KODI::WINDOWING::X11::CWinSystemX11
Window m_glWindow = 0
Window m_mainWindow = 0
int m_screen = 0
Display * m_dpy
Cursor m_invisibleCursor = 0
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
- 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
std::shared_ptr< CDPMSSupportm_dpms
- Protected Attributes inherited from CRenderSystemGLES
bool m_bVsyncInit {false}
int m_width
int m_height
std::string m_RenderExtensions
std::map< ShaderMethodGLES, std::unique_ptr< CGLESShader > > m_pShader
ShaderMethodGLES m_method = ShaderMethodGLES::SM_DEFAULT
GLint m_viewPort [4]
- 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
bool m_limitedColorRange = false
bool m_transferPQ {false}
std::unique_ptr< CGUIImagem_splashImage
std::unique_ptr< CGUITextLayoutm_splashMessageLayout

Additional Inherited Members

- Static Public Attributes inherited from CWinSystemBase
static const char * SETTING_WINSYSTEM_IS_HDR_DISPLAY = "winsystem.ishdrdisplay"

Constructor & Destructor Documentation

◆ CWinSystemX11GLESContext()

KODI::WINDOWING::X11::CWinSystemX11GLESContext::CWinSystemX11GLESContext ( )

◆ ~CWinSystemX11GLESContext()

CWinSystemX11GLESContext::~CWinSystemX11GLESContext ( )

Member Function Documentation

◆ BindTextureUploadContext()

bool CWinSystemX11GLESContext::BindTextureUploadContext ( )

Binds a shared context to the current thread, in order to upload textures asynchronously.

Return true if a texture upload context exists and the binding succeeds.

Reimplemented from CWinSystemBase.

◆ CreateNewWindow()

bool CWinSystemX11GLESContext::CreateNewWindow ( const std::string & name,
bool fullScreen,

◆ CreateWinSystem()

std::unique_ptr< CWinSystemBase > CWinSystemX11GLESContext::CreateWinSystem ( )

◆ DestroyWindow()

bool CWinSystemX11GLESContext::DestroyWindow ( )

◆ DestroyWindowSystem()

bool CWinSystemX11GLESContext::DestroyWindowSystem ( )

◆ FinishWindowResize()

void CWinSystemX11GLESContext::FinishWindowResize ( int newWidth,
int newHeight )

◆ GetEGLConfig()

EGLConfig CWinSystemX11GLESContext::GetEGLConfig ( ) const

◆ GetEGLContext()

EGLContext CWinSystemX11GLESContext::GetEGLContext ( ) const

◆ GetEGLDisplay()

EGLDisplay CWinSystemX11GLESContext::GetEGLDisplay ( ) const

◆ GetEGLSurface()

EGLSurface CWinSystemX11GLESContext::GetEGLSurface ( ) const

◆ GetRenderSystem()

CRenderSystemBase * KODI::WINDOWING::X11::CWinSystemX11GLESContext::GetRenderSystem ( )

Reimplemented from CWinSystemBase.

◆ GetVisual()

XVisualInfo * CWinSystemX11GLESContext::GetVisual ( )

◆ HasContext()

bool CWinSystemX11GLESContext::HasContext ( )

Checks if a graphics context is already bound to the current thread.

Return true if so.

Reimplemented from CWinSystemBase.

◆ IsExtSupported()

bool CWinSystemX11GLESContext::IsExtSupported ( const char * extension) const

Reimplemented from CRenderSystemGLES.

◆ PresentRenderImpl()

void CWinSystemX11GLESContext::PresentRenderImpl ( bool rendered)

Implements CRenderSystemGLES.

◆ RefreshGLContext()

bool CWinSystemX11GLESContext::RefreshGLContext ( bool force)

◆ Register()

void CWinSystemX11GLESContext::Register ( )

◆ ResizeWindow()

bool CWinSystemX11GLESContext::ResizeWindow ( int newWidth,
int newHeight,
int newLeft,
int newTop )

◆ SetFullScreen()

bool CWinSystemX11GLESContext::SetFullScreen ( bool fullScreen,
bool blankOtherDisplays )

◆ SetVSyncImpl()

void CWinSystemX11GLESContext::SetVSyncImpl ( bool enable)

Implements CRenderSystemGLES.

◆ SetWindow()

bool CWinSystemX11GLESContext::SetWindow ( int width,
int height,
bool fullscreen,
const std::string & output,
int * winstate = nullptr )

◆ UnbindTextureUploadContext()

bool CWinSystemX11GLESContext::UnbindTextureUploadContext ( )

Unbinds the shared context.

Return true if the texture upload context has been unbound.

Reimplemented from CWinSystemBase.

Member Data Documentation

◆ m_newGlContext

bool KODI::WINDOWING::X11::CWinSystemX11GLESContext::m_newGlContext

◆ m_pGLContext

CGLContextEGL* KODI::WINDOWING::X11::CWinSystemX11GLESContext::m_pGLContext = nullptr

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