| Flutter Impeller |

Public Member Functions | Public Attributes | List of all members
impeller::RuntimeUniformDescription Struct Reference

`#include <runtime_types.h>`

## Public Member Functions
size_t | GetSize () const
| Computes the total number of bytes that this uniform requires. More...

## Public Attributes
std::string | name
size_t | location = 0u
RuntimeUniformType | type = RuntimeUniformType::kFloat
RuntimeUniformDimensions | dimensions
size_t | bit_width
std::optional< size_t > | array_elements

## Detailed Description

Definition at line 42 of file runtime_types.h.

## Member Function Documentation

## ◆ GetSize()

size_t impeller::RuntimeUniformDescription::GetSize | ( |  | ) | const

Computes the total number of bytes that this uniform requires.

Definition at line 9 of file runtime_types.cc.

9 {
10 size_t size = dimensions.rows * dimensions.cols * bit_width / 8u;
11 if (array_elements.value_or(0) > 0) {
12 // Covered by check on the line above.
13 // NOLINTNEXTLINE(bugprone-unchecked-optional-access)
14 size *= array_elements.value();
15 }
16 return size;
17 }

References array_elements, bit_width, impeller::RuntimeUniformDimensions::cols, dimensions, and impeller::RuntimeUniformDimensions::rows.

## Member Data Documentation

## ◆ array_elements

std::optional<size_t> impeller::RuntimeUniformDescription::array_elements

Definition at line 48 of file runtime_types.h.

Referenced by GetSize(), and impeller::RuntimeStage::RuntimeStage().

## ◆ bit_width

size_t impeller::RuntimeUniformDescription::bit_width

Definition at line 47 of file runtime_types.h.

Referenced by GetSize(), and impeller::RuntimeStage::RuntimeStage().

## ◆ dimensions

RuntimeUniformDimensions impeller::RuntimeUniformDescription::dimensions

Definition at line 46 of file runtime_types.h.

Referenced by GetSize(), and impeller::RuntimeStage::RuntimeStage().

## ◆ location

size_t impeller::RuntimeUniformDescription::location = 0u

Definition at line 44 of file runtime_types.h.

Referenced by impeller::RuntimeStage::RuntimeStage().

## ◆ name

std::string impeller::RuntimeUniformDescription::name

Definition at line 43 of file runtime_types.h.

Referenced by impeller::RuntimeStage::RuntimeStage().

## ◆ type

RuntimeUniformType impeller::RuntimeUniformDescription::type = RuntimeUniformType::kFloat

Definition at line 45 of file runtime_types.h.

Referenced by impeller::RuntimeStage::RuntimeStage().

The documentation for this struct was generated from the following files:

- impeller/core/runtime_types.h
- impeller/core/runtime_types.cc

impeller::RuntimeUniformDimensions::cols
size_t cols
Definition: runtime_types.h:39
impeller::RuntimeUniformDescription::dimensions
RuntimeUniformDimensions dimensions
Definition: runtime_types.h:46
impeller::RuntimeUniformDimensions::rows
size_t rows
Definition: runtime_types.h:38
impeller::RuntimeUniformDescription::bit_width
size_t bit_width
Definition: runtime_types.h:47
impeller::RuntimeUniformDescription::array_elements
std::optional< size_t > array_elements
Definition: runtime_types.h:48