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

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[])
 

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 ( ) const
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 ( ) const
inlineinherited

◆ refCntGreaterThan()

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

◆ unique()

bool SkNVRefCnt< SkVertices >::unique ( ) const
inlineinherited

◆ uniqueID()

uint32_t SkVertices::uniqueID ( ) const
inline

◆ unref()

void SkNVRefCnt< SkVertices >::unref ( ) const
inlineinherited

Friends And Related Function Documentation

◆ SkNVRefCnt< SkVertices >

friend class SkNVRefCnt< SkVertices >
friend

◆ SkVerticesPriv

friend class SkVerticesPriv
friend

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