FTextureMipDataProvider defines the update steps and interface to implement the mip data strategy used in FTextureStreamIn. 更多...
#include <TextureMipDataProvider.h>
Public 成员函数 | |
| virtual void | AbortPollMips () |
| Abort anything that could be stalling the update in PollMips(). 更多... | |
| virtual void | Cancel (const FTextureUpdateSyncOptions &SyncOptions)=0 |
| Cancel the progression and release any temporary resources. 更多... | |
| virtual void | CleanUp (const FTextureUpdateSyncOptions &SyncOptions)=0 |
| Release any temporary data and objects that where used for the update. 更多... | |
| virtual int32 | GetMips (const FTextureUpdateContext &Context, int32 StartingMipIndex, const FTextureMipInfoArray &MipInfos, const FTextureUpdateSyncOptions &SyncOptions)=0 |
| Acquire the mips this provider will handle. 更多... | |
| virtual void | Init (const FTextureUpdateContext &Context, const FTextureUpdateSyncOptions &SyncOptions)=0 |
| Initialize data prelimary to the GetMips() step. 更多... | |
| virtual bool | PollMips (const FTextureUpdateSyncOptions &SyncOptions)=0 |
| Check if each mip handled by this mip data provider have been updated correctly. 更多... | |
Protected 属性 | |
| const FStreamableRenderResourceState | ResourceState |
| The streamable state requested. | |
FTextureMipDataProvider defines the update steps and interface to implement the mip data strategy used in FTextureStreamIn.
It allows to decouples where the texture mip data source from the texture update. Typical implementations are using DDC, disk files, internet server or dynamically generated.
|
inlinevirtual |
Abort anything that could be stalling the update in PollMips().
Called from an async task. Expected behavior is to cancel any pending IO operations. Called when the FTextureStreamIn update is cancelled and the current step is to be waiting on upon PollMips(). This is because Cancel() can only be executed when any pending operations are completed (see FTextureUpdateSyncOptions).
|
pure virtual |
Cancel the progression and release any temporary resources.
Called within the FTextureStreamIn update when the stream in request is aborted or cannot complete correctly The Cancel() function is called on the thread returned by GetCancelThread().
| SyncOptions | - Different sync options to control when the next tick of FTextureStreamIn can be scheduled. |
|
pure virtual |
Release any temporary data and objects that where used for the update.
Final step executed after the texture has been updated correctly.
| SyncOptions | - Different sync options to control when the next tick of FTextureStreamIn can be scheduled. |
|
pure virtual |
Acquire the mips this provider will handle.
Non handled mips must be handled by the next mip data provider or the update will be cancelled altogether. GetMips() must typically advance to PollMips() if it wants to be able to notify FTextureStreamIn that something went wrong and that the update must be cancelled.
| Context | - An update context constant throughout the FTextureStreamIn update. Gives things like which texture asset is updated and what mips are streamed in. |
| StartingMipIndex | - The current starting mip index, somewhere between FTextureUpdateContext::PendingFirstMipIndex and FTextureUpdateContext::CurrentFirstMipIndex inclusively. |
| MipInfos | - The array of FTextureMipInfo that hold the information relative to each mip for which data must be provided. |
| SyncOptions | - Different sync options to control when the next tick of FTextureStreamIn can be scheduled. |
Return the next value StartingMipIndex (for the next provider). Must be FTextureUpdateContext::CurrentFirstMipIndex to indicate that all mips have been handled.
|
pure virtual |
Initialize data prelimary to the GetMips() step.
Can be called several time. Mostly useful to simplify the logic in GetMips(). This is because GetMips is a chained call between all mip data providers, each taking some mips to handle, and is not compatible with multi step process. This means that GetMips() must return immediately and can not postpone or delay return by not advancing to the next steps.
| Context | - An update context constant throughout the FTextureStreamIn update. Gives things like which texture asset is updated and what mips are streamed in. |
| SyncOptions | - Different sync options to control when the next tick of FTextureStreamIn can be scheduled. |
|
pure virtual |
Check if each mip handled by this mip data provider have been updated correctly.
Must move to CleanUp() when done.
| SyncOptions | - Different sync options to control when the next tick of FTextureStreamIn can be scheduled. |
Return true unless the texture update needs to be aborted because the mip won't be updated correctly (for example IO error).