Skia
2D Graphics Library
SkVertices Class Reference

An immutable set of vertex data that can be used with SkCanvas::drawVertices. More...

#include <SkVertices.h>

Inheritance diagram for SkVertices:

Classes

struct  Attribute
 EXPERIMENTAL - An SkVertices object can be constructed with a custom collection of vertex attributes. More...
 
class  Builder
 

Public Types

enum  VertexMode { kTriangles_VertexMode, kTriangleStrip_VertexMode, kTriangleFan_VertexMode, kLast_VertexMode = kTriangleFan_VertexMode }
 
enum  BuilderFlags { kHasTexCoords_BuilderFlag = 1 << 0, kHasColors_BuilderFlag = 1 << 1 }
 

Public Member Functions

uint32_t uniqueID () const
 
const SkRectbounds () const
 
size_t approximateSize () const
 
SkVerticesPriv priv ()
 
const SkVerticesPriv priv () const
 
bool unique () const
 
void ref () const
 
void unref () const
 
void deref () const
 
bool refCntGreaterThan (int32_t threadIsolatedTestCnt) const
 

Static Public Member Functions

static sk_sp< SkVerticesMakeCopy (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. More...
 
static sk_sp< SkVerticesMakeCopy (VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[])
 

Static Public Attributes

static constexpr int kMaxCustomAttributes = 8
 

Friends

class SkVerticesPriv
 
class SkNVRefCnt< SkVertices >
 

Detailed Description

An immutable set of vertex data that can be used with SkCanvas::drawVertices.

Member Enumeration Documentation

◆ BuilderFlags

Enumerator
kHasTexCoords_BuilderFlag 
kHasColors_BuilderFlag 

◆ VertexMode

Enumerator
kTriangles_VertexMode 
kTriangleStrip_VertexMode 
kTriangleFan_VertexMode 
kLast_VertexMode 

Member Function Documentation

◆ approximateSize()

size_t SkVertices::approximateSize ( ) const

◆ bounds()

const SkRect& SkVertices::bounds ( ) const
inline

◆ deref()

void SkNVRefCnt< SkVertices >::deref
inlineinherited

◆ MakeCopy() [1/2]

static sk_sp<SkVertices> SkVertices::MakeCopy ( VertexMode  mode,
int  vertexCount,
const SkPoint  positions[],
const SkPoint  texs[],
const SkColor  colors[] 
)
inlinestatic

◆ MakeCopy() [2/2]

static sk_sp<SkVertices> SkVertices::MakeCopy ( VertexMode  mode,
int  vertexCount,
const SkPoint  positions[],
const SkPoint  texs[],
const SkColor  colors[],
int  indexCount,
const uint16_t  indices[] 
)
static

Create a vertices by copying the specified arrays.

texs, colors may be nullptr, and indices is ignored if indexCount == 0.

◆ priv() [1/2]

SkVerticesPriv SkVertices::priv ( )

◆ priv() [2/2]

const SkVerticesPriv SkVertices::priv ( ) const

◆ ref()

void SkNVRefCnt< SkVertices >::ref
inlineinherited

◆ refCntGreaterThan()

bool SkNVRefCnt< SkVertices >::refCntGreaterThan ( int32_t  threadIsolatedTestCnt) const
inlineinherited

◆ unique()

bool SkNVRefCnt< SkVertices >::unique
inlineinherited

◆ uniqueID()

uint32_t SkVertices::uniqueID ( ) const
inline

◆ unref()

void SkNVRefCnt< SkVertices >::unref
inlineinherited

Friends And Related Function Documentation

◆ SkNVRefCnt< SkVertices >

friend class SkNVRefCnt< SkVertices >
friend

◆ SkVerticesPriv

friend class SkVerticesPriv
friend

Member Data Documentation

◆ kMaxCustomAttributes

constexpr int SkVertices::kMaxCustomAttributes = 8
staticconstexpr

The documentation for this class was generated from the following file: