Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
vertices.cc File Reference

Go to the source code of this file.

Functions

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)
 
SKWASM_EXPORT void vertices_dispose (Skwasm::sp_wrapper< flutter::DlVertices > *vertices)
 

Function Documentation

◆ vertices_create()

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 at line 12 of file vertices.cc.

19 {
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}
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

References i, Skwasm::live_vertices_count, and flutter::DlVertices::Make().

◆ vertices_dispose()

SKWASM_EXPORT void vertices_dispose ( Skwasm::sp_wrapper< flutter::DlVertices > *  vertices)

Definition at line 35 of file vertices.cc.

36 {
38 delete vertices;
39}

References Skwasm::live_vertices_count.