Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Windows::SkiaContext< ControlT, numFrames > Class Template Reference

#include <HWSkia.h>

Inheritance diagram for Harlinn::Windows::SkiaContext< ControlT, numFrames >:
[legend]
Collaboration diagram for Harlinn::Windows::SkiaContext< ControlT, numFrames >:
[legend]

Public Types

using ControlType = ControlT
 

Public Member Functions

 SkiaContext (ControlType &control, SkiaDisplayParams displayParams)
 
 ~SkiaContext ()
 
void InitializeContext ()
 
void SetupSurfaces (int width, int height)
 
void DestroyContext ()
 
sk_sp< SkSurface > GetBackbufferSurface ()
 
void SwapBuffers ()
 
void Resize ()
 
void SetDisplayParams (const SkiaDisplayParams &params)
 

Static Public Attributes

static constexpr int NumFrames = numFrames
 
static constexpr Size MinSurfaceSize = { 8,8 }
 

Private Member Functions

bool CreateD3DBackendContext (GrD3DBackendContext *ctx)
 

Private Attributes

ControlTypecontrol_
 
sk_sp< GrDirectContext > directContext_
 
SkiaDisplayParams displayParams_
 
int sampleCount_ = 1
 
int stencilBits_ = 0
 
D3D12Device device_
 
D3D12CommandQueue queue_
 
DXGI::SwapChain3 swapChain_
 
D3D12Resource buffers_ [NumFrames]
 
sk_sp< SkSurface > surfaces_ [NumFrames]
 
unsigned int bufferIndex_ = 0
 
Common::Core::EventWaitHandle fenceEvent_
 
D3D12Fence fence_
 
uint64_t fenceValues_ [NumFrames] = {}
 
boost::signals2::connection onHandleCreatedConnection_
 
boost::signals2::connection onBeforeHandleDestroyConnection_
 
boost::signals2::connection onSizeConnection_
 

Member Typedef Documentation

◆ ControlType

template<typename ControlT , int numFrames = 2>
using Harlinn::Windows::SkiaContext< ControlT, numFrames >::ControlType = ControlT

Constructor & Destructor Documentation

◆ SkiaContext()

template<typename ControlT , int numFrames = 2>
Harlinn::Windows::SkiaContext< ControlT, numFrames >::SkiaContext ( ControlType & control,
SkiaDisplayParams displayParams )
inline

◆ ~SkiaContext()

template<typename ControlT , int numFrames = 2>
Harlinn::Windows::SkiaContext< ControlT, numFrames >::~SkiaContext ( )
inline

Member Function Documentation

◆ CreateD3DBackendContext()

template<typename ControlT , int numFrames = 2>
bool Harlinn::Windows::SkiaContext< ControlT, numFrames >::CreateD3DBackendContext ( GrD3DBackendContext * ctx)
inlineprivate

◆ DestroyContext()

template<typename ControlT , int numFrames = 2>
void Harlinn::Windows::SkiaContext< ControlT, numFrames >::DestroyContext ( )
inline

◆ GetBackbufferSurface()

template<typename ControlT , int numFrames = 2>
sk_sp< SkSurface > Harlinn::Windows::SkiaContext< ControlT, numFrames >::GetBackbufferSurface ( )
inline

◆ InitializeContext()

template<typename ControlT , int numFrames = 2>
void Harlinn::Windows::SkiaContext< ControlT, numFrames >::InitializeContext ( )
inline

◆ Resize()

template<typename ControlT , int numFrames = 2>
void Harlinn::Windows::SkiaContext< ControlT, numFrames >::Resize ( )
inline

◆ SetDisplayParams()

template<typename ControlT , int numFrames = 2>
void Harlinn::Windows::SkiaContext< ControlT, numFrames >::SetDisplayParams ( const SkiaDisplayParams & params)
inline

◆ SetupSurfaces()

template<typename ControlT , int numFrames = 2>
void Harlinn::Windows::SkiaContext< ControlT, numFrames >::SetupSurfaces ( int width,
int height )
inline

