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 <optional>
10
#include <string>
11
12
namespace
impeller
{
13
14
enum class
RuntimeStageBackend
{
15
kSkSL
,
16
kMetal
,
17
kOpenGLES
,
18
kVulkan
,
19
};
20
21
enum
RuntimeUniformType
{
22
kBoolean
,
23
kSignedByte
,
24
kUnsignedByte
,
25
kSignedShort
,
26
kUnsignedShort
,
27
kSignedInt
,
28
kUnsignedInt
,
29
kSignedInt64
,
30
kUnsignedInt64
,
31
kHalfFloat
,
32
kFloat
,
33
kDouble
,
34
kSampledImage
,
35
};
36
37
enum class
RuntimeShaderStage
{
38
kVertex
,
39
kFragment
,
40
kCompute
,
41
};
42
43
struct
RuntimeUniformDimensions
{
44
size_t
rows
= 0;
45
size_t
cols
= 0;
46
};
47
48
struct
RuntimeUniformDescription
{
49
std::string
name
;
50
size_t
location
= 0u;
51
RuntimeUniformType
type
=
RuntimeUniformType::kFloat
;
52
RuntimeUniformDimensions
dimensions
;
53
size_t
bit_width
;
54
std::optional<size_t>
array_elements
;
55
56
/// @brief Computes the total number of bytes that this uniform requires.
57
size_t
GetSize
()
const
;
58
};
59
60
}
// namespace impeller
61
62
#endif // FLUTTER_IMPELLER_CORE_RUNTIME_TYPES_H_
impeller::RuntimeUniformDescription::GetSize
size_t GetSize() const
Computes the total number of bytes that this uniform requires.
Definition:
runtime_types.cc:9
impeller::RuntimeUniformDescription
Definition:
runtime_types.h:48
impeller::kBoolean
@ kBoolean
Definition:
runtime_types.h:22
impeller::kFloat
@ kFloat
Definition:
runtime_types.h:32
impeller::RuntimeShaderStage
RuntimeShaderStage
Definition:
runtime_types.h:37
impeller::kUnsignedShort
@ kUnsignedShort
Definition:
runtime_types.h:26
impeller::RuntimeStageBackend::kVulkan
@ kVulkan
impeller::RuntimeUniformDimensions::cols
size_t cols
Definition:
runtime_types.h:45
impeller::RuntimeUniformDescription::dimensions
RuntimeUniformDimensions dimensions
Definition:
runtime_types.h:52
impeller::kSignedByte
@ kSignedByte
Definition:
runtime_types.h:23
impeller::RuntimeUniformDimensions::rows
size_t rows
Definition:
runtime_types.h:44
impeller::kSampledImage
@ kSampledImage
Definition:
runtime_types.h:34
impeller::RuntimeStageBackend::kOpenGLES
@ kOpenGLES
impeller::RuntimeUniformDimensions
Definition:
runtime_types.h:43
impeller::RuntimeShaderStage::kVertex
@ kVertex
impeller::kSignedInt
@ kSignedInt
Definition:
runtime_types.h:27
impeller::RuntimeShaderStage::kFragment
@ kFragment
impeller::RuntimeStageBackend
RuntimeStageBackend
Definition:
runtime_types.h:14
impeller::RuntimeUniformType
RuntimeUniformType
Definition:
runtime_types.h:21
impeller::RuntimeUniformDescription::name
std::string name
Definition:
runtime_types.h:49
impeller::kUnsignedByte
@ kUnsignedByte
Definition:
runtime_types.h:24
impeller::kUnsignedInt64
@ kUnsignedInt64
Definition:
runtime_types.h:30
impeller::kHalfFloat
@ kHalfFloat
Definition:
runtime_types.h:31
impeller::kUnsignedInt
@ kUnsignedInt
Definition:
runtime_types.h:28
impeller::RuntimeUniformDescription::type
RuntimeUniformType type
Definition:
runtime_types.h:51
impeller::kSignedShort
@ kSignedShort
Definition:
runtime_types.h:25
impeller::RuntimeUniformDescription::location
size_t location
Definition:
runtime_types.h:50
impeller::RuntimeUniformDescription::bit_width
size_t bit_width
Definition:
runtime_types.h:53
impeller::RuntimeStageBackend::kSkSL
@ kSkSL
impeller::kDouble
@ kDouble
Definition:
runtime_types.h:33
impeller::kSignedInt64
@ kSignedInt64
Definition:
runtime_types.h:29
impeller::RuntimeShaderStage::kCompute
@ kCompute
impeller::RuntimeUniformDescription::array_elements
std::optional< size_t > array_elements
Definition:
runtime_types.h:54
impeller::RuntimeStageBackend::kMetal
@ kMetal
impeller
Definition:
aiks_context.cc:10
impeller
core
runtime_types.h
Generated by
1.8.17