26 {
28
29 tonic::Float32List positions(positions_handle);
30 tonic::Float32List texture_coordinates(texture_coordinates_handle);
31 tonic::Int32List
colors(colors_handle);
32 tonic::Uint16List indices(indices_handle);
33
34 if (!positions.data()) {
35 return false;
36 }
37
39 if (texture_coordinates.data()) {
41 }
44 }
46 indices.num_elements());
47
49 return false;
50 }
51
52
53 builder.store_vertices(positions.data());
54
55 if (texture_coordinates.data()) {
56
57 FML_DCHECK(positions.num_elements() == texture_coordinates.num_elements());
58 builder.store_texture_coordinates(texture_coordinates.data());
59 }
60
62
65 }
66
67 if (indices.data() && indices.num_elements() > 0) {
68 builder.store_indices(indices.data());
69 }
70
71 positions.Release();
72 texture_coordinates.Release();
74 indices.Release();
75
76 auto vertices = fml::MakeRefCounted<Vertices>();
78 vertices->AssociateWithDartWrapper(vertices_handle);
79
80 return true;
81}
static constexpr Flags kHasColors
static constexpr Flags kHasTextureCoordinates
static void ThrowIfUIOperationsProhibited()
const DlVertices * vertices() const
FlutterSemanticsFlag flags
#define FML_DCHECK(condition)
PODArray< SkColor > colors
DlVertices::Builder Builder