| 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 #ifndef FLUTTER_IMPELLER_COMPILER_SOURCE_OPTIONS_H_
6 #define FLUTTER_IMPELLER_COMPILER_SOURCE_OPTIONS_H_
7
8 #include <cstdint>
9 #include <memory>
10 #include <string>
11 #include <vector>
12
13 #include "flutter/fml/unique_fd.h"
14 #include "impeller/compiler/include_dir.h"
15 #include "impeller/compiler/types.h"
16
17 namespace impeller {
18 namespace compiler {
19
20 struct SourceOptions {
21 SourceType type = SourceType::kUnknown;
22 TargetPlatform target_platform = TargetPlatform::kUnknown;
23 SourceLanguage source_language = SourceLanguage::kUnknown;
24 std::shared_ptr<fml::UniqueFD> working_directory;
25 std::vector<IncludeDir> include_dirs;
26 std::string file_name = "main.glsl";
27 std::string entry_point_name = "main";
28 uint32_t gles_language_version = 100;
29 std::vector<std::string> defines;
30 bool json_format = false;
31 std::string metal_version;
32
33 /// @brief Whether half-precision textures should be supported, requiring
34 /// opengl semantics. Only used on metal targets.
35 bool use_half_textures = false;
36
37 /// @brief Whether the GLSL framebuffer fetch extension will be required.
38 ///
39 /// Only used on OpenGLES targets.
40 bool require_framebuffer_fetch = false;
41
42 SourceOptions();
43
44 ~SourceOptions();
45
46 explicit SourceOptions(const std::string& file_name,
47 SourceType source_type = SourceType::kUnknown);
48 };
49
50 } // namespace compiler
51 } // namespace impeller
52
53 #endif // FLUTTER_IMPELLER_COMPILER_SOURCE_OPTIONS_H_
impeller::compiler::SourceOptions::type
SourceType type
Definition: source_options.h:21
impeller::compiler::SourceOptions::include_dirs
std::vector< IncludeDir > include_dirs
Definition: source_options.h:25
impeller::compiler::SourceType::kUnknown
@ kUnknown
impeller::compiler::SourceOptions::SourceOptions
SourceOptions()
impeller::compiler::SourceOptions::metal_version
std::string metal_version
Definition: source_options.h:31
impeller::compiler::SourceOptions
Definition: source_options.h:20
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:35
impeller::compiler::SourceOptions::~SourceOptions
~SourceOptions()
impeller::compiler::SourceOptions::json_format
bool json_format
Definition: source_options.h:30
impeller::compiler::TargetPlatform
TargetPlatform
Definition: types.h:29
impeller::compiler::SourceOptions::source_language
SourceLanguage source_language
Definition: source_options.h:23
impeller::compiler::SourceOptions::entry_point_name
std::string entry_point_name
Definition: source_options.h:27
impeller::compiler::SourceOptions::require_framebuffer_fetch
bool require_framebuffer_fetch
Whether the GLSL framebuffer fetch extension will be required.
Definition: source_options.h:40
impeller::compiler::SourceOptions::gles_language_version
uint32_t gles_language_version
Definition: source_options.h:28
impeller::compiler::SourceOptions::file_name
std::string file_name
Definition: source_options.h:26
impeller::compiler::SourceType
SourceType
Definition: types.h:22
impeller::compiler::SourceLanguage::kUnknown
@ kUnknown
impeller::compiler::SourceOptions::working_directory
std::shared_ptr< fml::UniqueFD > working_directory
Definition: source_options.h:24
impeller::compiler::SourceOptions::target_platform
TargetPlatform target_platform
Definition: source_options.h:22
impeller::compiler::SourceLanguage
SourceLanguage
Definition: types.h:42
impeller::compiler::SourceOptions::defines
std::vector< std::string > defines
Definition: source_options.h:29
impeller::compiler::TargetPlatform::kUnknown
@ kUnknown
impeller
Definition: aiks_blur_unittests.cc:20
types.h
include_dir.h