Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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,
13 SkColor* colors,
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[])
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
#define SKWASM_EXPORT
Definition export.h:10