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, std::string_view 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, std::string_view 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 | DisableCache () |
Disable any caching until the next call to EnabledCache . More... | |
virtual void | EnableCache () |
Re-enable any caching if disabled. More... | |
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 149 of file render_target.h.
|
explicit |
Definition at line 314 of file render_target.cc.
|
virtualdefault |
|
virtual |
Reimplemented in impeller::RenderTargetCache.
Definition at line 322 of file render_target.cc.
References impeller::ColorAttachment::clear_color, impeller::RenderTarget::AttachmentConfig::clear_color, impeller::TextureDescriptor::format, impeller::Context::GetCapabilities(), impeller::TSize< T >::IsEmpty(), impeller::kRenderTarget, impeller::kShaderRead, impeller::Attachment::load_action, impeller::RenderTarget::AttachmentConfig::load_action, impeller::TextureDescriptor::mip_count, impeller::RenderTarget::SetColorAttachment(), impeller::RenderTarget::SetDepthAttachment(), impeller::RenderTarget::SetStencilAttachment(), impeller::RenderTarget::SetupDepthStencilAttachments(), impeller::TextureDescriptor::size, impeller::TextureDescriptor::storage_mode, impeller::RenderTarget::AttachmentConfig::storage_mode, impeller::Attachment::store_action, impeller::RenderTarget::AttachmentConfig::store_action, impeller::Attachment::texture, and impeller::TextureDescriptor::usage.
Referenced by impeller::RenderTargetCache::CreateOffscreen(), impeller::DisplayListToTexture(), and impeller::testing::TEST_P().
|
virtual |
Reimplemented in impeller::RenderTargetCache.
Definition at line 376 of file render_target.cc.
References impeller::ColorAttachment::clear_color, impeller::RenderTarget::AttachmentConfigMSAA::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::Attachment::load_action, impeller::RenderTarget::AttachmentConfigMSAA::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::TextureDescriptor::storage_mode, impeller::RenderTarget::AttachmentConfigMSAA::storage_mode, impeller::Attachment::store_action, impeller::RenderTarget::AttachmentConfigMSAA::store_action, impeller::Attachment::texture, impeller::TextureDescriptor::type, impeller::TextureDescriptor::usage, and VALIDATION_LOG.
Referenced by impeller::RenderTargetCache::CreateOffscreenMSAA(), impeller::DisplayListToTexture(), impeller::ContextVK::InitializeCommonlyUsedShadersIfNeeded(), and impeller::testing::TEST().
|
inlinevirtual |
Disable any caching until the next call to EnabledCache
.
Reimplemented in impeller::RenderTargetCache.
Definition at line 181 of file render_target.h.
|
inlinevirtual |
Re-enable any caching if disabled.
Reimplemented in impeller::RenderTargetCache.
Definition at line 184 of file render_target.h.
|
virtual |
Mark the end of a frame workload.
This may be used to deallocate any unused textures.
Reimplemented in impeller::RenderTargetCache.
Definition at line 320 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 318 of file render_target.cc.