Flutter Impeller
runtime_types.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_CORE_RUNTIME_TYPES_H_
6 #define FLUTTER_IMPELLER_CORE_RUNTIME_TYPES_H_
7 
8 #include <cstddef>
9 #include <cstdint>
10 #include <optional>
11 #include <string>
12 #include <vector>
13 
14 namespace impeller {
15 
16 enum class RuntimeStageBackend {
17  kSkSL,
18  kMetal,
19  kOpenGLES,
20  kOpenGLES3,
21  kVulkan,
22 };
23 
28 };
29 
30 enum class RuntimeShaderStage {
31  kVertex,
32  kFragment,
33  kCompute,
34 };
35 
37  size_t rows = 0;
38  size_t cols = 0;
39 };
40 
42  std::string name;
43  size_t location = 0u;
44  /// Location, but for Vulkan.
45  size_t binding = 0u;
48  size_t bit_width = 0u;
49  std::optional<size_t> array_elements;
50  std::vector<uint8_t> struct_layout = {};
51  size_t struct_float_count = 0u;
52 
53  /// @brief Computes the total number of bytes that this uniform requires.
54  size_t GetSize() const;
55 };
56 
57 } // namespace impeller
58 
59 #endif // FLUTTER_IMPELLER_CORE_RUNTIME_TYPES_H_
RuntimeUniformDimensions dimensions
Definition: runtime_types.h:47
size_t GetSize() const
Computes the total number of bytes that this uniform requires.
Definition: runtime_types.cc:9
std::vector< uint8_t > struct_layout
Definition: runtime_types.h:50
std::optional< size_t > array_elements
Definition: runtime_types.h:49
size_t binding
Location, but for Vulkan.
Definition: runtime_types.h:45