| 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...
bool | require_framebuffer_fetch = false
| Whether the GLSL framebuffer fetch extension will be required. More...

## Detailed Description

Definition at line 20 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 29 of file source_options.h.

Referenced by impeller::compiler::Compiler::Compiler(), and impeller::compiler::Switches::CreateSourceOptions().

## ◆ entry_point_name

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

Definition at line 27 of file source_options.h.

Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::SPIRVCompiler::CompileToSPV(), impeller::compiler::CreateCompiler(), impeller::compiler::CreateReflectorOptions(), impeller::compiler::Switches::CreateSourceOptions(), and impeller::compiler::GenerateShaderBackendFB().

## ◆ file_name

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

Definition at line 26 of file source_options.h.

Referenced by impeller::compiler::SPIRVCompiler::CompileToSPV(), impeller::compiler::Switches::CreateSourceOptions(), and impeller::compiler::GenerateShaderBackendFB().

## ◆ gles_language_version

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

Definition at line 28 of file source_options.h.

Referenced by impeller::compiler::CreateGLSLCompiler(), and impeller::compiler::Switches::CreateSourceOptions().

## ◆ include_dirs

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

Definition at line 25 of file source_options.h.

Referenced by impeller::compiler::Compiler::Compiler(), and impeller::compiler::Switches::CreateSourceOptions().

## ◆ json_format

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

Definition at line 30 of file source_options.h.

Referenced by impeller::compiler::Switches::CreateSourceOptions().

## ◆ metal_version

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

Definition at line 31 of file source_options.h.

Referenced by impeller::compiler::Switches::CreateSourceOptions().

## ◆ require_framebuffer_fetch

bool impeller::compiler::SourceOptions::require_framebuffer_fetch = false

Whether the GLSL framebuffer fetch extension will be required.

Only used on OpenGLES targets.

Definition at line 40 of file source_options.h.

Referenced by impeller::compiler::CreateGLSLCompiler(), and impeller::compiler::Switches::CreateSourceOptions().

## ◆ source_language

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

Definition at line 23 of file source_options.h.

Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::Compiler::Compiler(), impeller::compiler::SPIRVCompiler::CompileToSPV(), impeller::compiler::CreateCompiler(), impeller::compiler::Switches::CreateSourceOptions(), impeller::compiler::GenerateShaderBackendFB(), and impeller::compiler::testing::TEST().

## ◆ target_platform

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

Definition at line 22 of file source_options.h.

Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::Compiler::Compiler(), impeller::compiler::CreateCompiler(), impeller::compiler::CreateGLSLCompiler(), impeller::compiler::CreateReflectorOptions(), impeller::compiler::Switches::CreateSourceOptions(), impeller::compiler::GenerateShaderBackendFB(), impeller::compiler::OutputReflectionData(), and impeller::compiler::testing::TEST().

## ◆ type

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

Definition at line 21 of file source_options.h.

Referenced by impeller::compiler::SPIRVCompiler::CompileToSPV(), impeller::compiler::CreateCompiler(), impeller::compiler::CreateGLSLCompiler(), impeller::compiler::Switches::CreateSourceOptions(), and impeller::compiler::GenerateShaderBackendFB().

## ◆ 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 35 of file source_options.h.

Referenced by impeller::compiler::Compiler::Compiler(), and impeller::compiler::Switches::CreateSourceOptions().

## ◆ working_directory

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

Definition at line 24 of file source_options.h.

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

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:21
impeller::compiler::SourceType::kUnknown
@ kUnknown
impeller::compiler::SourceOptions::file_name
std::string file_name
Definition: source_options.h:26
impeller::compiler::SourceTypeFromFileName
SourceType SourceTypeFromFileName(const std::string &file_name)
Definition: types.cc:30