5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SHADER_LIBRARY_MTL_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SHADER_LIBRARY_MTL_H_
8#include <Foundation/Foundation.h>
9#include <Metal/Metal.h>
13#include <unordered_map>
36 mutable RWMutex libraries_mutex_;
37 NSMutableArray<id<MTLLibrary>>* libraries_
IPLR_GUARDED_BY(libraries_mutex_) =
40 bool is_valid_ =
false;
45 std::shared_ptr<const ShaderFunction>
GetFunction(std::string_view
name,
49 void RegisterFunction(std::string
name,
51 std::shared_ptr<fml::Mapping>
code,
57 id<MTLDevice> GetDevice()
const;
59 void RegisterLibrary(id<MTLLibrary> library);
~ShaderLibraryMTL() override
bool IsValid() const override
std::function< void(bool)> RegistrationCallback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
FunctionPtr GetFunction(const Library &lib, const char *name)
DEF_SWITCHES_START aot vmservice shared library name
std::unordered_map< ShaderKey, std::shared_ptr< const ShaderFunction >, ShaderKey::Hash, ShaderKey::Equal > ShaderFunctionMap
#define IPLR_GUARDED_BY(x)