a wrapper around the impeller [Allocator] instance that can be used to provide caching of allocated render target textures. More...
#include <render_target.h>
Public Member Functions | |
RenderTargetAllocator (std::shared_ptr< Allocator > allocator) | |
virtual | ~RenderTargetAllocator ()=default |
virtual RenderTarget | CreateOffscreen (const Context &context, ISize size, int mip_count, const std::string &label="Offscreen", RenderTarget::AttachmentConfig color_attachment_config=RenderTarget::kDefaultColorAttachmentConfig, std::optional< RenderTarget::AttachmentConfig > stencil_attachment_config=RenderTarget::kDefaultStencilAttachmentConfig, const std::shared_ptr< Texture > &existing_color_texture=nullptr, const std::shared_ptr< Texture > &existing_depth_stencil_texture=nullptr) |
virtual RenderTarget | CreateOffscreenMSAA (const Context &context, ISize size, int mip_count, const std::string &label="Offscreen MSAA", RenderTarget::AttachmentConfigMSAA color_attachment_config=RenderTarget::kDefaultColorAttachmentConfigMSAA, std::optional< RenderTarget::AttachmentConfig > stencil_attachment_config=RenderTarget::kDefaultStencilAttachmentConfig, const std::shared_ptr< Texture > &existing_color_msaa_texture=nullptr, const std::shared_ptr< Texture > &existing_color_resolve_texture=nullptr, const std::shared_ptr< Texture > &existing_depth_stencil_texture=nullptr) |
virtual void | Start () |
Mark the beginning of a frame workload. More... | |
virtual void | End () |
Mark the end of a frame workload. More... | |
a wrapper around the impeller [Allocator] instance that can be used to provide caching of allocated render target textures.
Definition at line 142 of file render_target.h.
|
explicit |
Definition at line 251 of file render_target.cc.
|
virtualdefault |
|
virtual |
Reimplemented in impeller::RenderTargetCache.
Definition at line 259 of file render_target.cc.
References impeller::RenderTarget::AttachmentConfig::clear_color, impeller::ColorAttachment::clear_color, impeller::TextureDescriptor::format, impeller::Context::GetCapabilities(), impeller::TSize< T >::IsEmpty(), impeller::kRenderTarget, impeller::kShaderRead, impeller::RenderTarget::AttachmentConfig::load_action, impeller::Attachment::load_action, impeller::TextureDescriptor::mip_count, impeller::RenderTarget::SetColorAttachment(), impeller::RenderTarget::SetDepthAttachment(), impeller::RenderTarget::SetStencilAttachment(), impeller::RenderTarget::SetupDepthStencilAttachments(), impeller::TextureDescriptor::size, impeller::SPrintF(), impeller::TextureDescriptor::storage_mode, impeller::RenderTarget::AttachmentConfig::storage_mode, impeller::RenderTarget::AttachmentConfig::store_action, impeller::Attachment::store_action, impeller::Attachment::texture, and impeller::TextureDescriptor::usage.
Referenced by impeller::RenderTargetCache::CreateOffscreen().
|
virtual |
Reimplemented in impeller::RenderTargetCache.
Definition at line 313 of file render_target.cc.
References impeller::RenderTarget::AttachmentConfigMSAA::clear_color, impeller::ColorAttachment::clear_color, impeller::TextureDescriptor::compression_type, impeller::TextureDescriptor::format, impeller::Context::GetCapabilities(), impeller::TSize< T >::IsEmpty(), impeller::kCount4, impeller::kDevicePrivate, impeller::kLossy, impeller::kRenderTarget, impeller::kShaderRead, impeller::kTexture2DMultisample, impeller::RenderTarget::AttachmentConfigMSAA::load_action, impeller::Attachment::load_action, impeller::TextureDescriptor::mip_count, impeller::RenderTarget::AttachmentConfigMSAA::resolve_storage_mode, impeller::Attachment::resolve_texture, impeller::TextureDescriptor::sample_count, impeller::RenderTarget::SetColorAttachment(), impeller::RenderTarget::SetDepthAttachment(), impeller::RenderTarget::SetStencilAttachment(), impeller::RenderTarget::SetupDepthStencilAttachments(), impeller::TextureDescriptor::size, impeller::SPrintF(), impeller::TextureDescriptor::storage_mode, impeller::RenderTarget::AttachmentConfigMSAA::storage_mode, impeller::RenderTarget::AttachmentConfigMSAA::store_action, impeller::Attachment::store_action, impeller::Attachment::texture, impeller::TextureDescriptor::type, impeller::TextureDescriptor::usage, and VALIDATION_LOG.
Referenced by impeller::RenderTargetCache::CreateOffscreenMSAA(), and impeller::ContextVK::InitializeCommonlyUsedShadersIfNeeded().
|
virtual |
Mark the end of a frame workload.
This may be used to deallocate any unused textures.
Reimplemented in impeller::RenderTargetCache.
Definition at line 257 of file render_target.cc.
|
virtual |
Mark the beginning of a frame workload.
This may be used to reset any tracking state on whether or not a particular texture instance is still in use.
Reimplemented in impeller::RenderTargetCache.
Definition at line 255 of file render_target.cc.