5 #ifndef FLUTTER_IMPELLER_COMPILER_INCLUDER_H_
6 #define FLUTTER_IMPELLER_COMPILER_INCLUDER_H_
10 #include "flutter/fml/mapping.h"
12 #include "shaderc/shaderc.hpp"
21 IncluderData(std::string p_file_name, std::unique_ptr<fml::Mapping> p_mapping)
25 class Includer final :
public shaderc::CompileOptions::IncluderInterface {
27 Includer(std::shared_ptr<fml::UniqueFD> working_directory,
28 std::vector<IncludeDir> include_dirs,
29 std::function<
void(std::string)> on_file_included);
35 shaderc_include_result*
GetInclude(
const char* requested_source,
36 shaderc_include_type type,
37 const char* requesting_source,
38 size_t include_depth)
override;
44 std::shared_ptr<fml::UniqueFD> working_directory_;
45 std::vector<IncludeDir> include_dirs_;
46 std::function<void(std::string)> on_file_included_;
48 std::unique_ptr<fml::FileMapping> TryOpenMapping(
50 const char* requested_source);
52 std::unique_ptr<fml::FileMapping> FindFirstMapping(
53 const char* requested_source);
63 #endif // FLUTTER_IMPELLER_COMPILER_INCLUDER_H_