Flutter Engine
The Flutter Engine
vertices.cpp
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 "export.h"
6
8
10 int vertexCount,
11 SkPoint* positions,
12 SkPoint* textureCoordinates,
14 int indexCount,
15 uint16_t* indices) {
16 return SkVertices::MakeCopy(vertexMode, vertexCount, positions,
17 textureCoordinates, colors, indexCount, indices)
18 .release();
19}
20
22 vertices->unref();
23}
uint32_t SkColor
Definition: SkColor.h:37
void unref() const
Definition: SkRefCnt.h:177
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
Definition: SkVertices.cpp:200
T * release()
Definition: SkRefCnt.h:324
SKWASM_EXPORT SkVertices * vertices_create(SkVertices::VertexMode vertexMode, int vertexCount, SkPoint *positions, SkPoint *textureCoordinates, SkColor *colors, int indexCount, uint16_t *indices)
Definition: vertices.cpp:9
SKWASM_EXPORT void vertices_dispose(SkVertices *vertices)
Definition: vertices.cpp:21
PODArray< SkColor > colors
Definition: SkRecords.h:276
#define SKWASM_EXPORT
Definition: export.h:10