Sunshine master
Self-hosted game stream host for Moonlight.
platf::dxgi::texture_lock_helper Struct Reference

Keyed-mutex guard used while sharing a D3D texture. More...

Collaboration diagram for platf::dxgi::texture_lock_helper:
[legend]

Public Member Functions

bool lock ()
 Acquire the underlying lock or keyed mutex.
 
texture_lock_helperoperator= (const texture_lock_helper &)=delete
 
texture_lock_helperoperator= (texture_lock_helper &&other)
 Assign state from another instance while preserving ownership semantics.
 
 texture_lock_helper (const texture_lock_helper &)=delete
 
 texture_lock_helper (IDXGIKeyedMutex *mutex)
 Acquire a D3D keyed mutex for scoped texture access.
 
 texture_lock_helper (texture_lock_helper &&other)
 Move a keyed-mutex lock helper while preserving lock ownership.
 

Public Attributes

bool _locked = false
 Whether the keyed mutex is currently locked.
 
keyed_mutex_t _mutex
 D3D keyed mutex acquired for shared-texture access.
 

Detailed Description

Keyed-mutex guard used while sharing a D3D texture.

Constructor & Destructor Documentation

◆ texture_lock_helper() [1/2]

platf::dxgi::texture_lock_helper::texture_lock_helper ( texture_lock_helper && other)
inline

Move a keyed-mutex lock helper while preserving lock ownership.

Parameters
otherHelper whose acquired keyed mutex is transferred.

◆ texture_lock_helper() [2/2]

platf::dxgi::texture_lock_helper::texture_lock_helper ( IDXGIKeyedMutex * mutex)
inline

Acquire a D3D keyed mutex for scoped texture access.

Parameters
mutexKeyed mutex to acquire for texture access.

Member Function Documentation

◆ lock()

bool platf::dxgi::texture_lock_helper::lock ( )
inline

Acquire the underlying lock or keyed mutex.

Returns
True when the keyed mutex is acquired.

◆ operator=()

texture_lock_helper & platf::dxgi::texture_lock_helper::operator= ( texture_lock_helper && other)
inline

Assign state from another instance while preserving ownership semantics.

Parameters
otherSource object whose state is copied or moved into this object.
Returns
Reference or value produced by the operator.

The documentation for this struct was generated from the following file: