Skia
2D Graphics Library
|
#include <SkMesh.h>
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... | |
|
inlineinherited |
Increment the reference count.
Must be balanced by a call to unref().
|
pure virtual |
|
inlineinherited |
May return true if the caller is the only owner.
Ensures that all previous owner's actions are complete.
|
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.
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.