Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
6
7namespace impeller {
8
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
RuntimeUniformDimensions dimensions
size_t GetSize() const
Computes the total number of bytes that this uniform requires.
std::vector< uint8_t > struct_layout
std::optional< size_t > array_elements