Skip to content
SiteEmail

ICompositorInterfaceUnreal

Inherits from IRenoirSublayerCompositor

Inherited by UCohCompositor, UHUDSurfacePartitioningCompositor, UMultithreadAwareCompositorWrapper, UWidgetSurfacePartitioningCompositor

Name
virtual voidPrepareForAdvance(uint32 ViewFrameId)
Called on the Game Thread after a View gets advanced.
virtual voidProcessDrawData(const FRenoirDrawData & DrawData, uint32 ViewFrameId)
Called on the Game Thread, used to create/update textures based on the draw data received for them Should be overridden by child classes depending on where/how they want to draw the textures.
virtual voidProcessFrame_RT(uint32_t ViewFrameId)
Called on the Render Thread at the end of the frame after a View paint.
virtual voidOnDrawSubLayer(const renoir::ISubLayerCompositor::DrawData & DrawData)
Called on a Worker Thread (task created by the View Layout) Since we cannot create/update textures there, we just save them for processing on the Game Thread.
virtual voidOnCompositionAdded(unsigned ViewId, const char * CompositionId, void * Metadata) =0
Called on the Game Thread whenever a new composition is found in HTML Should initialize the relevant materials that the texture will be drawn into.
virtual voidOnCompositionVisibility(unsigned , const char * , void * , bool ) =0
Called on the Game Thread whenever the visibility of the composition has changed.
virtual voidOnCompositionTransform(unsigned , const char * , void * , const renoir::float4x4 & )
Called on the Game Thread whenever the transform of the composition has changed.
virtual voidOnCompositionRemoved(unsigned ViewId, const char * CompositionId, void * Metadata) =0
Called on the Game Thread whenever a new composition is removed from HTML Should destroy the relevant materials that the texture will be drawn into.
virtual voidSetViewSize(int32_t Width, int32_t Height)
Helper method for Compositors that care about size.
voidAdvanceCompositor(uint32 ViewFrameId)
Must be called after ensuring that View Layout tasks are completed.
virtual voidPrepareAllMeshMaterial(uint32_t ViewFrameId)
virtual voidProcessRenderData(const FRenderData & RenderData)
virtual voidCreateCompositions(uint32 ViewFrameId)
Executed during AdvanceCompositor after we have waited for cohtml::View::Advance and Layout.
virtual boolHasCompositions() =0
Helper method to save on computation when there are no compositions.
virtual boolIsValidObject() =0
Helper method to catch some invalid creation/destruction edge cases.
virtual boolShouldSkipFrame()
Helper method to combine multiple conditions to determine if the current Compositor frame should be skipped.
virtual FCriticalSection &GetCriticalSectionFrames()
virtual const TMap< FString, FRenoirDrawData > &GetRenoirDrawDataMap() const
Name
voidUpdateRenderData(const FRenoirDrawData & DrawData, UTextureRenderTarget2D * Texture, IRenderingBackend * InterfaceBackend, uint32 ViewFrameId)
Name
FCriticalSectionCriticalSectionFrames
uint32CurrentCompositorFrameId
TSet< uint32 >Frames
TMap< uint32, TArray< FRenderData > >RenderDataInfosMap
TMap< FString, FRenoirDrawData >RenoirDrawDataMap
boolbNewCompositionsReceived
virtual void PrepareForAdvance(
uint32 ViewFrameId
)

Called on the Game Thread after a View gets advanced.

Reimplemented by: UMultithreadAwareCompositorWrapper::PrepareForAdvance

inline virtual void ProcessDrawData(
const FRenoirDrawData & DrawData,
uint32 ViewFrameId
)

Called on the Game Thread, used to create/update textures based on the draw data received for them Should be overridden by child classes depending on where/how they want to draw the textures.

Reimplemented by: UMultithreadAwareCompositorWrapper::ProcessDrawData, UCohCompositor::ProcessDrawData, UHUDSurfacePartitioningCompositor::ProcessDrawData, UWidgetSurfacePartitioningCompositor::ProcessDrawData

virtual void ProcessFrame_RT(
uint32_t ViewFrameId
)

Called on the Render Thread at the end of the frame after a View paint.

Reimplemented by: UMultithreadAwareCompositorWrapper::ProcessFrame_RT

virtual void OnDrawSubLayer(
const renoir::ISubLayerCompositor::DrawData & DrawData
)

Called on a Worker Thread (task created by the View Layout) Since we cannot create/update textures there, we just save them for processing on the Game Thread.

