An implementation of the [RenderTargetAllocator] that caches all allocated texture data for one frame. More...
#include <render_target_cache.h>
Public Member Functions | |
| RenderTargetCache (std::shared_ptr< Allocator > allocator) | |
| ~RenderTargetCache ()=default | |
| void | Start () override |
| Mark the beginning of a frame workload. More... | |
| void | End () override |
| Mark the end of a frame workload. More... | |
| std::shared_ptr< Texture > | CreateTexture (const TextureDescriptor &desc) override |
| Create a new render target texture, or recycle a previously allocated render target texture. More... | |
| size_t | CachedTextureCount () const |
Public Member Functions inherited from impeller::RenderTargetAllocator | |
| RenderTargetAllocator (std::shared_ptr< Allocator > allocator) | |
| virtual | ~RenderTargetAllocator ()=default |
An implementation of the [RenderTargetAllocator] that caches all allocated texture data for one frame.
Any textures unused after a frame are immediately discarded.
Definition at line 15 of file render_target_cache.h.
|
explicit |
Definition at line 10 of file render_target_cache.cc.
|
default |
| size_t impeller::RenderTargetCache::CachedTextureCount | ( | ) | const |
Definition at line 30 of file render_target_cache.cc.
|
overridevirtual |
Create a new render target texture, or recycle a previously allocated render target texture.
Reimplemented from impeller::RenderTargetAllocator.
Definition at line 34 of file render_target_cache.cc.
References impeller::RenderTargetAllocator::CreateTexture(), impeller::kHostVisible, impeller::kRenderTarget, impeller::TextureDescriptor::storage_mode, and impeller::TextureDescriptor::usage.
|
overridevirtual |
Mark the end of a frame workload.
This may be used to deallocate any unused textures.
Reimplemented from impeller::RenderTargetAllocator.
Definition at line 19 of file render_target_cache.cc.
|
overridevirtual |
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 from impeller::RenderTargetAllocator.
Definition at line 13 of file render_target_cache.cc.