5 #ifndef FLUTTER_IMPELLER_COMPILER_COMPILER_H_
6 #define FLUTTER_IMPELLER_COMPILER_COMPILER_H_
8 #include <initializer_list>
12 #include "flutter/fml/mapping.h"
18 #include "spirv_msl.hpp"
19 #include "spirv_parser.hpp"
20 #include "third_party/abseil-cpp/absl/status/status.h"
27 Compiler(
const std::shared_ptr<const fml::Mapping>& source_mapping,
51 std::initializer_list<std::string> targets)
const;
57 std::shared_ptr<fml::Mapping> spirv_assembly_;
58 std::shared_ptr<fml::Mapping> sl_mapping_;
59 std::stringstream error_stream_;
60 std::stringstream verbose_error_stream_;
61 std::unique_ptr<Reflector> reflector_;
62 std::vector<std::string> included_file_names_;
63 bool is_valid_ =
false;
65 std::string GetSourcePrefix()
const;
67 std::string GetDependencyNames(
const std::string& separator)
const;
69 absl::Status ValidateSkSLResult(
const std::string& sksl);
std::string GetVerboseErrorMessages() const
std::shared_ptr< fml::Mapping > GetSPIRVAssembly() const
const Reflector * GetReflector() const
Compiler(const std::shared_ptr< const fml::Mapping > &source_mapping, const SourceOptions &options, Reflector::Options reflector_options)
const std::vector< std::string > & GetIncludedFileNames() const
std::unique_ptr< fml::Mapping > CreateDepfileContents(std::initializer_list< std::string > targets) const
std::shared_ptr< fml::Mapping > GetSLShaderSource() const
std::string GetErrorMessages() const