Reimplemented by: UMultithreadAwareCompositorWrapper::OnDrawSubLayer, UCohCompositor::OnDrawSubLayer

virtual void OnCompositionAdded(
unsigned ViewId,
const char * CompositionId,
void * Metadata
) =0

Called on the Game Thread whenever a new composition is found in HTML Should initialize the relevant materials that the texture will be drawn into.

Reimplemented by: UMultithreadAwareCompositorWrapper::OnCompositionAdded, UCohCompositor::OnCompositionAdded, UHUDSurfacePartitioningCompositor::OnCompositionAdded, UWidgetSurfacePartitioningCompositor::OnCompositionAdded

virtual void OnCompositionVisibility(
unsigned ,
const char * ,
void * ,
bool
) =0

Called on the Game Thread whenever the visibility of the composition has changed.

Reimplemented by: UMultithreadAwareCompositorWrapper::OnCompositionVisibility, UCohCompositor::OnCompositionVisibility, UHUDSurfacePartitioningCompositor::OnCompositionVisibility, UWidgetSurfacePartitioningCompositor::OnCompositionVisibility

virtual void OnCompositionTransform(
unsigned ,
const char * ,
void * ,
const renoir::float4x4 &
)

Called on the Game Thread whenever the transform of the composition has changed.

Reimplemented by: UMultithreadAwareCompositorWrapper::OnCompositionTransform

virtual void OnCompositionRemoved(
unsigned ViewId,
const char * CompositionId,
void * Metadata
) =0

Called on the Game Thread whenever a new composition is removed from HTML Should destroy the relevant materials that the texture will be drawn into.

Reimplemented by: UMultithreadAwareCompositorWrapper::OnCompositionRemoved, UCohCompositor::OnCompositionRemoved, UHUDSurfacePartitioningCompositor::OnCompositionRemoved, UWidgetSurfacePartitioningCompositor::OnCompositionRemoved

inline virtual void SetViewSize(
int32_t Width,
int32_t Height
)

Helper method for Compositors that care about size.

Reimplemented by: UMultithreadAwareCompositorWrapper::SetViewSize, UCohCompositor::SetViewSize

void AdvanceCompositor(
uint32 ViewFrameId
)

Must be called after ensuring that View Layout tasks are completed.

virtual void PrepareAllMeshMaterial(
uint32_t ViewFrameId
)
virtual void ProcessRenderData(
const FRenderData & RenderData
)
virtual void CreateCompositions(
uint32 ViewFrameId
)

Executed during AdvanceCompositor after we have waited for cohtml::View::Advance and Layout.

Reimplemented by: UMultithreadAwareCompositorWrapper::CreateCompositions

virtual bool HasCompositions() =0

Helper method to save on computation when there are no compositions.

Reimplemented by: UMultithreadAwareCompositorWrapper::HasCompositions, UCohCompositor::HasCompositions, UHUDSurfacePartitioningCompositor::HasCompositions, UWidgetSurfacePartitioningCompositor::HasCompositions

virtual bool IsValidObject() =0

Helper method to catch some invalid creation/destruction edge cases.

Reimplemented by: UMultithreadAwareCompositorWrapper::IsValidObject, UCohCompositor::IsValidObject, UHUDSurfacePartitioningCompositor::IsValidObject, UWidgetSurfacePartitioningCompositor::IsValidObject

virtual bool ShouldSkipFrame()

Helper method to combine multiple conditions to determine if the current Compositor frame should be skipped.

Reimplemented by: UMultithreadAwareCompositorWrapper::ShouldSkipFrame

virtual FCriticalSection & GetCriticalSectionFrames()

Reimplemented by: UMultithreadAwareCompositorWrapper::GetCriticalSectionFrames

virtual const TMap< FString, FRenoirDrawData > & GetRenoirDrawDataMap() const

Reimplemented by: UMultithreadAwareCompositorWrapper::GetRenoirDrawDataMap

void UpdateRenderData(
const FRenoirDrawData & DrawData,
UTextureRenderTarget2D * Texture,
IRenderingBackend * InterfaceBackend,
uint32 ViewFrameId
)
FCriticalSection CriticalSectionFrames;
uint32 CurrentCompositorFrameId = 0u;
TSet< uint32 > Frames;
TMap< uint32, TArray< FRenderData > > RenderDataInfosMap;
TMap< FString, FRenoirDrawData > RenoirDrawDataMap;
bool bNewCompositionsReceived = false;