Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
core
runtime_types.cc
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
#include "
impeller/core/runtime_types.h
"
6
7
namespace
impeller
{
8
9
size_t
RuntimeUniformDescription::GetSize
()
const
{
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
size +=
sizeof
(float) *
struct_layout
.size();
17
return
size;
18
}
19
20
}
// namespace impeller
impeller
Definition
texture.h:18
runtime_types.h
impeller::RuntimeUniformDescription::dimensions
RuntimeUniformDimensions dimensions
Definition
runtime_types.h:45
impeller::RuntimeUniformDescription::GetSize
size_t GetSize() const
Computes the total number of bytes that this uniform requires.
Definition
runtime_types.cc:9
impeller::RuntimeUniformDescription::struct_layout
std::vector< uint8_t > struct_layout
Definition
runtime_types.h:48
impeller::RuntimeUniformDescription::array_elements
std::optional< size_t > array_elements
Definition
runtime_types.h:47
impeller::RuntimeUniformDescription::bit_width
size_t bit_width
Definition
runtime_types.h:46
impeller::RuntimeUniformDimensions::cols
size_t cols
Definition
runtime_types.h:36
impeller::RuntimeUniformDimensions::rows
size_t rows
Definition
runtime_types.h:35
Generated on Fri Apr 26 2024 06:14:08 for Flutter Engine by
1.9.8