本文整理汇总了C++中entrylist::Iter::next方法的典型用法代码示例。如果您正苦于以下问题:C++ Iter::next方法的具体用法?C++ Iter::next怎么用?C++ Iter::next使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entrylist::Iter
的用法示例。
在下文中一共展示了Iter::next方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: validate
void GrResourceCache::validate() const {
fList.validate();
fExclusiveList.validate();
GrAssert(both_zero_or_nonzero(fEntryCount, fEntryBytes));
GrAssert(both_zero_or_nonzero(fClientDetachedCount, fClientDetachedBytes));
GrAssert(fClientDetachedBytes <= fEntryBytes);
GrAssert(fClientDetachedCount <= fEntryCount);
GrAssert((fEntryCount - fClientDetachedCount) == fCache.count());
fCache.validate();
EntryList::Iter iter;
// check that the exclusively held entries are okay
const GrResourceEntry* entry = iter.init(const_cast<EntryList&>(fExclusiveList),
EntryList::Iter::kHead_IterStart);
for ( ; NULL != entry; entry = iter.next()) {
entry->validate();
}
// check that the shareable entries are okay
entry = iter.init(const_cast<EntryList&>(fList), EntryList::Iter::kHead_IterStart);
int count = 0;
for ( ; NULL != entry; entry = iter.next()) {
entry->validate();
GrAssert(fCache.find(entry->key()));
count += 1;
}
GrAssert(count == fEntryCount - fClientDetachedCount);
size_t bytes = countBytes(fList);
GrAssert(bytes == fEntryBytes - fClientDetachedBytes);
bytes = countBytes(fExclusiveList);
GrAssert(bytes == fClientDetachedBytes);
GrAssert(fList.countEntries() == fEntryCount - fClientDetachedCount);
GrAssert(fExclusiveList.countEntries() == fClientDetachedCount);
}
示例2: validate
void GrResourceCache::validate() const {
fList.validate();
SkASSERT(both_zero_or_nonzero(fEntryCount, fEntryBytes));
EntryList::Iter iter;
// check that the shareable entries are okay
const GrResourceCacheEntry* entry = iter.init(const_cast<EntryList&>(fList),
EntryList::Iter::kHead_IterStart);
int count = 0;
for ( ; entry; entry = iter.next()) {
entry->validate();
count += 1;
}
SkASSERT(count == fEntryCount);
size_t bytes = this->countBytes(fList);
SkASSERT(bytes == fEntryBytes);
SkASSERT(fList.countEntries() == fEntryCount);
}