Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
No Matches
CWinSystemWin10DX Class Reference

#include <WinSystemWin10DX.h>

Inheritance diagram for CWinSystemWin10DX:
CWinSystemWin10 CRenderSystemDX CWinSystemBase CRenderSystemBase

Public Member Functions

 CWinSystemWin10DX ()
 ~CWinSystemWin10DX ()
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
bool SetFullScreen (bool fullScreen, RESOLUTION_INFO &res, bool blankOtherDisplays) override
void PresentRenderImpl (bool rendered) override
bool DPIChanged (WORD dpi, RECT windowRect) const override
bool DestroyRenderSystem () override
voidGetHWContext () override
 Get OS specific hardware context.
void UninitHooks ()
void InitHooks (IDXGIOutput *pOutput)
void OnMove (int x, int y) override
void OnResize (int width, int height)
winrt::Windows::Foundation::Size GetOutputSize () const
void TrimDevice () const
void Register (ID3DResource *resource) const
 Register as a dependent of the DirectX Render System Resources should call this on construction if they're dependent on the Render System for survival. Any resources that registers will get callbacks on loss and reset of device. In addition, callbacks for destruction and creation of the device are also called, where any resources dependent on the DirectX device should be destroyed and recreated.
void Unregister (ID3DResource *resource) const
 Unregister as a dependent of the DirectX Render System Resources should call this on destruction if they're a dependent on the Render System.
void Register (IDispResource *resource) override
void Unregister (IDispResource *resource) override
void ShowSplash (const std::string &message) override
bool IsHDRDisplay () override
HDR_STATUS ToggleHDR () override
HDR_STATUS GetOSHDRStatus () override
bool IsHDROutput () const
bool IsTransferPQ () const
void SetHdrMetaData (DXGI_HDR_METADATA_HDR10 &hdr10) const
void SetHdrColorSpace (const DXGI_COLOR_SPACE_TYPE colorSpace) const
DEBUG_INFO_RENDER GetDebugInfo () override
 Gets debug info from video renderer for use in "Debug Info OSD" (Alt + O)
- Public Member Functions inherited from CWinSystemWin10
 CWinSystemWin10 ()
virtual ~CWinSystemWin10 ()
bool InitWindowSystem () override
bool DestroyWindowSystem () override
void FinishWindowResize (int newWidth, int newHeight) override
void ForceFullScreen (const RESOLUTION_INFO &resInfo) override
 Forces the window to fullscreen provided the window resolution.
void UpdateResolutions () override
void NotifyAppFocusChange (bool bGaining) override
void ShowOSMouse (bool show) override
bool HasInertialGestures () override
bool Minimize () override
bool Restore () override
bool Hide () override
bool Show (bool raise=true) override
std::string GetClipboardText () override
bool UseLimitedColor () override
float GetGuiSdrPeakLuminance () const override
 Max luminance for GUI SDR content in HDR mode.
bool HasSystemSdrPeakLuminance () override
 Test support of the OS for a SDR max luminance in HDR mode setting.
std::unique_ptr< CVideoSyncGetVideoSync (CVideoReferenceClock *clock) override
bool WindowedMode () const
bool IsAlteringWindow () const
void SetAlteringWindow (bool altering)
bool IsTogglingHDR () const
void SetTogglingHDR (bool toggling)
bool IsMinimized () const
void SetMinimized (bool minimized)
void CacheSystemSdrPeakLuminance ()
 Cache the system HDR/SDR balance for use during rendering, instead of querying the API for each frame.
bool CanDoWindowed () override
bool MessagePump () override
- Public Member Functions inherited from CWinSystemBase
 CWinSystemBase ()
virtual ~CWinSystemBase ()
virtual const std::string GetName ()
virtual bool DestroyWindow ()
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 void NotifyAppActiveChange (bool bActivated)
virtual bool HasCursor ()
virtual int NoOfBuffers ()
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 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 ()
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 bool HasCalibration (const RESOLUTION_INFO &resInfo)
void RegisterRenderLoop (IRenderLoop *client)
void UnregisterRenderLoop (IRenderLoop *client)
void DriveRenderLoop ()
virtual CGraphicContextGetGfxContext () const
std::shared_ptr< CDPMSSupportGetDPMSManager ()
virtual bool SetHDR (const VideoPicture *videoPicture)
 Set the HDR metadata. Passing nullptr as the parameter should disable HDR.
virtual CHDRCapabilities GetDisplayHDRCapabilities () const
virtual bool SupportsVideoSuperResolution ()
 System supports Video Super Resolution HW upscaler i.e.: "NVIDIA RTX Video Super Resolution" or "Intel Video Super Resolution".
virtual std::vector< std::string > GetConnectedOutputs ()
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 CRenderSystemDX
 CRenderSystemDX ()
