| Flutter Impeller |

source_options.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #pragma once
6
7 #include <memory>
8 #include <string>
9 #include <vector>
10
11 #include "flutter/fml/macros.h"
12 #include "flutter/fml/unique_fd.h"
13 #include "impeller/compiler/include_dir.h"
14 #include "impeller/compiler/types.h"
15
16 namespace impeller {
17 namespace compiler {
18
19 struct SourceOptions {
20 SourceType type = SourceType::kUnknown;
21 TargetPlatform target_platform = TargetPlatform::kUnknown;
22 SourceLanguage source_language = SourceLanguage::kUnknown;
23 std::shared_ptr<fml::UniqueFD> working_directory;
24 std::vector<IncludeDir> include_dirs;
25 std::string file_name = "main.glsl";
26 std::string entry_point_name = "main";
27 uint32_t gles_language_version = 100;
28 std::vector<std::string> defines;
29 bool json_format = false;
30 std::string metal_version;
31
32 /// @brief Whether half-precision textures should be supported, requiring
33 /// opengl semantics. Only used on metal targets.
34 bool use_half_textures = false;
35
36 SourceOptions();
37
38 ~SourceOptions();
39
40 explicit SourceOptions(const std::string& file_name,
41 SourceType source_type = SourceType::kUnknown);
42 };
43
44 } // namespace compiler
45 } // namespace impeller
impeller::compiler::SourceOptions::type
SourceType type
Definition: source_options.h:20
impeller::compiler::SourceOptions::include_dirs
std::vector< IncludeDir > include_dirs
Definition: source_options.h:24
impeller::compiler::SourceType::kUnknown
@ kUnknown
impeller::compiler::SourceOptions::SourceOptions
SourceOptions()
impeller::compiler::SourceOptions::metal_version
std::string metal_version
Definition: source_options.h:30
impeller::compiler::SourceOptions
Definition: source_options.h:19
impeller::compiler::SourceOptions::use_half_textures
bool use_half_textures
Whether half-precision textures should be supported, requiring opengl semantics. Only used on metal t...
Definition: source_options.h:34
impeller::compiler::SourceOptions::~SourceOptions
~SourceOptions()
impeller::compiler::SourceOptions::json_format
bool json_format
Definition: source_options.h:29
impeller::compiler::TargetPlatform
TargetPlatform
Definition: types.h:28
impeller::compiler::SourceOptions::source_language
SourceLanguage source_language
Definition: source_options.h:22
impeller::compiler::SourceOptions::entry_point_name
std::string entry_point_name
Definition: source_options.h:26
impeller::compiler::SourceOptions::gles_language_version
uint32_t gles_language_version
Definition: source_options.h:27
impeller::compiler::SourceOptions::file_name
std::string file_name
Definition: source_options.h:25
impeller::compiler::SourceType
SourceType
Definition: types.h:19
impeller::compiler::SourceLanguage::kUnknown
@ kUnknown
impeller::compiler::SourceOptions::working_directory
std::shared_ptr< fml::UniqueFD > working_directory
Definition: source_options.h:23
impeller::compiler::SourceOptions::target_platform
TargetPlatform target_platform
Definition: source_options.h:21
impeller::compiler::SourceLanguage
SourceLanguage
Definition: types.h:41
impeller::compiler::SourceOptions::defines
std::vector< std::string > defines
Definition: source_options.h:28
impeller::compiler::TargetPlatform::kUnknown
@ kUnknown
impeller
Definition: aiks_context.cc:10
types.h
include_dir.h