Flutter Impeller
impeller::testing::TestRenderTargetAllocator Class Reference
Inheritance diagram for impeller::testing::TestRenderTargetAllocator:
impeller::RenderTargetAllocator

Public Member Functions

 TestRenderTargetAllocator (std::shared_ptr< Allocator > allocator)
 
 ~TestRenderTargetAllocator ()=default
 
std::shared_ptr< TextureCreateTexture (const TextureDescriptor &desc) override
 Create a new render target texture, or recycle a previously allocated render target texture. More...
 
void Start () override
 Mark the beginning of a frame workload. More...
 
void End () override
 Mark the end of a frame workload. More...
 
std::vector< TextureDescriptorGetDescriptors () const
 
- Public Member Functions inherited from impeller::RenderTargetAllocator
 RenderTargetAllocator (std::shared_ptr< Allocator > allocator)
 
virtual ~RenderTargetAllocator ()=default
 

Detailed Description

Definition at line 2455 of file entity_unittests.cc.

Constructor & Destructor Documentation

◆ TestRenderTargetAllocator()

impeller::testing::TestRenderTargetAllocator::TestRenderTargetAllocator ( std::shared_ptr< Allocator allocator)
inlineexplicit

Definition at line 2457 of file entity_unittests.cc.

2458  : RenderTargetAllocator(std::move(allocator)) {}

◆ ~TestRenderTargetAllocator()

impeller::testing::TestRenderTargetAllocator::~TestRenderTargetAllocator ( )
default

Member Function Documentation

◆ CreateTexture()

std::shared_ptr<Texture> impeller::testing::TestRenderTargetAllocator::CreateTexture ( const TextureDescriptor desc)
inlineoverridevirtual

Create a new render target texture, or recycle a previously allocated render target texture.

Reimplemented from impeller::RenderTargetAllocator.

Definition at line 2462 of file entity_unittests.cc.

2463  {
2464  allocated_.push_back(desc);
2466  }

References impeller::RenderTargetAllocator::CreateTexture().

◆ End()

void impeller::testing::TestRenderTargetAllocator::End ( )
inlineoverridevirtual

Mark the end of a frame workload.

   This may be used to deallocate any unused textures. 

Reimplemented from impeller::RenderTargetAllocator.

Definition at line 2470 of file entity_unittests.cc.

References impeller::RenderTargetAllocator::End().

◆ GetDescriptors()

std::vector<TextureDescriptor> impeller::testing::TestRenderTargetAllocator::GetDescriptors ( ) const
inline

Definition at line 2472 of file entity_unittests.cc.

2472 { return allocated_; }

◆ Start()

void impeller::testing::TestRenderTargetAllocator::Start ( )
inlineoverridevirtual

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 2468 of file entity_unittests.cc.

References impeller::RenderTargetAllocator::Start().


The documentation for this class was generated from the following file:
impeller::RenderTargetAllocator::Start
virtual void Start()
Mark the beginning of a frame workload.
Definition: render_target.cc:21
impeller::RenderTargetAllocator::RenderTargetAllocator
RenderTargetAllocator(std::shared_ptr< Allocator > allocator)
Definition: render_target.cc:17
impeller::RenderTargetAllocator::CreateTexture
virtual std::shared_ptr< Texture > CreateTexture(const TextureDescriptor &desc)
Create a new render target texture, or recycle a previously allocated render target texture.
Definition: render_target.cc:25
impeller::RenderTargetAllocator::End
virtual void End()
Mark the end of a frame workload.
Definition: render_target.cc:23