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"
16 
17 namespace impeller {
18 namespace compiler {
19 
20 struct SourceOptions {
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.
41 
43 
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_
bool use_half_textures
Whether half-precision textures should be supported, requiring opengl semantics. Only used on metal t...
std::vector< IncludeDir > include_dirs
bool require_framebuffer_fetch
Whether the GLSL framebuffer fetch extension will be required.
std::shared_ptr< fml::UniqueFD > working_directory
std::vector< std::string > defines