5#include "flutter/lib/ui/painting/vertices.h"
9#include "flutter/lib/ui/ui_dart_state.h"
17Vertices::Vertices() {}
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);
34 if (!positions.data()) {
39 if (texture_coordinates.data()) {
46 indices.num_elements());
53 builder.store_vertices(positions.data());
55 if (texture_coordinates.data()) {
57 FML_DCHECK(positions.num_elements() == texture_coordinates.num_elements());
58 builder.store_texture_coordinates(texture_coordinates.data());
67 if (indices.data() && indices.num_elements() > 0) {
68 builder.store_indices(indices.data());
72 texture_coordinates.Release();
76 auto vertices = fml::MakeRefCounted<Vertices>();
78 vertices->AssociateWithDartWrapper(vertices_handle);
A utility class to build up a |DlVertices| object one set of data at a time.
static constexpr Flags kHasColors
static constexpr Flags kHasTextureCoordinates
static void ThrowIfUIOperationsProhibited()
const DlVertices * vertices() const
static bool init(Dart_Handle vertices_handle, DlVertexMode vertex_mode, Dart_Handle positions_handle, Dart_Handle texture_coordinates_handle, Dart_Handle colors_handle, Dart_Handle indices_handle)
struct _Dart_Handle * Dart_Handle
FlutterSemanticsFlag flags
#define FML_DCHECK(condition)
PODArray< SkColor > colors
IMPLEMENT_WRAPPERTYPEINFO(flutter_gpu, FlutterGpuTestClass)
DlVertexMode
Defines the way in which the vertices of a DlVertices object are separated into triangles into which ...
flags to indicate/promise which of the optional texture coordinates or colors will be supplied during...