◆ SwapBuffers()

template<typename ControlT , int numFrames = 2>
void Harlinn::Windows::SkiaContext< ControlT, numFrames >::SwapBuffers ( )
inline

Member Data Documentation

◆ bufferIndex_

template<typename ControlT , int numFrames = 2>
unsigned int Harlinn::Windows::SkiaContext< ControlT, numFrames >::bufferIndex_ = 0
private

◆ buffers_

template<typename ControlT , int numFrames = 2>
D3D12Resource Harlinn::Windows::SkiaContext< ControlT, numFrames >::buffers_[NumFrames]
private

◆ control_

template<typename ControlT , int numFrames = 2>
ControlType& Harlinn::Windows::SkiaContext< ControlT, numFrames >::control_
private

◆ device_

template<typename ControlT , int numFrames = 2>
D3D12Device Harlinn::Windows::SkiaContext< ControlT, numFrames >::device_
private

◆ directContext_

template<typename ControlT , int numFrames = 2>
sk_sp<GrDirectContext> Harlinn::Windows::SkiaContext< ControlT, numFrames >::directContext_
private

◆ displayParams_

template<typename ControlT , int numFrames = 2>
SkiaDisplayParams Harlinn::Windows::SkiaContext< ControlT, numFrames >::displayParams_
private

◆ fence_

template<typename ControlT , int numFrames = 2>
D3D12Fence Harlinn::Windows::SkiaContext< ControlT, numFrames >::fence_
private

◆ fenceEvent_

template<typename ControlT , int numFrames = 2>
Common::Core::EventWaitHandle Harlinn::Windows::SkiaContext< ControlT, numFrames >::fenceEvent_
private

◆ fenceValues_

template<typename ControlT , int numFrames = 2>
uint64_t Harlinn::Windows::SkiaContext< ControlT, numFrames >::fenceValues_[NumFrames] = {}
private

◆ MinSurfaceSize

template<typename ControlT , int numFrames = 2>
Size Harlinn::Windows::SkiaContext< ControlT, numFrames >::MinSurfaceSize = { 8,8 }
staticconstexpr

◆ NumFrames

template<typename ControlT , int numFrames = 2>
int Harlinn::Windows::SkiaContext< ControlT, numFrames >::NumFrames = numFrames
staticconstexpr

◆ onBeforeHandleDestroyConnection_

template<typename ControlT , int numFrames = 2>
boost::signals2::connection Harlinn::Windows::SkiaContext< ControlT, numFrames >::onBeforeHandleDestroyConnection_
private

◆ onHandleCreatedConnection_

template<typename ControlT , int numFrames = 2>
boost::signals2::connection Harlinn::Windows::SkiaContext< ControlT, numFrames >::onHandleCreatedConnection_
private

◆ onSizeConnection_

template<typename ControlT , int numFrames = 2>
boost::signals2::connection Harlinn::Windows::SkiaContext< ControlT, numFrames >::onSizeConnection_
private

◆ queue_

template<typename ControlT , int numFrames = 2>
D3D12CommandQueue Harlinn::Windows::SkiaContext< ControlT, numFrames >::queue_
private

◆ sampleCount_

template<typename ControlT , int numFrames = 2>
int Harlinn::Windows::SkiaContext< ControlT, numFrames >::sampleCount_ = 1
private

◆ stencilBits_

template<typename ControlT , int numFrames = 2>
int Harlinn::Windows::SkiaContext< ControlT, numFrames >::stencilBits_ = 0
private

◆ surfaces_

template<typename ControlT , int numFrames = 2>
sk_sp<SkSurface> Harlinn::Windows::SkiaContext< ControlT, numFrames >::surfaces_[NumFrames]
private

◆ swapChain_

template<typename ControlT , int numFrames = 2>
DXGI::SwapChain3 Harlinn::Windows::SkiaContext< ControlT, numFrames >::swapChain_
private

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