Flutter Impeller
impeller::BackgroundDescriptorPoolVK Class Referencefinal

Public Member Functions

 BackgroundDescriptorPoolVK (BackgroundDescriptorPoolVK &&)=default
 
 BackgroundDescriptorPoolVK (vk::UniqueDescriptorPool &&pool, uint32_t allocated_capacity, std::weak_ptr< DescriptorPoolRecyclerVK > recycler)
 
 ~BackgroundDescriptorPoolVK ()
 

Detailed Description

Definition at line 18 of file descriptor_pool_vk.cc.

Constructor & Destructor Documentation

◆ BackgroundDescriptorPoolVK() [1/2]

impeller::BackgroundDescriptorPoolVK::BackgroundDescriptorPoolVK ( BackgroundDescriptorPoolVK &&  )
default

◆ BackgroundDescriptorPoolVK() [2/2]

impeller::BackgroundDescriptorPoolVK::BackgroundDescriptorPoolVK ( vk::UniqueDescriptorPool &&  pool,
uint32_t  allocated_capacity,
std::weak_ptr< DescriptorPoolRecyclerVK recycler 
)
inlineexplicit

Definition at line 22 of file descriptor_pool_vk.cc.

26  : pool_(std::move(pool)),
27  allocated_capacity_(allocated_capacity),
28  recycler_(std::move(recycler)) {}

◆ ~BackgroundDescriptorPoolVK()

impeller::BackgroundDescriptorPoolVK::~BackgroundDescriptorPoolVK ( )
inline

Definition at line 30 of file descriptor_pool_vk.cc.

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

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