| Flutter Impeller |

Public Member Functions | List of all members
impeller::testing::TestRenderTargetAllocator Class Reference
Inheritance diagram for impeller::testing::TestRenderTargetAllocator:

## Public Member Functions
| TestRenderTargetAllocator (std::shared_ptr< Allocator > allocator)
| ~TestRenderTargetAllocator ()=default
std::shared_ptr< Texture > | CreateTexture (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< TextureDescriptor > | GetDescriptors () const
Public Member Functions inherited from impeller::RenderTargetAllocator
| RenderTargetAllocator (std::shared_ptr< Allocator > allocator)
virtual | ~RenderTargetAllocator ()=default

## Detailed Description

Definition at line 2461 of file entity_unittests.cc.

## Constructor & Destructor Documentation

## ◆ TestRenderTargetAllocator()

impeller::testing::TestRenderTargetAllocator::TestRenderTargetAllocator | ( | std::shared_ptr< Allocator > | allocator | ) |
| inline explicit

Definition at line 2463 of file entity_unittests.cc.

2464 : 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 | ) |
| inline override virtual

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

Reimplemented from impeller::RenderTargetAllocator.

Definition at line 2468 of file entity_unittests.cc.

2469 {
2470 allocated_.push_back(desc);
2471 return RenderTargetAllocator::CreateTexture(desc);
2472 }

References impeller::RenderTargetAllocator::CreateTexture().

## ◆ End()

void impeller::testing::TestRenderTargetAllocator::End | ( |  | ) |
| inline override virtual

Mark the end of a frame workload.

       This may be used to deallocate any unused textures.

Reimplemented from impeller::RenderTargetAllocator.

Definition at line 2476 of file entity_unittests.cc.

2476 { RenderTargetAllocator::End(); }

References impeller::RenderTargetAllocator::End().

## ◆ GetDescriptors()

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

Definition at line 2478 of file entity_unittests.cc.

2478 { return allocated_; }

## ◆ Start()

void impeller::testing::TestRenderTargetAllocator::Start | ( |  | ) |
| inline override 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 from impeller::RenderTargetAllocator.

Definition at line 2474 of file entity_unittests.cc.

2474 { RenderTargetAllocator::Start(); }

References impeller::RenderTargetAllocator::Start().

The documentation for this class was generated from the following file:

- impeller/entity/entity_unittests.cc

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