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> {
38 std::weak_ptr<DeviceHolder> device_holder_;
39 bool supports_framebuffer_fetch_ =
false;
40 std::shared_ptr<PipelineCacheVK> pso_cache_;
41 std::shared_ptr<fml::ConcurrentTaskRunner> worker_task_runner_;
42 Mutex pipelines_mutex_;
43 PipelineMap pipelines_ IPLR_GUARDED_BY(pipelines_mutex_);
44 Mutex compute_pipelines_mutex_;
47 std::atomic_size_t frames_acquired_ = 0u;
48 bool is_valid_ =
false;
51 const std::shared_ptr<DeviceHolder>& device_holder,
52 std::shared_ptr<const Capabilities> caps,
53 fml::UniqueFD cache_directory,
54 std::shared_ptr<fml::ConcurrentTaskRunner> worker_task_runner);
57 bool IsValid()
const override;
68 void RemovePipelinesWithEntryPoint(
69 std::shared_ptr<const ShaderFunction>
function)
override;
73 std::unique_ptr<ComputePipelineVK> CreateComputePipeline(
76 void PersistPipelineCacheToDisk();
85 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PIPELINE_LIBRARY_VK_H_