5 #ifndef FLUTTER_IMPELLER_SHADER_ARCHIVE_SHADER_ARCHIVE_H_
6 #define FLUTTER_IMPELLER_SHADER_ARCHIVE_SHADER_ARCHIVE_H_
10 #include <unordered_map>
12 #include "flutter/fml/hash_combine.h"
13 #include "flutter/fml/macros.h"
14 #include "flutter/fml/mapping.h"
19 class MultiArchShaderArchive;
32 std::string name)
const;
36 const std::string& name,
37 const std::shared_ptr<fml::Mapping>& mapping)>&)
49 return fml::HashCombine(
50 static_cast<std::underlying_type_t<decltype(key.type)
>>(key.type),
56 bool operator()(
const ShaderKey& lhs,
const ShaderKey& rhs)
const {
57 return lhs.type == rhs.type && lhs.name == rhs.name;
62 using Shaders = std::unordered_map<
ShaderKey,
63 std::shared_ptr<fml::Mapping>,
67 std::shared_ptr<const fml::Mapping> payload_;
69 bool is_valid_ =
false;
71 explicit ShaderArchive(std::shared_ptr<const fml::Mapping> payload);
80 #endif // FLUTTER_IMPELLER_SHADER_ARCHIVE_SHADER_ARCHIVE_H_