5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PIPELINE_LIBRARY_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PIPELINE_LIBRARY_VK_H_
10 #include "flutter/fml/concurrent_message_loop.h"
11 #include "flutter/fml/unique_fd.h"
28 public BackendCast<PipelineLibraryVK, PipelineLibrary> {
35 const std::shared_ptr<PipelineCacheVK>&
GetPSOCache()
const;
42 std::weak_ptr<DeviceHolderVK> device_holder_;
43 std::shared_ptr<PipelineCacheVK> pso_cache_;
44 std::shared_ptr<fml::ConcurrentTaskRunner> worker_task_runner_;
45 Mutex pipelines_mutex_;
48 std::atomic_size_t frames_acquired_ = 0u;
49 PipelineKey pipeline_key_ IPLR_GUARDED_BY(pipelines_mutex_) = 1;
50 bool is_valid_ =
false;
51 bool cache_dirty_ =
false;
52 std::shared_ptr<PipelineCompileQueue> compile_queue_;
55 const std::shared_ptr<DeviceHolderVK>& device_holder,
56 std::shared_ptr<const Capabilities> caps,
57 fml::UniqueFD cache_directory,
58 std::shared_ptr<fml::ConcurrentTaskRunner> worker_task_runner);
61 bool IsValid()
const override;
67 bool threadsafe =
false)
override;
78 void RemovePipelinesWithEntryPoint(
79 std::shared_ptr<const ShaderFunction>
function)
override;
84 std::unique_ptr<ComputePipelineVK> CreateComputePipeline(
88 void PersistPipelineCacheToDisk();
A task queue designed for managing compilation of pipeline state objects.
~PipelineLibraryVK() override
void DidAcquireSurfaceFrame()
const std::shared_ptr< fml::ConcurrentTaskRunner > & GetWorkerTaskRunner() const
const std::shared_ptr< PipelineCacheVK > & GetPSOCache() const
std::vector< std::pair< uint64_t, std::unique_ptr< GenericRenderPipelineHandle > > > pipelines_
std::unordered_map< ComputePipelineDescriptor, PipelineFuture< ComputePipelineDescriptor >, ComparableHash< ComputePipelineDescriptor >, ComparableEqual< ComputePipelineDescriptor > > ComputePipelineMap
std::unordered_map< PipelineDescriptor, PipelineFuture< PipelineDescriptor >, ComparableHash< PipelineDescriptor >, ComparableEqual< PipelineDescriptor > > PipelineMap