Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrQuadBuffer< T >::MetadataIter Class Reference

#include <GrQuadBuffer.h>

Public Member Functions

 MetadataIter (GrQuadBuffer< T > *list)
 
bool next ()
 
Toperator* ()
 
Toperator-> ()
 

Detailed Description

template<typename T>
class GrQuadBuffer< T >::MetadataIter

Definition at line 121 of file GrQuadBuffer.h.

Constructor & Destructor Documentation

◆ MetadataIter()

template<typename T >
GrQuadBuffer< T >::MetadataIter::MetadataIter ( GrQuadBuffer< T > *  list)
inline

Definition at line 123 of file GrQuadBuffer.h.

124 : fBuffer(list)
125 , fCurrentEntry(nullptr) {
126 SkDEBUGCODE(fExpectedCount = list->count();)
127 }
int count() const
Definition: GrQuadBuffer.h:44

Member Function Documentation

◆ next()

template<typename T >
bool GrQuadBuffer< T >::MetadataIter::next

Definition at line 361 of file GrQuadBuffer.h.

361 {
362 if (fCurrentEntry) {
363 // Advance pointer by entry size
364 if (fCurrentEntry < fBuffer->fData.end()) {
365 const Header* h = fBuffer->header(fCurrentEntry);
366 fCurrentEntry += fBuffer->entrySize(h);
367 }
368 } else {
369 // First call to next
370 fCurrentEntry = fBuffer->fData.begin();
371 }
372 // Nothing else is needed to do but report whether or not the updated pointer is valid
373 return fCurrentEntry < fBuffer->fData.end();
374}
SkScalar h

◆ operator*()

template<typename T >
T & GrQuadBuffer< T >::MetadataIter::operator* ( )
inline

Definition at line 131 of file GrQuadBuffer.h.

131{ this->validate(); return *(fBuffer->metadata(fCurrentEntry)); }

◆ operator->()

template<typename T >
T * GrQuadBuffer< T >::MetadataIter::operator-> ( )
inline

Definition at line 133 of file GrQuadBuffer.h.

133{ this->validate(); return fBuffer->metadata(fCurrentEntry); }

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