Flutter Engine
The Flutter Engine
Classes | Enumerations | Functions
flutter::gpu Namespace Reference

Classes

class  CommandBuffer
 
class  Context
 
class  DeviceBuffer
 
class  HostBuffer
 
class  RenderPass
 
class  RenderPipeline
 
class  Shader
 An immutable collection of shaders loaded from a shader bundle asset. More...
 
class  ShaderLibrary
 An immutable collection of shaders loaded from a shader bundle asset. More...
 
class  Texture
 

Enumerations

enum class  FlutterGPUStorageMode { kHostVisible , kDevicePrivate , kDeviceTransient }
 
enum class  FlutterGPUPixelFormat {
  kUnknown , kA8UNormInt , kR8UNormInt , kR8G8UNormInt ,
  kR8G8B8A8UNormInt , kR8G8B8A8UNormIntSRGB , kB8G8R8A8UNormInt , kB8G8R8A8UNormIntSRGB ,
  kR32G32B32A32Float , kR16G16B16A16Float , kB10G10R10XR , kB10G10R10XRSRGB ,
  kB10G10R10A10XR , kS8UInt , kD24UnormS8Uint , kD32FloatS8UInt
}
 
enum class  FlutterGPUTextureCoordinateSystem { kUploadFromHost , kRenderToTexture }
 
enum class  FlutterGPUBlendFactor {
  kZero , kOne , kSourceColor , kOneMinusSourceColor ,
  kSourceAlpha , kOneMinusSourceAlpha , kDestinationColor , kOneMinusDestinationColor ,
  kDestinationAlpha , kOneMinusDestinationAlpha , kSourceAlphaSaturated , kBlendColor ,
  kOneMinusBlendColor , kBlendAlpha , kOneMinusBlendAlpha
}
 
enum class  FlutterGPUBlendOperation { kAdd , kSubtract , kReverseSubtract }
 
enum class  FlutterGPULoadAction { kDontCare , kLoad , kClear }
 
enum class  FlutterGPUStoreAction { kDontCare , kStore , kMultisampleResolve , kStoreAndMultisampleResolve }
 
enum class  FlutterGPUShaderStage { kVertex , kFragment }
 
enum class  FlutterGPUMinMagFilter { kNearest , kLinear }
 
enum class  FlutterGPUMipFilter { kNearest , kLinear }
 
enum class  FlutterGPUSamplerAddressMode { kClampToEdge , kRepeat , kMirror }
 
enum class  FlutterGPUIndexType { k16bit , k32bit }
 
enum class  FlutterGPUPrimitiveType {
  kTriangle , kTriangleStrip , kLine , kLineStrip ,
  kPoint
}
 
enum class  FlutterGPUCompareFunction {
  kNever , kAlways , kLess , kEqual ,
  kLessEqual , kGreater , kNotEqual , kGreaterEqual
}
 
enum class  FlutterGPUStencilOperation {
  kKeep , kZero , kSetToReferenceValue , kIncrementClamp ,
  kDecrementClamp , kInvert , kIncrementWrap , kDecrementWrap
}
 

Functions

 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, CommandBuffer)
 
 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, Context)
 
 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, DeviceBuffer)
 
constexpr impeller::StorageMode ToImpellerStorageMode (FlutterGPUStorageMode value)
 
constexpr impeller::StorageMode ToImpellerStorageMode (int value)
 
constexpr impeller::PixelFormat ToImpellerPixelFormat (FlutterGPUPixelFormat value)
 
constexpr impeller::PixelFormat ToImpellerPixelFormat (int value)
 
constexpr FlutterGPUPixelFormat FromImpellerPixelFormat (impeller::PixelFormat value)
 
constexpr impeller::TextureCoordinateSystem ToImpellerTextureCoordinateSystem (FlutterGPUTextureCoordinateSystem value)
 
constexpr impeller::TextureCoordinateSystem ToImpellerTextureCoordinateSystem (int value)
 
constexpr impeller::BlendFactor ToImpellerBlendFactor (FlutterGPUBlendFactor value)
 
constexpr impeller::BlendFactor ToImpellerBlendFactor (int value)
 
constexpr impeller::BlendOperation ToImpellerBlendOperation (FlutterGPUBlendOperation value)
 
constexpr impeller::BlendOperation ToImpellerBlendOperation (int value)
 
constexpr impeller::LoadAction ToImpellerLoadAction (FlutterGPULoadAction value)
 
constexpr impeller::LoadAction ToImpellerLoadAction (int value)
 
constexpr impeller::StoreAction ToImpellerStoreAction (FlutterGPUStoreAction value)
 
