| Flutter Impeller |

Public Member Functions | List of all members
impeller::BackgroundCommandPoolVK Class Referencefinal

## Public Member Functions
| BackgroundCommandPoolVK (BackgroundCommandPoolVK &&)=default
| BackgroundCommandPoolVK (vk::UniqueCommandPool &&pool, std::vector< vk::UniqueCommandBuffer > &&buffers, std::weak_ptr< CommandPoolRecyclerVK > recycler)
| ~BackgroundCommandPoolVK ()

## Detailed Description

Definition at line 20 of file command_pool_vk.cc.

## Constructor & Destructor Documentation

## ◆ BackgroundCommandPoolVK() [1/2]

impeller::BackgroundCommandPoolVK::BackgroundCommandPoolVK | ( | BackgroundCommandPoolVK && |  | ) |
| default

## ◆ BackgroundCommandPoolVK() [2/2]

impeller::BackgroundCommandPoolVK::BackgroundCommandPoolVK | ( | vk::UniqueCommandPool && | pool,
|  | std::vector< vk::UniqueCommandBuffer > && | buffers,
|  | std::weak_ptr< CommandPoolRecyclerVK > | recycler
| ) |  |
| inline explicit

Definition at line 24 of file command_pool_vk.cc.

28 : pool_(std::move(pool)),
29 buffers_(std::move(buffers)),
30 recycler_(std::move(recycler)) {}

## ◆ ~BackgroundCommandPoolVK()

impeller::BackgroundCommandPoolVK::~BackgroundCommandPoolVK | ( |  | ) |
| inline

Definition at line 32 of file command_pool_vk.cc.

32 {
33 auto const recycler = recycler_.lock();
34
35 // Not only does this prevent recycling when the context is being destroyed,
36 // but it also prevents the destructor from effectively being called twice;
37 // once for the original BackgroundCommandPoolVK() and once for the moved
38 // BackgroundCommandPoolVK().
39 if (!recycler) {
40 return;
41 }
42 buffers_.clear();
43
44 recycler->Reclaim(std::move(pool_));
45 }

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

- impeller/renderer/backend/vulkan/command_pool_vk.cc