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

## Constructor & Destructor Documentation

## ◆ TestRenderTargetAllocator()

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

Definition at line 2471 of file entity_unittests.cc.

2472 : 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 2476 of file entity_unittests.cc.

2477 {
2478 allocated_.push_back(desc);
2479 return RenderTargetAllocator::CreateTexture(desc);
2480 }

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

2484 { RenderTargetAllocator::End(); }

References impeller::RenderTargetAllocator::End().

## ◆ GetDescriptors()

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

Definition at line 2486 of file entity_unittests.cc.

2486 { 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 2482 of file entity_unittests.cc.

2482 { 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