constexpr impeller::StoreAction ToImpellerStoreAction (int value)
 
constexpr impeller::ShaderStage ToImpellerShaderStage (FlutterGPUShaderStage value)
 
constexpr impeller::ShaderStage ToImpellerShaderStage (int value)
 
constexpr FlutterGPUShaderStage FromImpellerShaderStage (impeller::ShaderStage value)
 
constexpr impeller::MinMagFilter ToImpellerMinMagFilter (FlutterGPUMinMagFilter value)
 
constexpr impeller::MinMagFilter ToImpellerMinMagFilter (int value)
 
constexpr impeller::MipFilter ToImpellerMipFilter (FlutterGPUMipFilter value)
 
constexpr impeller::MipFilter ToImpellerMipFilter (int value)
 
constexpr impeller::SamplerAddressMode ToImpellerSamplerAddressMode (FlutterGPUSamplerAddressMode value)
 
constexpr impeller::SamplerAddressMode ToImpellerSamplerAddressMode (int value)
 
constexpr impeller::IndexType ToImpellerIndexType (FlutterGPUIndexType value)
 
constexpr impeller::IndexType ToImpellerIndexType (int value)
 
constexpr impeller::PrimitiveType ToImpellerPrimitiveType (FlutterGPUPrimitiveType value)
 
constexpr impeller::PrimitiveType ToImpellerPrimitiveType (int value)
 
constexpr impeller::CompareFunction ToImpellerCompareFunction (FlutterGPUCompareFunction value)
 
constexpr impeller::CompareFunction ToImpellerCompareFunction (int value)
 
constexpr impeller::StencilOperation ToImpellerStencilOperation (FlutterGPUStencilOperation value)
 
constexpr impeller::StencilOperation ToImpellerStencilOperation (int value)
 
 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, HostBuffer)
 
 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, RenderPass)
 
 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, RenderPipeline)
 
 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, Shader)
 
 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, ShaderLibrary)
 
static impeller::ShaderStage ToShaderStage (impeller::fb::shaderbundle::ShaderStage stage)
 
static impeller::ShaderType FromInputType (impeller::fb::shaderbundle::InputDataType input_type)
 
static impeller::ShaderType FromUniformType (impeller::fb::shaderbundle::UniformDataType uniform_type)
 
static size_t SizeOfInputType (impeller::fb::shaderbundle::InputDataType input_type)
 
static const impeller::fb::shaderbundle::BackendShader * GetShaderBackend (impeller::Context::BackendType backend_type, const impeller::fb::shaderbundle::Shader *shader)
 
 IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, Texture)
 

Enumeration Type Documentation

◆ FlutterGPUBlendFactor

Enumerator
kZero 
kOne 
kSourceColor 
kOneMinusSourceColor 
kSourceAlpha 
kOneMinusSourceAlpha 
kDestinationColor 
kOneMinusDestinationColor 
kDestinationAlpha 
kOneMinusDestinationAlpha 
kSourceAlphaSaturated 
kBlendColor 
kOneMinusBlendColor 
kBlendAlpha 
kOneMinusBlendAlpha 

Definition at line 161 of file formats.h.

161 {
162 kZero,
163 kOne,
164 kSourceColor,
165 kOneMinusSourceColor,
166 kSourceAlpha,
167 kOneMinusSourceAlpha,
168 kDestinationColor,
169 kOneMinusDestinationColor,
170 kDestinationAlpha,
171 kOneMinusDestinationAlpha,
172 kSourceAlphaSaturated,
173 kBlendColor,
174 kOneMinusBlendColor,
175 kBlendAlpha,
176 kOneMinusBlendAlpha,
177};

◆ FlutterGPUBlendOperation

Enumerator
kAdd 
kSubtract 
kReverseSubtract 

Definition at line 219 of file formats.h.

219 {
220 kAdd,
221 kSubtract,
222 kReverseSubtract,
223};
@ kAdd
Definition: embedder.h:990

◆ FlutterGPUCompareFunction

Enumerator
kNever 
kAlways 
kLess 
kEqual 
kLessEqual 
kGreater 
kNotEqual 
kGreaterEqual 

Definition at line 428 of file formats.h.

428 {
429 kNever,
430 kAlways,
431 kLess,
432 kEqual,
433 kLessEqual,
434 kGreater,
435 kNotEqual,
436 kGreaterEqual,
437};
constexpr auto kNever
Definition: SkSLTest.cpp:963

◆ FlutterGPUIndexType

Enumerator
k16bit 
k32bit 

Definition at line 382 of file formats.h.

382 {
383 k16bit,
384 k32bit,
385};

◆ FlutterGPULoadAction

