Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
vertices.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 <vector>
6
11
13 flutter::DlVertexMode vertex_mode,
14 int vertex_count,
15 flutter::DlPoint* positions,
16 flutter::DlPoint* texture_coordinates,
17 uint32_t* colors,
18 int index_count,
19 uint16_t* indices) {
21 std::vector<flutter::DlColor> dl_colors;
22 flutter::DlColor* dl_color_pointer = nullptr;
23 if (colors != nullptr) {
24 dl_colors.resize(vertex_count);
25 for (int i = 0; i < vertex_count; i++) {
26 dl_colors[i] = flutter::DlColor(colors[i]);
27 }
28 dl_color_pointer = dl_colors.data();
29 }
31 vertex_mode, vertex_count, positions, texture_coordinates,
32 dl_color_pointer, index_count, indices));
33}
34
static std::shared_ptr< DlVertices > Make(DlVertexMode mode, int vertex_count, const DlPoint vertices[], const DlPoint texture_coordinates[], const DlColor colors[], int index_count=0, const uint16_t indices[]=nullptr, const DlRect *bounds=nullptr)
Constructs a DlVector with compact inline storage for all of its required and optional lists of data.
uint32_t live_vertices_count
DlVertexMode
Defines the way in which the vertices of a DlVertices object are separated into triangles into which ...
Definition dl_vertices.h:18
#define SKWASM_EXPORT
Definition export.h:10
SKWASM_EXPORT Skwasm::sp_wrapper< flutter::DlVertices > * vertices_create(flutter::DlVertexMode vertex_mode, int vertex_count, flutter::DlPoint *positions, flutter::DlPoint *texture_coordinates, uint32_t *colors, int index_count, uint16_t *indices)
Definition vertices.cc:12
SKWASM_EXPORT void vertices_dispose(Skwasm::sp_wrapper< flutter::DlVertices > *vertices)
Definition vertices.cc:35