Flutter Impeller
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
return
size;
17
}
18
19
}
// namespace impeller
impeller::RuntimeUniformDescription::GetSize
size_t GetSize() const
Computes the total number of bytes that this uniform requires.
Definition:
runtime_types.cc:9
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
runtime_types.h
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
impeller
Definition:
aiks_context.cc:10
impeller
core
runtime_types.cc
Generated by
1.8.17