Enumerator
kDontCare 
kLoad 
kClear 

Definition at line 241 of file formats.h.

241 {
242 kDontCare,
243 kLoad,
244 kClear,
245};

◆ FlutterGPUMinMagFilter

Enumerator
kNearest 
kLinear 

Definition at line 322 of file formats.h.

322 {
323 kNearest,
324 kLinear,
325};
static constexpr skcms_TransferFunction kLinear
Definition: SkColorSpace.h:51

◆ FlutterGPUMipFilter

Enumerator
kNearest 
kLinear 

Definition at line 341 of file formats.h.

341 {
342 kNearest,
343 kLinear,
344};

◆ FlutterGPUPixelFormat

Enumerator
kUnknown 
kA8UNormInt 
kR8UNormInt 
kR8G8UNormInt 
kR8G8B8A8UNormInt 
kR8G8B8A8UNormIntSRGB 
kB8G8R8A8UNormInt 
kB8G8R8A8UNormIntSRGB 
kR32G32B32A32Float 
kR16G16B16A16Float 
kB10G10R10XR 
kB10G10R10XRSRGB 
kB10G10R10A10XR 
kS8UInt 
kD24UnormS8Uint 
kD32FloatS8UInt 

Definition at line 41 of file formats.h.

41 {
43 kA8UNormInt,
44 kR8UNormInt,
45 kR8G8UNormInt,
46 kR8G8B8A8UNormInt,
47 kR8G8B8A8UNormIntSRGB,
48 kB8G8R8A8UNormInt,
49 kB8G8R8A8UNormIntSRGB,
50 kR32G32B32A32Float,
51 kR16G16B16A16Float,
52 kB10G10R10XR,
53 kB10G10R10XRSRGB,
54 kB10G10R10A10XR,
55 kS8UInt,
56 kD24UnormS8Uint,
57 kD32FloatS8UInt,
58};

◆ FlutterGPUPrimitiveType

Enumerator
kTriangle 
kTriangleStrip 
kLine 
kLineStrip 
kPoint 

Definition at line 400 of file formats.h.

400 {
401 kTriangle,
403 kLine,
404 kLineStrip,
405 kPoint,
406};

◆ FlutterGPUSamplerAddressMode

Enumerator
kClampToEdge 
kRepeat 
kMirror 

Definition at line 359 of file formats.h.

359 {
360 kClampToEdge,
361 kRepeat,
362 kMirror,
363};

◆ FlutterGPUShaderStage

Enumerator
kVertex 
kFragment 

Definition at line 288 of file formats.h.

288 {
289 kVertex,
290 kFragment,
291};

◆ FlutterGPUStencilOperation

Enumerator
kKeep 
kZero 
kSetToReferenceValue 
kIncrementClamp 
kDecrementClamp 
kInvert 
kIncrementWrap 
kDecrementWrap 

Definition at line 466 of file formats.h.

466 {
467 kKeep,
468 kZero,
469 kSetToReferenceValue,
470 kIncrementClamp,
471 kDecrementClamp,
472 kInvert,
473 kIncrementWrap,
474 kDecrementWrap,
475};

◆ FlutterGPUStorageMode

Enumerator
kHostVisible 
kDevicePrivate 
kDeviceTransient 

Definition at line 19 of file formats.h.

19 {
20 kHostVisible,
21 kDevicePrivate,
22 kDeviceTransient,
23};

◆ FlutterGPUStoreAction

Enumerator
kDontCare 
kStore 
kMultisampleResolve 
kStoreAndMultisampleResolve 

Definition at line 263 of file formats.h.

263 {
264 kDontCare,
265 kStore,
266 kMultisampleResolve,
267 kStoreAndMultisampleResolve,
268};

◆ FlutterGPUTextureCoordinateSystem

Enumerator
kUploadFromHost 
kRenderToTexture 

Definition at line 140 of file formats.h.

140 {
141 kUploadFromHost,
142 kRenderToTexture,
143};

Function Documentation

◆ FromImpellerPixelFormat()

constexpr FlutterGPUPixelFormat flutter::gpu::FromImpellerPixelFormat ( impeller::PixelFormat  value)
constexpr

Definition at line 102 of file formats.h.

