Skia
2D Graphics Library
SkMesh::IndexBuffer Class Referenceabstract

#include <SkMesh.h>

Inheritance diagram for SkMesh::IndexBuffer:

Public Member Functions

virtual size_t size () const =0
 
bool update (GrDirectContext *, const void *data, size_t offset, size_t size)
 Modifies the data in the IndexBuffer by copying size bytes from data into the buffer at offset. More...
 
bool unique () const
 May return true if the caller is the only owner. More...
 
void ref () const
 Increment the reference count. More...
 
void unref () const
 Decrement the reference count. More...
 

Member Function Documentation

◆ ref()

void SkRefCntBase::ref ( ) const
inlineinherited

Increment the reference count.

Must be balanced by a call to unref().

◆ size()

virtual size_t SkMesh::IndexBuffer::size ( ) const
pure virtual

◆ unique()

bool SkRefCntBase::unique ( ) const
inlineinherited

May return true if the caller is the only owner.

Ensures that all previous owner's actions are complete.

◆ unref()

void SkRefCntBase::unref ( ) const
inlineinherited

Decrement the reference count.

If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.

◆ update()

bool SkMesh::IndexBuffer::update ( GrDirectContext ,
const void *  data,
size_t  offset,
size_t  size 
)

Modifies the data in the IndexBuffer by copying size bytes from data into the buffer at offset.

Fails if offset + size > this->size() or if either offset or size is not aligned to 4 bytes. The GrDirectContext* must match that used to create the buffer. We take it as a parameter to emphasize that the context must be used to update the data and thus the context must be valid for the current thread.


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