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/macros.h"
12 #include "flutter/fml/mapping.h"
13 #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_;
46 PipelineMap pipelines_ IPLR_GUARDED_BY(pipelines_mutex_);
47 Mutex compute_pipelines_mutex_;
49 compute_pipelines_mutex_);
50 std::atomic_size_t frames_acquired_ = 0u;
51 bool is_valid_ =
false;
54 const std::shared_ptr<DeviceHolderVK>& device_holder,
55 std::shared_ptr<const Capabilities> caps,
56 fml::UniqueFD cache_directory,
57 std::shared_ptr<fml::ConcurrentTaskRunner> worker_task_runner);
60 bool IsValid()
const override;
71 void RemovePipelinesWithEntryPoint(
72 std::shared_ptr<const ShaderFunction>
function)
override;
74 std::unique_ptr<ComputePipelineVK> CreateComputePipeline(
77 void PersistPipelineCacheToDisk();
86 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PIPELINE_LIBRARY_VK_H_