103 {
104 switch (value) {
108 return FlutterGPUPixelFormat::kA8UNormInt;
110 return FlutterGPUPixelFormat::kR8UNormInt;
112 return FlutterGPUPixelFormat::kR8G8UNormInt;
114 return FlutterGPUPixelFormat::kR8G8B8A8UNormInt;
116 return FlutterGPUPixelFormat::kR8G8B8A8UNormIntSRGB;
118 return FlutterGPUPixelFormat::kB8G8R8A8UNormInt;
120 return FlutterGPUPixelFormat::kB8G8R8A8UNormIntSRGB;
122 return FlutterGPUPixelFormat::kR32G32B32A32Float;
124 return FlutterGPUPixelFormat::kR16G16B16A16Float;
126 return FlutterGPUPixelFormat::kB10G10R10XR;
128 return FlutterGPUPixelFormat::kB10G10R10XRSRGB;
130 return FlutterGPUPixelFormat::kB10G10R10A10XR;
132 return FlutterGPUPixelFormat::kS8UInt;
134 return FlutterGPUPixelFormat::kD24UnormS8Uint;
136 return FlutterGPUPixelFormat::kD32FloatS8UInt;
137 }
138}
uint8_t value

◆ FromImpellerShaderStage()

constexpr FlutterGPUShaderStage flutter::gpu::FromImpellerShaderStage ( impeller::ShaderStage  value)
constexpr

Definition at line 307 of file formats.h.

308 {
309 switch (value) {
311 return FlutterGPUShaderStage::kVertex;
313 return FlutterGPUShaderStage::kFragment;
316 FML_LOG(FATAL) << "Invalid Flutter GPU ShaderStage "
317 << static_cast<size_t>(value);
319 }
320}
#define FATAL(error)
#define FML_LOG(severity)
Definition: logging.h:82
#define FML_UNREACHABLE()
Definition: logging.h:109

◆ FromInputType()

static impeller::ShaderType flutter::gpu::FromInputType ( impeller::fb::shaderbundle::InputDataType  input_type)
static

Definition at line 69 of file shader_library.cc.

70 {
71 switch (input_type) {
72 case impeller::fb::shaderbundle::InputDataType::kBoolean:
74 case impeller::fb::shaderbundle::InputDataType::kSignedByte:
78 case impeller::fb::shaderbundle::InputDataType::kSignedShort:
80 case impeller::fb::shaderbundle::InputDataType::kUnsignedShort:
82 case impeller::fb::shaderbundle::InputDataType::kSignedInt:
84 case impeller::fb::shaderbundle::InputDataType::kUnsignedInt:
86 case impeller::fb::shaderbundle::InputDataType::kSignedInt64:
88 case impeller::fb::shaderbundle::InputDataType::kUnsignedInt64:
94 }
95}

◆ FromUniformType()

static impeller::ShaderType flutter::gpu::FromUniformType ( impeller::fb::shaderbundle::UniformDataType  uniform_type)
static

Definition at line 97 of file shader_library.cc.

98 {
99 switch (uniform_type) {
100 case impeller::fb::shaderbundle::UniformDataType::kBoolean:
102 case impeller::fb::shaderbundle::UniformDataType::kSignedByte:
106 case impeller::fb::shaderbundle::UniformDataType::kSignedShort:
108 case impeller::fb::shaderbundle::UniformDataType::kUnsignedShort:
110 case impeller::fb::shaderbundle::UniformDataType::kSignedInt:
112 case impeller::fb::shaderbundle::UniformDataType::kUnsignedInt:
114 case impeller::fb::shaderbundle::UniformDataType::kSignedInt64:
116 case impeller::fb::shaderbundle::UniformDataType::kUnsignedInt64:
122 case impeller::fb::shaderbundle::UniformDataType::kHalfFloat:
126 }
127}

◆ GetShaderBackend()

static const impeller::fb::shaderbundle::BackendShader * flutter::gpu::GetShaderBackend ( impeller::Context::BackendType  backend_type,
const impeller::fb::shaderbundle::Shader *  shader 
)
static

Definition at line 157 of file shader_library.cc.

159 {
160 switch (backend_type) {
162#ifdef FML_OS_IOS
163 return shader->metal_ios();
164#else
165 return shader->metal_desktop();
166#endif
168#ifdef FML_OS_ANDROID
169 return shader->opengl_es();
170#else
171 return shader->opengl_desktop();
172#endif
174 return shader->vulkan();
175 }
176}

