| Flutter Impeller |

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

## Public Member Functions
| TrackedObjectsVK (const std::weak_ptr< const ContextVK > &context, const std::shared_ptr< CommandPoolVK > &pool, std::unique_ptr< GPUProbe > probe)
| ~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 ()
GPUProbe & | GetGPUProbe () const

## Detailed Description

Definition at line 17 of file command_encoder_vk.cc.

## Constructor & Destructor Documentation

## ◆ TrackedObjectsVK()

impeller::TrackedObjectsVK::TrackedObjectsVK | ( | const std::weak_ptr< const ContextVK > & | context,
|  | const std::shared_ptr< CommandPoolVK > & | pool,
|  | std::unique_ptr< GPUProbe > | probe
| ) |  |
| inline explicit

Definition at line 19 of file command_encoder_vk.cc.

22 : desc_pool_(context), probe_(std::move(probe)) {
23 if (!pool) {
24 return;
25 }
26 auto buffer = pool->CreateCommandBuffer();
27 if (!buffer) {
28 return;
29 }
30 pool_ = pool;
31 buffer_ = std::move(buffer);
32 is_valid_ = true;
33 }

## ◆ ~TrackedObjectsVK()

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

Definition at line 35 of file command_encoder_vk.cc.

35 {
36 if (!buffer_) {
37 return;
38 }
39 pool_->CollectCommandBuffer(std::move(buffer_));
40 }

## Member Function Documentation

## ◆ GetCommandBuffer()

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

Definition at line 79 of file command_encoder_vk.cc.

79 { return *buffer_; }

## ◆ GetDescriptorPool()

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

Definition at line 81 of file command_encoder_vk.cc.

81 { return desc_pool_; }

## ◆ GetGPUProbe()

GPUProbe& impeller::TrackedObjectsVK::GetGPUProbe | ( |  | ) | const
| inline

Definition at line 83 of file command_encoder_vk.cc.

83 { return *probe_.get(); }

## ◆ IsTracking() [1/2]

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

Definition at line 58 of file command_encoder_vk.cc.

58 {
59 if (!buffer) {
60 return false;
61 }
62 return tracked_buffers_.find(buffer) != tracked_buffers_.end();
63 }

## ◆ IsTracking() [2/2]

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

Definition at line 72 of file command_encoder_vk.cc.

72 {
73 if (!texture) {
74 return false;
75 }
76 return tracked_textures_.find(texture) != tracked_textures_.end();
77 }

## ◆ IsValid()

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

Definition at line 42 of file command_encoder_vk.cc.

42 { return is_valid_; }

## ◆ Track() [1/3]

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

Definition at line 51 of file command_encoder_vk.cc.

51 {
52 if (!buffer) {
53 return;
54 }
55 tracked_buffers_.insert(std::move(buffer));
56 }

## ◆ Track() [2/3]

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

Definition at line 65 of file command_encoder_vk.cc.

65 {
66 if (!texture) {
67 return;
68 }
69 tracked_textures_.insert(std::move(texture));
70 }

## ◆ Track() [3/3]

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

Definition at line 44 of file command_encoder_vk.cc.

44 {
45 if (!object) {
46 return;
47 }
48 tracked_objects_.insert(std::move(object));
49 }

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

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