| Flutter Impeller |

switches.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 <iostream>
8 #include <memory>
9
10 #include "flutter/fml/command_line.h"
11 #include "flutter/fml/macros.h"
12 #include "flutter/fml/unique_fd.h"
13 #include "impeller/compiler/compiler.h"
14 #include "impeller/compiler/include_dir.h"
15 #include "impeller/compiler/types.h"
16
17 namespace impeller {
18 namespace compiler {
19
20 struct Switches {
21 TargetPlatform target_platform = TargetPlatform::kUnknown;
22 std::shared_ptr<fml::UniqueFD> working_directory = nullptr;
23 std::vector<IncludeDir> include_directories = {};
24 std::string source_file_name = "";
25 SourceType input_type = SourceType::kUnknown;
26 std::string sl_file_name = "";
27 bool iplr = false;
28 std::string spirv_file_name = "";
29 std::string reflection_json_name = "";
30 std::string reflection_header_name = "";
31 std::string reflection_cc_name = "";
32 std::string depfile_path = "";
33 std::vector<std::string> defines = {};
34 bool json_format = false;
35 SourceLanguage source_language = SourceLanguage::kUnknown;
36 uint32_t gles_language_version = 0;
37 std::string metal_version = "";
38 std::string entry_point = "";
39 bool use_half_textures = false;
40
41 Switches();
42
43 ~Switches();
44
45 Switches(const fml::CommandLine& command_line);
46
47 bool AreValid(std::ostream& explain) const;
48
49 static void PrintHelp(std::ostream& stream);
50 };
51
52 } // namespace compiler
53 } // namespace impeller
impeller::compiler::Switches::gles_language_version
uint32_t gles_language_version
Definition: switches.h:36
impeller::compiler::Switches::defines
std::vector< std::string > defines
Definition: switches.h:33
impeller::compiler::Switches::entry_point
std::string entry_point
Definition: switches.h:38
impeller::compiler::Switches::Switches
Switches()
impeller::compiler::Switches
Definition: switches.h:20
impeller::compiler::Switches::target_platform
TargetPlatform target_platform
Definition: switches.h:21
impeller::compiler::SourceType::kUnknown
@ kUnknown
impeller::compiler::Switches::metal_version
std::string metal_version
Definition: switches.h:37
impeller::compiler::Switches::working_directory
std::shared_ptr< fml::UniqueFD > working_directory
Definition: switches.h:22
impeller::compiler::Switches::include_directories
std::vector< IncludeDir > include_directories
Definition: switches.h:23
impeller::compiler::Switches::reflection_cc_name
std::string reflection_cc_name
Definition: switches.h:31
impeller::compiler::TargetPlatform
TargetPlatform
Definition: types.h:28
impeller::compiler::Switches::AreValid
bool AreValid(std::ostream &explain) const
Definition: switches.cc:193
impeller::compiler::Switches::input_type
SourceType input_type
Definition: switches.h:25
impeller::compiler::Switches::source_file_name
std::string source_file_name
Definition: switches.h:24
impeller::compiler::Switches::spirv_file_name
std::string spirv_file_name
Definition: switches.h:28
impeller::compiler::Switches::source_language
SourceLanguage source_language
Definition: switches.h:35
compiler.h
impeller::compiler::SourceType
SourceType
Definition: types.h:19
impeller::compiler::SourceLanguage::kUnknown
@ kUnknown
impeller::compiler::Switches::depfile_path
std::string depfile_path
Definition: switches.h:32
impeller::compiler::SourceLanguage
SourceLanguage
Definition: types.h:41
impeller::compiler::Switches::sl_file_name
std::string sl_file_name
Definition: switches.h:26
impeller::compiler::TargetPlatform::kUnknown
@ kUnknown
impeller::compiler::Switches::reflection_json_name
std::string reflection_json_name
Definition: switches.h:29
impeller::compiler::Switches::use_half_textures
bool use_half_textures
Definition: switches.h:39
impeller::compiler::Switches::iplr
bool iplr
Definition: switches.h:27
impeller::compiler::Switches::json_format
bool json_format
Definition: switches.h:34
impeller::compiler::Switches::reflection_header_name
std::string reflection_header_name
Definition: switches.h:30
impeller
Definition: aiks_context.cc:10
impeller::compiler::Switches::~Switches
~Switches()
impeller::compiler::Switches::PrintHelp
static void PrintHelp(std::ostream &stream)
Definition: switches.cc:39
types.h
include_dir.h