◆ IMPLEMENT_WRAPPERTYPEINFO() [1/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
CommandBuffer   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [2/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
Context   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [3/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
DeviceBuffer   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [4/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
HostBuffer   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [5/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
RenderPass   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [6/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
RenderPipeline   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [7/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
Shader   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [8/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
ShaderLibrary   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [9/9]

flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO ( flutter_gpu  ,
Texture   
)

◆ SizeOfInputType()

static size_t flutter::gpu::SizeOfInputType ( impeller::fb::shaderbundle::InputDataType  input_type)
static

Definition at line 129 of file shader_library.cc.

130 {
131 switch (input_type) {
132 case impeller::fb::shaderbundle::InputDataType::kBoolean:
133 return 1;
134 case impeller::fb::shaderbundle::InputDataType::kSignedByte:
135 return 1;
137 return 1;
138 case impeller::fb::shaderbundle::InputDataType::kSignedShort:
139 return 2;
140 case impeller::fb::shaderbundle::InputDataType::kUnsignedShort:
141 return 2;
142 case impeller::fb::shaderbundle::InputDataType::kSignedInt:
143 return 4;
144 case impeller::fb::shaderbundle::InputDataType::kUnsignedInt:
145 return 4;
146 case impeller::fb::shaderbundle::InputDataType::kSignedInt64:
147 return 8;
148 case impeller::fb::shaderbundle::InputDataType::kUnsignedInt64:
149 return 8;
151 return 4;
153 return 8;
154 }
155}

◆ ToImpellerBlendFactor() [1/2]

constexpr impeller::BlendFactor flutter::gpu::ToImpellerBlendFactor ( FlutterGPUBlendFactor  value)
constexpr

Definition at line 179 of file formats.h.

180 {
181 switch (value) {
182 case FlutterGPUBlendFactor::kZero:
184 case FlutterGPUBlendFactor::kOne:
186 case FlutterGPUBlendFactor::kSourceColor:
188 case FlutterGPUBlendFactor::kOneMinusSourceColor:
190 case FlutterGPUBlendFactor::kSourceAlpha:
192 case FlutterGPUBlendFactor::kOneMinusSourceAlpha:
194 case FlutterGPUBlendFactor::kDestinationColor:
196 case FlutterGPUBlendFactor::kOneMinusDestinationColor:
198 case FlutterGPUBlendFactor::kDestinationAlpha:
200 case FlutterGPUBlendFactor::kOneMinusDestinationAlpha:
202 case FlutterGPUBlendFactor::kSourceAlphaSaturated:
204 case FlutterGPUBlendFactor::kBlendColor:
206 case FlutterGPUBlendFactor::kOneMinusBlendColor:
208 case FlutterGPUBlendFactor::kBlendAlpha:
210 case FlutterGPUBlendFactor::kOneMinusBlendAlpha:
212 }
213}

◆ ToImpellerBlendFactor() [2/2]

constexpr impeller::BlendFactor flutter::gpu::ToImpellerBlendFactor ( int  value)
constexpr

Definition at line 215 of file formats.h.

215 {
217}
constexpr impeller::BlendFactor ToImpellerBlendFactor(int value)
Definition: formats.h:215
FlutterGPUBlendFactor
Definition: formats.h:161

◆ ToImpellerBlendOperation() [1/2]

constexpr impeller::BlendOperation flutter::gpu::ToImpellerBlendOperation ( FlutterGPUBlendOperation  value)
constexpr

Definition at line 225 of file formats.h.

226 {
227 switch (value) {
230 case FlutterGPUBlendOperation::kSubtract:
232 case FlutterGPUBlendOperation::kReverseSubtract:
234 }
235}

◆ ToImpellerBlendOperation() [2/2]

constexpr impeller::BlendOperation flutter::gpu::ToImpellerBlendOperation ( int  value)
constexpr

Definition at line 237 of file formats.h.

237 {
239}
FlutterGPUBlendOperation
Definition: formats.h:219
constexpr impeller::BlendOperation ToImpellerBlendOperation(int value)
Definition: formats.h:237

◆ ToImpellerCompareFunction() [1/2]

constexpr impeller::CompareFunction flutter::gpu::ToImpellerCompareFunction ( FlutterGPUCompareFunction  value)
constexpr

Definition at line 439 of file formats.h.

440 {
441 switch (value) {
444 case FlutterGPUCompareFunction::kAlways:
446 case FlutterGPUCompareFunction::kLess:
448 case FlutterGPUCompareFunction::kEqual:
450 case FlutterGPUCompareFunction::kLessEqual:
452 case FlutterGPUCompareFunction::kGreater:
454 case FlutterGPUCompareFunction::kNotEqual:
456 case FlutterGPUCompareFunction::kGreaterEqual:
458 }
459}
@ kEqual
Comparison test passes if new_value == current_value.
@ kLessEqual
Comparison test passes if new_value <= current_value.
@ kGreaterEqual
Comparison test passes if new_value >= current_value.
@ kAlways
Comparison test passes always passes.
@ kLess
Comparison test passes if new_value < current_value.
@ kGreater
Comparison test passes if new_value > current_value.
@ kNotEqual
Comparison test passes if new_value != current_value.
@ kNever
Comparison test never passes.

◆ ToImpellerCompareFunction() [2/2]

constexpr impeller::CompareFunction flutter::gpu::ToImpellerCompareFunction ( int  value)
constexpr

Definition at line 461 of file formats.h.

461 {
463 static_cast<FlutterGPUCompareFunction>(value));
464}
FlutterGPUCompareFunction
Definition: formats.h:428
constexpr impeller::CompareFunction ToImpellerCompareFunction(int value)
Definition: formats.h:461

◆ ToImpellerIndexType() [1/2]

constexpr impeller::IndexType flutter::gpu::ToImpellerIndexType ( FlutterGPUIndexType  value)
constexpr

Definition at line 387 of file formats.h.

387 {
388 switch (value) {
389 case FlutterGPUIndexType::k16bit:
391 case FlutterGPUIndexType::k32bit:
393 }
394}

◆ ToImpellerIndexType() [2/2]

constexpr impeller::IndexType flutter::gpu::ToImpellerIndexType ( int  value)
constexpr

Definition at line 396 of file formats.h.

396 {
397 return ToImpellerIndexType(static_cast<FlutterGPUIndexType>(value));
398}
constexpr impeller::IndexType ToImpellerIndexType(int value)
Definition: formats.h:396
FlutterGPUIndexType
Definition: formats.h:382

◆ ToImpellerLoadAction() [1/2]

constexpr impeller::LoadAction flutter::gpu::ToImpellerLoadAction ( FlutterGPULoadAction  value)
constexpr

Definition at line 247 of file formats.h.

248 {
249 switch (value) {
250 case FlutterGPULoadAction::kDontCare:
252 case FlutterGPULoadAction::kLoad:
254 case FlutterGPULoadAction::kClear:
256 }
257}

◆ ToImpellerLoadAction() [2/2]

constexpr impeller::LoadAction flutter::gpu::ToImpellerLoadAction ( int  value)
constexpr

Definition at line 259 of file formats.h.

259 {
260 return ToImpellerLoadAction(static_cast<FlutterGPULoadAction>(value));
261}
FlutterGPULoadAction
Definition: formats.h:241
constexpr impeller::LoadAction ToImpellerLoadAction(int value)
Definition: formats.h:259

◆ ToImpellerMinMagFilter() [1/2]

constexpr impeller::MinMagFilter flutter::gpu::ToImpellerMinMagFilter ( FlutterGPUMinMagFilter  value)
constexpr

Definition at line 327 of file formats.h.

328 {
329 switch (value) {
330 case FlutterGPUMinMagFilter::kNearest:
334 }
335}
@ kNearest
Select nearest to the sample point. Most widely supported.

◆ ToImpellerMinMagFilter() [2/2]

constexpr impeller::MinMagFilter flutter::gpu::ToImpellerMinMagFilter ( int  value)
constexpr

Definition at line 337 of file formats.h.

337 {
339}
FlutterGPUMinMagFilter
Definition: formats.h:322
constexpr impeller::MinMagFilter ToImpellerMinMagFilter(int value)
Definition: formats.h:337

◆ ToImpellerMipFilter() [1/2]

constexpr impeller::MipFilter flutter::gpu::ToImpellerMipFilter ( FlutterGPUMipFilter  value)
constexpr

Definition at line 346 of file formats.h.

346 {
347 switch (value) {
348 case FlutterGPUMipFilter::kNearest:
352 }
353}
@ kLinear
Sample from the two nearest mip levels and linearly interpolate.
@ kNearest
The nearst mipmap level is selected.

◆ ToImpellerMipFilter() [2/2]

constexpr impeller::MipFilter flutter::gpu::ToImpellerMipFilter ( int  value)
constexpr

Definition at line 355 of file formats.h.

355 {
356 return ToImpellerMipFilter(static_cast<FlutterGPUMipFilter>(value));
357}
FlutterGPUMipFilter
Definition: formats.h:341
constexpr impeller::MipFilter ToImpellerMipFilter(int value)
Definition: formats.h:355

◆ ToImpellerPixelFormat() [1/2]

constexpr impeller::PixelFormat flutter::gpu::ToImpellerPixelFormat ( FlutterGPUPixelFormat  value)
constexpr

Definition at line 60 of file formats.h.

61 {
62 switch (value) {
65 case FlutterGPUPixelFormat::kA8UNormInt:
67 case FlutterGPUPixelFormat::kR8UNormInt:
69 case FlutterGPUPixelFormat::kR8G8UNormInt:
71 case FlutterGPUPixelFormat::kR8G8B8A8UNormInt:
73 case FlutterGPUPixelFormat::kR8G8B8A8UNormIntSRGB:
75 case FlutterGPUPixelFormat::kB8G8R8A8UNormInt:
77 case FlutterGPUPixelFormat::kB8G8R8A8UNormIntSRGB:
79 case FlutterGPUPixelFormat::kR32G32B32A32Float:
81 case FlutterGPUPixelFormat::kR16G16B16A16Float:
83 case FlutterGPUPixelFormat::kB10G10R10XR:
85 case FlutterGPUPixelFormat::kB10G10R10XRSRGB:
87 case FlutterGPUPixelFormat::kB10G10R10A10XR:
89 case FlutterGPUPixelFormat::kS8UInt:
91 case FlutterGPUPixelFormat::kD24UnormS8Uint:
93 case FlutterGPUPixelFormat::kD32FloatS8UInt:
95 }
96}

◆ ToImpellerPixelFormat() [2/2]

constexpr impeller::PixelFormat flutter::gpu::ToImpellerPixelFormat ( int  value)
constexpr

Definition at line 98 of file formats.h.

98 {
100}
FlutterGPUPixelFormat
Definition: formats.h:41
constexpr impeller::PixelFormat ToImpellerPixelFormat(int value)
Definition: formats.h:98

◆ ToImpellerPrimitiveType() [1/2]

constexpr impeller::PrimitiveType flutter::gpu::ToImpellerPrimitiveType ( FlutterGPUPrimitiveType  value)
constexpr

Definition at line 408 of file formats.h.

409 {
410 switch (value) {
411 case FlutterGPUPrimitiveType::kTriangle:
413 case FlutterGPUPrimitiveType::kTriangleStrip:
415 case FlutterGPUPrimitiveType::kLine:
417 case FlutterGPUPrimitiveType::kLineStrip:
419 case FlutterGPUPrimitiveType::kPoint:
421 }
422}
@ kPoint
Draws a point at each input vertex.

◆ ToImpellerPrimitiveType() [2/2]

constexpr impeller::PrimitiveType flutter::gpu::ToImpellerPrimitiveType ( int  value)
constexpr

Definition at line 424 of file formats.h.

424 {
426}
FlutterGPUPrimitiveType
Definition: formats.h:400
constexpr impeller::PrimitiveType ToImpellerPrimitiveType(int value)
Definition: formats.h:424

◆ ToImpellerSamplerAddressMode() [1/2]

constexpr impeller::SamplerAddressMode flutter::gpu::ToImpellerSamplerAddressMode ( FlutterGPUSamplerAddressMode  value)
constexpr

Definition at line 365 of file formats.h.

366 {
367 switch (value) {
368 case FlutterGPUSamplerAddressMode::kClampToEdge:
370 case FlutterGPUSamplerAddressMode::kRepeat:
372 case FlutterGPUSamplerAddressMode::kMirror:
374 }
375}

◆ ToImpellerSamplerAddressMode() [2/2]

constexpr impeller::SamplerAddressMode flutter::gpu::ToImpellerSamplerAddressMode ( int  value)
constexpr

Definition at line 377 of file formats.h.

377 {
379 static_cast<FlutterGPUSamplerAddressMode>(value));
380}
FlutterGPUSamplerAddressMode
Definition: formats.h:359
constexpr impeller::SamplerAddressMode ToImpellerSamplerAddressMode(int value)
Definition: formats.h:377

◆ ToImpellerShaderStage() [1/2]

constexpr impeller::ShaderStage flutter::gpu::ToImpellerShaderStage ( FlutterGPUShaderStage  value)
constexpr

Definition at line 293 of file formats.h.

294 {
295 switch (value) {
296 case FlutterGPUShaderStage::kVertex:
298 case FlutterGPUShaderStage::kFragment:
300 }
301}

◆ ToImpellerShaderStage() [2/2]

constexpr impeller::ShaderStage flutter::gpu::ToImpellerShaderStage ( int  value)
constexpr

Definition at line 303 of file formats.h.

303 {
305}
FlutterGPUShaderStage
Definition: formats.h:288
constexpr impeller::ShaderStage ToImpellerShaderStage(int value)
Definition: formats.h:303

◆ ToImpellerStencilOperation() [1/2]

constexpr impeller::StencilOperation flutter::gpu::ToImpellerStencilOperation ( FlutterGPUStencilOperation  value)
constexpr

Definition at line 477 of file formats.h.

478 {
479 switch (value) {
480 case FlutterGPUStencilOperation::kKeep:
482 case FlutterGPUStencilOperation::kZero:
484 case FlutterGPUStencilOperation::kSetToReferenceValue:
486 case FlutterGPUStencilOperation::kIncrementClamp:
488 case FlutterGPUStencilOperation::kDecrementClamp:
490 case FlutterGPUStencilOperation::kInvert:
492 case FlutterGPUStencilOperation::kIncrementWrap:
494 case FlutterGPUStencilOperation::kDecrementWrap:
496 }
497}
@ kDecrementWrap
Decrement the current stencil value by 1. If at zero, set to maximum.
@ kSetToReferenceValue
Reset the stencil value to the reference value.
@ kDecrementClamp
Decrement the current stencil value by 1. Clamp it to zero.
@ kZero
Reset the stencil value to zero.
@ kIncrementClamp
Increment the current stencil value by 1. Clamp it to the maximum.
@ kIncrementWrap
Increment the current stencil value by 1. If at maximum, set to zero.
@ kInvert
Perform a logical bitwise invert on the current stencil value.
@ kKeep
Don't modify the current stencil value.

◆ ToImpellerStencilOperation() [2/2]

constexpr impeller::StencilOperation flutter::gpu::ToImpellerStencilOperation ( int  value)
constexpr

Definition at line 499 of file formats.h.

499 {
501 static_cast<FlutterGPUStencilOperation>(value));
502}
constexpr impeller::StencilOperation ToImpellerStencilOperation(int value)
Definition: formats.h:499
FlutterGPUStencilOperation
Definition: formats.h:466

◆ ToImpellerStorageMode() [1/2]

constexpr impeller::StorageMode flutter::gpu::ToImpellerStorageMode ( FlutterGPUStorageMode  value)
constexpr

Definition at line 25 of file formats.h.

26 {
27 switch (value) {
28 case FlutterGPUStorageMode::kHostVisible:
30 case FlutterGPUStorageMode::kDevicePrivate:
32 case FlutterGPUStorageMode::kDeviceTransient:
34 }
35}

◆ ToImpellerStorageMode() [2/2]

constexpr impeller::StorageMode flutter::gpu::ToImpellerStorageMode ( int  value)
constexpr

Definition at line 37 of file formats.h.

37 {
39}
constexpr impeller::StorageMode ToImpellerStorageMode(int value)
Definition: formats.h:37
FlutterGPUStorageMode
Definition: formats.h:19

◆ ToImpellerStoreAction() [1/2]

constexpr impeller::StoreAction flutter::gpu::ToImpellerStoreAction ( FlutterGPUStoreAction  value)
constexpr

Definition at line 270 of file formats.h.

271 {
272 switch (value) {
273 case FlutterGPUStoreAction::kDontCare:
275 case FlutterGPUStoreAction::kStore:
277 case FlutterGPUStoreAction::kMultisampleResolve:
279 case FlutterGPUStoreAction::kStoreAndMultisampleResolve:
281 }
282}

◆ ToImpellerStoreAction() [2/2]

constexpr impeller::StoreAction flutter::gpu::ToImpellerStoreAction ( int  value)
constexpr

Definition at line 284 of file formats.h.

284 {
286}
constexpr impeller::StoreAction ToImpellerStoreAction(int value)
Definition: formats.h:284
FlutterGPUStoreAction
Definition: formats.h:263

◆ ToImpellerTextureCoordinateSystem() [1/2]

constexpr impeller::TextureCoordinateSystem flutter::gpu::ToImpellerTextureCoordinateSystem ( FlutterGPUTextureCoordinateSystem  value)
constexpr

Definition at line 145 of file formats.h.

146 {
147 switch (value) {
148 case FlutterGPUTextureCoordinateSystem::kUploadFromHost:
150 case FlutterGPUTextureCoordinateSystem::kRenderToTexture:
152 }
153}

◆ ToImpellerTextureCoordinateSystem() [2/2]

constexpr impeller::TextureCoordinateSystem flutter::gpu::ToImpellerTextureCoordinateSystem ( int  value)
constexpr

Definition at line 155 of file formats.h.

156 {
159}
FlutterGPUTextureCoordinateSystem
Definition: formats.h:140
constexpr impeller::TextureCoordinateSystem ToImpellerTextureCoordinateSystem(int value)
Definition: formats.h:155

◆ ToShaderStage()

static impeller::ShaderStage flutter::gpu::ToShaderStage ( impeller::fb::shaderbundle::ShaderStage  stage)
static

Definition at line 56 of file shader_library.cc.

57 {
58 switch (stage) {
59 case impeller::fb::shaderbundle::ShaderStage::kVertex:
61 case impeller::fb::shaderbundle::ShaderStage::kFragment:
63 case impeller::fb::shaderbundle::ShaderStage::kCompute:
65 }
67}