virtual ~CRenderSystemDX ()
bool InitRenderSystem () override
bool BeginRender () override
bool EndRender () override
void PresentRender (bool rendered, bool videoLayer) override
bool ClearBuffers (UTILS::COLOR::Color color) override
void SetViewPort (const CRect &viewPort) override
void GetViewPort (CRect &viewPort) override
void RestoreViewPort () override
CRect ClipRectToScissorRect (const CRect &rect) override
bool ScissorsCanEffectClipping () 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.f) override
void SetStereoMode (RENDER_STEREO_MODE mode, RENDER_STEREO_VIEW view) override
bool SupportsStereo (RENDER_STEREO_MODE mode) const override
void Project (float &x, float &y, float &z) override
bool SupportsNPOT (bool dxt) const override
void OnDXDeviceLost () override
void OnDXDeviceRestored () override
CGUIShaderDXGetGUIShader () const
bool IsFormatSupport (DXGI_FORMAT format, unsigned int usage) const
CRect GetBackBufferRect ()
CD3DTextureGetBackBuffer ()
void FlushGPU () const
void RequestDecodingTime ()
void ReleaseDecodingTime ()
void SetAlphaBlendEnable (bool enable)
bool IsExtSupported (const char *extension) const override
bool ResetRenderSystem (int width, int height) override
- Public Member Functions inherited from CRenderSystemBase
 CRenderSystemBase ()
virtual ~CRenderSystemBase ()
virtual void InvalidateColorBuffer ()
virtual void SetDepthCulling (DEPTH_CULLING culling)
virtual std::string GetShaderPath (const std::string &filename)
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

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

void SetDeviceFullScreen (bool fullScreen, RESOLUTION_INFO &res) override
void ReleaseBackBuffer () override
void CreateBackBuffer () override
void ResizeDeviceBuffers () override
bool IsStereoEnabled () override
- Protected Member Functions inherited from CWinSystemWin10
virtual void UpdateStates (bool fullScreen)
WINDOW_STATE GetState (bool fullScreen) const
virtual void AdjustWindow ()
bool ChangeResolution (const RESOLUTION_INFO &res, bool forceChange=false)
const MONITOR_DETAILSGetDefaultMonitor () const
void RestoreDesktopResolution ()
void GetConnectedDisplays (std::vector< MONITOR_DETAILS > &outputs)
void OnDisplayLost ()
void OnDisplayReset ()
void OnDisplayBack ()
void ResolutionChanged ()
- 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)
virtual std::unique_ptr< KODI::WINDOWING::IOSScreenSaverGetOSScreenSaverImpl ()
- Protected Member Functions inherited from CRenderSystemDX
bool CreateStates ()
bool InitGUIShader ()
void OnResize ()
void CheckInterlacedStereoView (void)
void CheckDeviceCaps ()

Additional Inherited Members

- Static Public Attributes inherited from CWinSystemBase
static const char * SETTING_WINSYSTEM_IS_HDR_DISPLAY = "winsystem.ishdrdisplay"
- Static Protected Member Functions inherited from CWinSystemWin10
static bool AddResolution (const RESOLUTION_INFO &res)
 Adds a resolution to the list of resolutions if we don't already have it.
- Protected Attributes inherited from CWinSystemWin10
std::vector< MONITOR_DETAILSm_displays
bool m_ValidWindowedPosition
bool m_IsAlteringWindow
CCriticalSection m_resourceSection
std::vector< IDispResource * > m_resources
bool m_delayDispReset
XbmcThreads::EndTime m_dispResetTimer
bool m_inFocus
bool m_bMinimized
bool m_bFirstResChange = true
winrt::Windows::UI::Core::CoreWindow m_coreWindow = nullptr
bool m_validSystemSdrPeakLuminance {false}
float m_systemSdrPeakLuminance {.0f}
DWORD m_uiThreadId {0}
bool m_cachedHasSystemSdrPeakLum {false}
- 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 CRenderSystemDX
CCriticalSection m_resourceSection
CCriticalSection m_decoderSection
bool m_inScene { false }
 True if we're in a BeginScene()/EndScene() block.
bool m_BlendEnabled { false }
bool m_ScissorsEnabled { false }
D3D11_VIEWPORT m_viewPort
CRect m_scissor
CGUIShaderDXm_pGUIShader { nullptr }
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > m_depthStencilState
Microsoft::WRL::ComPtr< ID3D11BlendState > m_BlendEnableState
Microsoft::WRL::ComPtr< ID3D11BlendState > m_BlendDisableState
Microsoft::WRL::ComPtr< ID3D11RasterizerState > m_RSScissorDisable
Microsoft::WRL::ComPtr< ID3D11RasterizerState > m_RSScissorEnable
CD3DTexture m_rightEyeTex
XbmcThreads::EndTime m_decodingTimer
XbmcThreads::ConditionVariable m_decodingEvent
std::shared_ptr< DX::DeviceResourcesm_deviceResources
- 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

Constructor & Destructor Documentation

◆ CWinSystemWin10DX()

CWinSystemWin10DX::CWinSystemWin10DX ( )

◆ ~CWinSystemWin10DX()

CWinSystemWin10DX::~CWinSystemWin10DX ( )

Member Function Documentation

◆ CreateBackBuffer()

