Flutter Engine
The Flutter Engine
Public Member Functions | Private Member Functions | List of all members
SkMesh::VertexBuffer Class Referenceabstract

#include <SkMesh.h>

Inheritance diagram for SkMesh::VertexBuffer:
SkRefCnt SkRefCntBase SkMeshPriv::VB

Public Member Functions

virtual size_t size () const =0
 
bool update (GrDirectContext *, const void *data, size_t offset, size_t size)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Private Member Functions

virtual bool onUpdate (GrDirectContext *, const void *data, size_t offset, size_t size)=0
 

Detailed Description

Definition at line 282 of file SkMesh.h.

Member Function Documentation

◆ onUpdate()

virtual bool SkMesh::VertexBuffer::onUpdate ( GrDirectContext ,
const void *  data,
size_t  offset,
size_t  size 
)
privatepure virtual

◆ size()

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

◆ update()

bool SkMesh::VertexBuffer::update ( GrDirectContext dc,
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.

Definition at line 881 of file SkMesh.cpp.

884 {
885 return check_update(data, offset, size, this->size()) && this->onUpdate(dc, data, offset, size);
886}
static bool check_update(const void *data, size_t offset, size_t size, size_t bufferSize)
Definition: SkMesh.cpp:864
virtual size_t size() const =0
virtual bool onUpdate(GrDirectContext *, const void *data, size_t offset, size_t size)=0
SeparatedVector2 offset
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

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