UWidgetSurfacePartitioningCompositor

Inherits from UObject, ICompositorInterfaceUnreal

Public Functions

Name
voidInitialize(SCohtmlWidget * InWidget)
virtual voidProcessDrawData(const FDrawData & DrawData, int32_t IndexToProcess) override
Called on the GameThread, 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 voidOnCompositionAdded(unsigned ViewId, const char * CompositionId, void * Metadata) override
Called on GameThread whenever a new composition is found in the HTML. Should initialize the relevant materials that the texture will be drawn into.
virtual voidOnCompositionVisibility(unsigned , const char * , void * , bool ) override
Called on Game Thread whenever the visibility of the composition has changed.
virtual voidOnCompositionRemoved(unsigned ViewId, const char * CompositionId, void * Metadata) override
Called on GameThread whenever a new composition is found in the HTML. Should destroy the relevant materials that the texture will be drawn into.
virtual boolHasCompositions() override
Helper method to save on computation when there are no compositions.
virtual boolIsValidObject() override
Helper method to catch some invalid creation/destruction edge cases.
TMap< FString, FWidgetDrawData > &GetCachedWidgetMaterials()
const TMap< FString, bool > &GetVisibilityMap() const

Protected Attributes

Name
SCohtmlWidget *Widget
TMap< FString, FWidgetDrawData >CachedWidgetMaterials
TMap< FString, bool >VisibilityMap

Additional inherited members

Public Classes inherited from ICompositorInterfaceUnreal

Name
structFFrameState

Public Types inherited from ICompositorInterfaceUnreal

Name
using uint32_tFrameId

Public Functions inherited from ICompositorInterfaceUnreal

Name
virtual uint32_tPrepareForAdvance()
Should be called once per frame, before the View gets advanced. Will update the current frame.
voidSignalFrameComplete(uint32_t FrameId)
Should be called when the view’s advance/layout is finished, so we can start processing the composited elements of the page we’ve received during the layout/advance.
virtual voidEnqueueRenderingCommands(uint32_t FrameId)
Usually called at the end of the frame during paint.
virtual voidOnDrawSubLayer(const renoir::ISubLayerCompositor::DrawData & DrawData)
Should be called on the layout thread. Since we cannot create/update textures there, we just save them for processing on the GameThread.
virtual voidOnCompositionTransform(unsigned , const char * , void * , const renoir::float4x4 & )
Called on GameThread whenever the transform of the composition has changed.
virtual voidSetViewSize(int32_t Width, int32_t Height)
Helper method for compositors that care about size.
voidAdvanceCompositor()
Will block until the view’s advance/layout is finished, then start processing the DrawData(s) collected during (likely done by child classes)
virtual voidPrepareAllMeshMaterial(uint32_t FrameId)
virtual voidProcessRenderData(const FRenderData & RenderData)
virtual voidCreateCompositions()
Executed during AdvanceCompositor after we have waited for cohtml::View::Advance and Layout.
virtual voidDiscardCurrentFrameState()
Helper method to discard the current compositor frame.
virtual boolShouldSkipFrame()
Helper method to combine multiple conditions to determine if the current compositor frame should be skipped.
virtual voidCompleteFrameState(uint32_t CompositorFrame)
Should be called when the cohtml::View::Advance and Layout is completed, so that work can be done on the Game Thread.
virtual FrameIdGetCurrentCompositorFrameId()
virtual FFrameState *GetCurrentFrameState()
virtual FCriticalSection &GetCriticalSectionFrameStates()
virtual const TMap< FString, FDrawData > &GetDrawDataInfoMap() const

Protected Functions inherited from ICompositorInterfaceUnreal

Name
UTexture2D *CreateTexture(const FDrawData & DrawData, IRenderingBackend * InterfaceBackend, int32_t IndexToProcess)

Protected Attributes inherited from ICompositorInterfaceUnreal

Name
FCriticalSectionCriticalSectionFrameStates
FrameIdCompositorFrameId
TMap< FrameId, FFrameState >FrameStates
TMap< FrameId, TArray< FRenderData > >RenderDataInfosMap
TMap< FString, FDrawData >DrawDataInfoMap

Public Functions Documentation

function Initialize

void Initialize(
    SCohtmlWidget * InWidget
)

function ProcessDrawData

virtual void ProcessDrawData(
    const FDrawData & DrawData,
    int32_t IndexToProcess
) override

Called on the GameThread, 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.

Reimplements: ICompositorInterfaceUnreal::ProcessDrawData

function OnCompositionAdded

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

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

Reimplements: ICompositorInterfaceUnreal::OnCompositionAdded

function OnCompositionVisibility

virtual void OnCompositionVisibility(
    unsigned ,
    const char * ,
    void * ,
    bool 
) override

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

Reimplements: ICompositorInterfaceUnreal::OnCompositionVisibility

function OnCompositionRemoved

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

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

Reimplements: ICompositorInterfaceUnreal::OnCompositionRemoved

function HasCompositions

inline virtual bool HasCompositions() override

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

Reimplements: ICompositorInterfaceUnreal::HasCompositions

function IsValidObject

inline virtual bool IsValidObject() override

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

Reimplements: ICompositorInterfaceUnreal::IsValidObject

function GetCachedWidgetMaterials

TMap< FString, FWidgetDrawData > & GetCachedWidgetMaterials()

function GetVisibilityMap

const TMap< FString, bool > & GetVisibilityMap() const

Protected Attributes Documentation

variable Widget

SCohtmlWidget * Widget;

variable CachedWidgetMaterials

TMap< FString, FWidgetDrawData > CachedWidgetMaterials;

variable VisibilityMap

TMap< FString, bool > VisibilityMap;