| Flutter Impeller |

Public Member Functions | List of all members
impeller::TrackedObjectsVK Class Reference

## Public Member Functions
| TrackedObjectsVK (const std::weak_ptr< const DeviceHolder > &device_holder, const std::shared_ptr< CommandPoolVK > &pool)
| ~TrackedObjectsVK ()
bool | IsValid () const
void | Track (std::shared_ptr< SharedObjectVK > object)
void | Track (std::shared_ptr< const Buffer > buffer)
bool | IsTracking (const std::shared_ptr< const Buffer > &buffer) const
void | Track (std::shared_ptr< const TextureSourceVK > texture)
bool | IsTracking (const std::shared_ptr< const TextureSourceVK > &texture) const
vk::CommandBuffer | GetCommandBuffer () const
DescriptorPoolVK & | GetDescriptorPool ()

## Detailed Description

Definition at line 14 of file command_encoder_vk.cc.

## Constructor & Destructor Documentation

## ◆ TrackedObjectsVK()

impeller::TrackedObjectsVK::TrackedObjectsVK | ( | const std::weak_ptr< const DeviceHolder > & | device_holder,
|  | const std::shared_ptr< CommandPoolVK > & | pool
| ) |  |
| inline explicit

Definition at line 16 of file command_encoder_vk.cc.

19 : desc_pool_(device_holder) {
20 if (!pool) {
21 return;
22 }
23 auto buffer = pool->CreateCommandBuffer();
24 if (!buffer) {
25 return;
26 }
27 pool_ = pool;
28 buffer_ = std::move(buffer);
29 is_valid_ = true;
30 }

## ◆ ~TrackedObjectsVK()

impeller::TrackedObjectsVK::~TrackedObjectsVK | ( |  | ) |
| inline

Definition at line 32 of file command_encoder_vk.cc.

32 {
33 if (!buffer_) {
34 return;
35 }
36 pool_->CollectCommandBuffer(std::move(buffer_));
37 }

## Member Function Documentation

## ◆ GetCommandBuffer()

vk::CommandBuffer impeller::TrackedObjectsVK::GetCommandBuffer | ( |  | ) | const
| inline

Definition at line 76 of file command_encoder_vk.cc.

76 { return *buffer_; }

## ◆ GetDescriptorPool()

DescriptorPoolVK& impeller::TrackedObjectsVK::GetDescriptorPool | ( |  | ) |
| inline

Definition at line 78 of file command_encoder_vk.cc.

78 { return desc_pool_; }

## ◆ IsTracking() [1/2]

bool impeller::TrackedObjectsVK::IsTracking | ( | const std::shared_ptr< const Buffer > & | buffer | ) | const
| inline

Definition at line 55 of file command_encoder_vk.cc.

55 {
56 if (!buffer) {
57 return false;
58 }
59 return tracked_buffers_.find(buffer) != tracked_buffers_.end();
60 }

## ◆ IsTracking() [2/2]

bool impeller::TrackedObjectsVK::IsTracking | ( | const std::shared_ptr< const TextureSourceVK > & | texture | ) | const
| inline

Definition at line 69 of file command_encoder_vk.cc.

69 {
70 if (!texture) {
71 return false;
72 }
73 return tracked_textures_.find(texture) != tracked_textures_.end();
74 }

## ◆ IsValid()

bool impeller::TrackedObjectsVK::IsValid | ( |  | ) | const
| inline

Definition at line 39 of file command_encoder_vk.cc.

39 { return is_valid_; }

## ◆ Track() [1/3]

void impeller::TrackedObjectsVK::Track | ( | std::shared_ptr< const Buffer > | buffer | ) |
| inline

Definition at line 48 of file command_encoder_vk.cc.

48 {
49 if (!buffer) {
50 return;
51 }
52 tracked_buffers_.insert(std::move(buffer));
53 }

## ◆ Track() [2/3]

void impeller::TrackedObjectsVK::Track | ( | std::shared_ptr< const TextureSourceVK > | texture | ) |
| inline

Definition at line 62 of file command_encoder_vk.cc.

62 {
63 if (!texture) {
64 return;
65 }
66 tracked_textures_.insert(std::move(texture));
67 }

## ◆ Track() [3/3]

void impeller::TrackedObjectsVK::Track | ( | std::shared_ptr< SharedObjectVK > | object | ) |
| inline

Definition at line 41 of file command_encoder_vk.cc.

41 {
42 if (!object) {
43 return;
44 }
45 tracked_objects_.insert(std::move(object));
46 }

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

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