void CWinSystemWin10DX::CreateBackBuffer ( )

Implements CWinSystemWin10.

◆ CreateNewWindow()

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

Implements CWinSystemWin10.

◆ CreateWinSystem()

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

◆ DestroyRenderSystem()

bool CWinSystemWin10DX::DestroyRenderSystem ( )

Reimplemented from CRenderSystemDX.

◆ DPIChanged()

bool CWinSystemWin10DX::DPIChanged ( WORD dpi,
RECT windowRect ) const

Reimplemented from CWinSystemWin10.

◆ GetDebugInfo()

DEBUG_INFO_RENDER CWinSystemWin10DX::GetDebugInfo ( )

Gets debug info from video renderer for use in "Debug Info OSD" (Alt + O)

Reimplemented from CWinSystemBase.

◆ GetHWContext()

void * CWinSystemWin10DX::GetHWContext ( )

Get OS specific hardware context.

OS specific context or nullptr if OS not have
This function is currently only related to Windows with DirectX, all other OS where use GL returns nullptr. Returned Windows class pointer is ID3D11DeviceContext1.

Reimplemented from CWinSystemBase.

◆ GetOSHDRStatus()

HDR_STATUS CWinSystemWin10DX::GetOSHDRStatus ( )

Reimplemented from CWinSystemBase.

◆ GetOutputSize()

winrt::Windows::Foundation::Size CWinSystemWin10DX::GetOutputSize ( ) const

◆ GetRenderSystem()

CRenderSystemBase * CWinSystemWin10DX::GetRenderSystem ( )

Reimplemented from CWinSystemBase.

◆ InitHooks()

void CWinSystemWin10DX::InitHooks ( IDXGIOutput * pOutput)

◆ IsHDRDisplay()

bool CWinSystemWin10DX::IsHDRDisplay ( )

Reimplemented from CWinSystemBase.

◆ IsHDROutput()

bool CWinSystemWin10DX::IsHDROutput ( ) const

◆ IsStereoEnabled()

bool CWinSystemWin10DX::IsStereoEnabled ( )

Implements CWinSystemWin10.

◆ IsTransferPQ()

bool CWinSystemWin10DX::IsTransferPQ ( ) const

◆ OnMove()

void CWinSystemWin10DX::OnMove ( int x,
int y )

Reimplemented from CWinSystemBase.

◆ OnResize()

void CWinSystemWin10DX::OnResize ( int width,
int height )

◆ PresentRenderImpl()

void CWinSystemWin10DX::PresentRenderImpl ( bool rendered)

Implements CRenderSystemDX.

◆ Register() [1/3]

void CWinSystemWin10DX::Register ( )

◆ Register() [2/3]

void CWinSystemWin10DX::Register ( ID3DResource * resource) const

Register as a dependent of the DirectX Render System Resources should call this on construction if they're dependent on the Render System for survival. Any resources that registers will get callbacks on loss and reset of device. In addition, callbacks for destruction and creation of the device are also called, where any resources dependent on the DirectX device should be destroyed and recreated.

See also
Unregister, ID3DResource

◆ Register() [3/3]

void CWinSystemWin10DX::Register ( IDispResource * resource)

Reimplemented from CWinSystemWin10.

◆ ReleaseBackBuffer()

void CWinSystemWin10DX::ReleaseBackBuffer ( )

Implements CWinSystemWin10.

◆ ResizeDeviceBuffers()

void CWinSystemWin10DX::ResizeDeviceBuffers ( )

Implements CWinSystemWin10.

◆ ResizeWindow()

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

Reimplemented from CWinSystemWin10.

◆ SetDeviceFullScreen()

void CWinSystemWin10DX::SetDeviceFullScreen ( bool fullScreen,

Implements CWinSystemWin10.

◆ SetFullScreen()

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

Reimplemented from CWinSystemWin10.

◆ SetHdrColorSpace()

void CWinSystemWin10DX::SetHdrColorSpace ( const DXGI_COLOR_SPACE_TYPE colorSpace) const

◆ SetHdrMetaData()

void CWinSystemWin10DX::SetHdrMetaData ( DXGI_HDR_METADATA_HDR10 & hdr10) const

◆ ShowSplash()

void CWinSystemWin10DX::ShowSplash ( const std::string & message)

Reimplemented from CRenderSystemBase.

◆ ToggleHDR()

HDR_STATUS CWinSystemWin10DX::ToggleHDR ( )

Reimplemented from CWinSystemBase.

◆ TrimDevice()

void CWinSystemWin10DX::TrimDevice ( ) const

◆ UninitHooks()

void CWinSystemWin10DX::UninitHooks ( )

◆ Unregister() [1/2]

void CWinSystemWin10DX::Unregister ( ID3DResource * resource) const

Unregister as a dependent of the DirectX Render System Resources should call this on destruction if they're a dependent on the Render System.

See also
Register, ID3DResource

◆ Unregister() [2/2]

void CWinSystemWin10DX::Unregister ( IDispResource * resource)

Reimplemented from CWinSystemWin10.

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