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

A per-frame object used to track resource lifetimes and allocate command buffers and descriptor sets. More...

#include <tracked_objects_vk.h>

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 DeviceBuffer > buffer)
 
bool IsTracking (const std::shared_ptr< const DeviceBuffer > &buffer) const
 
void Track (std::shared_ptr< const TextureSourceVK > texture)
 
bool IsTracking (const std::shared_ptr< const TextureSourceVK > &texture) const
 
vk::CommandBuffer GetCommandBuffer () const
 
DescriptorPoolVKGetDescriptorPool ()
 
GPUProbeGetGPUProbe () const
 

Detailed Description

A per-frame object used to track resource lifetimes and allocate command buffers and descriptor sets.

Definition at line 17 of file tracked_objects_vk.h.

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 
)
explicit

Definition at line 11 of file tracked_objects_vk.cc.

15 : desc_pool_(context), probe_(std::move(probe)) {
16 if (!pool) {
17 return;
18 }
19 auto buffer = pool->CreateCommandBuffer();
20 if (!buffer) {
21 return;
22 }
23 pool_ = pool;
24 buffer_ = std::move(buffer);
25 is_valid_ = true;
26}
AutoreleasePool pool
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

◆ ~TrackedObjectsVK()

impeller::TrackedObjectsVK::~TrackedObjectsVK ( )

Definition at line 28 of file tracked_objects_vk.cc.

28 {
29 if (!buffer_) {
30 return;
31 }
32 pool_->CollectCommandBuffer(std::move(buffer_));
33}

Member Function Documentation

◆ GetCommandBuffer()

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

Definition at line 76 of file tracked_objects_vk.cc.

76 {
77 return *buffer_;
78}

◆ GetDescriptorPool()

DescriptorPoolVK & impeller::TrackedObjectsVK::GetDescriptorPool ( )

Definition at line 80 of file tracked_objects_vk.cc.

80 {
81 return desc_pool_;
82}

◆ GetGPUProbe()

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

Definition at line 84 of file tracked_objects_vk.cc.

84 {
85 return *probe_.get();
86}

◆ IsTracking() [1/2]

bool impeller::TrackedObjectsVK::IsTracking ( const std::shared_ptr< const DeviceBuffer > &  buffer) const

Definition at line 53 of file tracked_objects_vk.cc.

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

◆ IsTracking() [2/2]

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

Definition at line 68 of file tracked_objects_vk.cc.

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

◆ IsValid()

bool impeller::TrackedObjectsVK::IsValid ( ) const

Definition at line 35 of file tracked_objects_vk.cc.

35 {
36 return is_valid_;
37}

◆ Track() [1/3]

void impeller::TrackedObjectsVK::Track ( std::shared_ptr< const DeviceBuffer buffer)

Definition at line 46 of file tracked_objects_vk.cc.

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

◆ Track() [2/3]

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

Definition at line 61 of file tracked_objects_vk.cc.

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

◆ Track() [3/3]

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

Definition at line 39 of file tracked_objects_vk.cc.

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

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