| Flutter Impeller |

Public Member Functions | Public Attributes | List of all members
impeller::compiler::SourceOptions Struct Reference

`#include <source_options.h>`

## Public Member Functions
| SourceOptions ()
| ~SourceOptions ()
| SourceOptions (const std::string &file_name, SourceType source_type=SourceType::kUnknown)

## Public Attributes
SourceType | type = SourceType::kUnknown
TargetPlatform | target_platform = TargetPlatform::kUnknown
SourceLanguage | source_language = SourceLanguage::kUnknown
std::shared_ptr< fml::UniqueFD > | working_directory
std::vector< IncludeDir > | include_dirs
std::string | file_name = "main.glsl"
std::string | entry_point_name = "main"
uint32_t | gles_language_version = 100
std::vector< std::string > | defines
bool | json_format = false
std::string | metal_version
bool | use_half_textures = false
| Whether half-precision textures should be supported, requiring opengl semantics. Only used on metal targets. More...

## Detailed Description

Definition at line 19 of file source_options.h.

## Constructor & Destructor Documentation

## ◆ SourceOptions() [1/2]

impeller::compiler::SourceOptions::SourceOptions | ( |  | ) |
| default

## ◆ ~SourceOptions()

impeller::compiler::SourceOptions::~SourceOptions | ( |  | ) |
| default

## ◆ SourceOptions() [2/2]

impeller::compiler::SourceOptions::SourceOptions | ( | const std::string & | file_name,
|  | SourceType | source_type = `SourceType::kUnknown`
| ) |  |
| explicit

Definition at line 12 of file source_options.cc.

14 : type(source_type == SourceType::kUnknown
15 ? SourceTypeFromFileName(file_name)
16 : source_type),
17 file_name(file_name) {}

References impeller::compiler::kUnknown.

## Member Data Documentation

## ◆ defines

std::vector<std::string> impeller::compiler::SourceOptions::defines

Definition at line 28 of file source_options.h.

Referenced by impeller::compiler::Compiler::Compiler(), and impeller::compiler::Main().

## ◆ entry_point_name

std::string impeller::compiler::SourceOptions::entry_point_name = "main"

Definition at line 26 of file source_options.h.

Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::SPIRVCompiler::CompileToSPV(), impeller::compiler::CreateCompiler(), and impeller::compiler::Main().

## ◆ file_name

std::string impeller::compiler::SourceOptions::file_name = "main.glsl"

Definition at line 25 of file source_options.h.

Referenced by impeller::compiler::SPIRVCompiler::CompileToSPV(), and impeller::compiler::Main().

## ◆ gles_language_version

uint32_t impeller::compiler::SourceOptions::gles_language_version = 100

Definition at line 27 of file source_options.h.

Referenced by impeller::compiler::CreateGLSLCompiler(), and impeller::compiler::Main().

## ◆ include_dirs

std::vector<IncludeDir> impeller::compiler::SourceOptions::include_dirs

Definition at line 24 of file source_options.h.

Referenced by impeller::compiler::Compiler::Compiler(), and impeller::compiler::Main().

## ◆ json_format

bool impeller::compiler::SourceOptions::json_format = false

Definition at line 29 of file source_options.h.

Referenced by impeller::compiler::Main().

## ◆ metal_version

std::string impeller::compiler::SourceOptions::metal_version

Definition at line 30 of file source_options.h.

Referenced by impeller::compiler::Main().

## ◆ source_language

SourceLanguage impeller::compiler::SourceOptions::source_language = SourceLanguage::kUnknown

Definition at line 22 of file source_options.h.

Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::Compiler::Compiler(), impeller::compiler::SPIRVCompiler::CompileToSPV(), impeller::compiler::CreateCompiler(), and impeller::compiler::Main().

## ◆ target_platform

TargetPlatform impeller::compiler::SourceOptions::target_platform = TargetPlatform::kUnknown

Definition at line 21 of file source_options.h.

Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::Compiler::Compiler(), impeller::compiler::CreateCompiler(), impeller::compiler::CreateGLSLCompiler(), and impeller::compiler::Main().

## ◆ type

SourceType impeller::compiler::SourceOptions::type = SourceType::kUnknown

Definition at line 20 of file source_options.h.

Referenced by impeller::compiler::SPIRVCompiler::CompileToSPV(), impeller::compiler::CreateCompiler(), and impeller::compiler::Main().

## ◆ use_half_textures

bool impeller::compiler::SourceOptions::use_half_textures = false

Whether half-precision textures should be supported, requiring opengl semantics. Only used on metal targets.

Definition at line 34 of file source_options.h.

Referenced by impeller::compiler::Compiler::Compiler(), and impeller::compiler::Main().

## ◆ working_directory

std::shared_ptr<fml::UniqueFD> impeller::compiler::SourceOptions::working_directory

Definition at line 23 of file source_options.h.

Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::Compiler::Compiler(), and impeller::compiler::Main().

The documentation for this struct was generated from the following files:

- impeller/compiler/source_options.h
- impeller/compiler/source_options.cc

impeller::compiler::SourceOptions::type
SourceType type
Definition: source_options.h:20
impeller::compiler::SourceType::kUnknown
@ kUnknown
impeller::compiler::SourceOptions::file_name
std::string file_name
Definition: source_options.h:25
impeller::compiler::SourceTypeFromFileName
SourceType SourceTypeFromFileName(const std::string &file_name)
Definition: types.cc:29