29 if (v0.mode() != v1.
mode()) {
39 if (!!v0.texCoords() != !!v1.
texCoords()) {
42 if (!!v0.colors() != !!v1.
colors()) {
46 for (
int i = 0;
i < v0.vertexCount(); ++
i) {
56 if (v0.colors()[
i] != v1.
colors()[
i]) {
61 for (
int i = 0;
i < v0.indexCount(); ++
i) {
74 writer.writeToMemory(buf.
get());
93 for (
auto texF : texFlags) {
94 for (
auto colF : colFlags) {
95 uint32_t
flags = texF | colF;
99 for (
int i = 0;
i < vCount; ++
i) {
109 for (
int i = 0;
i < iCount; ++
i) {
161 SkPoint pts[] = { { -10, 1 }, { -10, 2 }, { 1e9f, 1.5f } };
166 while (
void*
addr = iter.
next(&loc)) {
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorBLACK
#define REPORTER_ASSERT(r, cond,...)
static void fill_triangle(SkCanvas *canvas, const SkPoint pts[], SkColor c)
static bool equal(const SkVertices *vert0, const SkVertices *vert1)
DEF_TEST(Vertices, reporter)
static void self_test(const sk_sp< SkVertices > &v0, skiatest::Reporter *reporter)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
SkVertices::VertexMode mode() const
void encode(SkWriteBuffer &) const
const SkColor * colors() const
const uint16_t * indices() const
const SkPoint * texCoords() const
static sk_sp< SkVertices > Decode(SkReadBuffer &)
const SkPoint * positions() const
@ kHasTexCoords_BuilderFlag
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
uint32_t uniqueID() const
@ kTriangleFan_VertexMode
FlutterSemanticsFlag flags
PODArray< SkColor > colors
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo MakeN32Premul(int width, int height)