8 #ifndef SkVertices_DEFINED
9 #define SkVertices_DEFINED
33 kLast_VertexMode = kTriangleFan_VertexMode,
41 const SkPoint positions[],
45 const uint16_t indices[]);
48 const SkPoint positions[],
61 kHasTexCoords_BuilderFlag = 1 << 0,
62 kHasColors_BuilderFlag = 1 << 1,
68 bool isValid()
const {
return fVertices !=
nullptr; }
83 void init(
const Desc&);
89 std::unique_ptr<uint8_t[]> fIntermediateFanIndices;
92 friend class SkVerticesPriv;
95 uint32_t
uniqueID()
const {
return fUniqueID; }
103 const SkVerticesPriv
priv()
const;
108 friend class SkVerticesPriv;
112 void operator delete(
void* p);
114 Sizes getSizes()
const;
Types, consts, functions, and macros for colors.
uint32_t SkColor
32-bit ARGB color value, unpremultiplied.
Definition: SkColor.h:37
SkData holds an immutable data buffer.
Definition: SkData.h:25
Definition: SkRefCnt.h:160
Definition: SkVertices.h:64
sk_sp< SkVertices > detach()
bool isValid() const
Definition: SkVertices.h:68
Builder(VertexMode mode, int vertexCount, int indexCount, uint32_t flags)
An immutable set of vertex data that can be used with SkCanvas::drawVertices.
Definition: SkVertices.h:24
BuilderFlags
Definition: SkVertices.h:60
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
Create a vertices by copying the specified arrays.
const SkRect & bounds() const
Definition: SkVertices.h:96
uint32_t uniqueID() const
Definition: SkVertices.h:95
VertexMode
Definition: SkVertices.h:28
@ kTriangleStrip_VertexMode
Definition: SkVertices.h:30
@ kTriangleFan_VertexMode
Definition: SkVertices.h:31
@ kTriangles_VertexMode
Definition: SkVertices.h:29
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[])
Definition: SkVertices.h:47
size_t approximateSize() const
const SkVerticesPriv priv() const
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:582