OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 421 |
422 void GrResourceCache::validate() const { | 422 void GrResourceCache::validate() const { |
423 fList.validate(); | 423 fList.validate(); |
424 fExclusiveList.validate(); | 424 fExclusiveList.validate(); |
425 SkASSERT(both_zero_or_nonzero(fEntryCount, fEntryBytes)); | 425 SkASSERT(both_zero_or_nonzero(fEntryCount, fEntryBytes)); |
426 SkASSERT(both_zero_or_nonzero(fClientDetachedCount, fClientDetachedBytes)); | 426 SkASSERT(both_zero_or_nonzero(fClientDetachedCount, fClientDetachedBytes)); |
427 SkASSERT(fClientDetachedBytes <= fEntryBytes); | 427 SkASSERT(fClientDetachedBytes <= fEntryBytes); |
428 SkASSERT(fClientDetachedCount <= fEntryCount); | 428 SkASSERT(fClientDetachedCount <= fEntryCount); |
429 SkASSERT((fEntryCount - fClientDetachedCount) == fCache.count()); | 429 SkASSERT((fEntryCount - fClientDetachedCount) == fCache.count()); |
430 | 430 |
431 fCache.validate(); | |
432 | |
433 | |
434 EntryList::Iter iter; | 431 EntryList::Iter iter; |
435 | 432 |
436 // check that the exclusively held entries are okay | 433 // check that the exclusively held entries are okay |
437 const GrResourceEntry* entry = iter.init(const_cast<EntryList&>(fExclusiveLi
st), | 434 const GrResourceEntry* entry = iter.init(const_cast<EntryList&>(fExclusiveLi
st), |
438 EntryList::Iter::kHead_IterStart); | 435 EntryList::Iter::kHead_IterStart); |
439 | 436 |
440 for ( ; NULL != entry; entry = iter.next()) { | 437 for ( ; NULL != entry; entry = iter.next()) { |
441 entry->validate(); | 438 entry->validate(); |
442 } | 439 } |
443 | 440 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 fEntryBytes, fHighWaterEntryBytes); | 483 fEntryBytes, fHighWaterEntryBytes); |
487 SkDebugf("\t\tDetached Entry Count: current %d high %d\n", | 484 SkDebugf("\t\tDetached Entry Count: current %d high %d\n", |
488 fClientDetachedCount, fHighWaterClientDetachedCount); | 485 fClientDetachedCount, fHighWaterClientDetachedCount); |
489 SkDebugf("\t\tDetached Bytes: current %d high %d\n", | 486 SkDebugf("\t\tDetached Bytes: current %d high %d\n", |
490 fClientDetachedBytes, fHighWaterClientDetachedBytes); | 487 fClientDetachedBytes, fHighWaterClientDetachedBytes); |
491 } | 488 } |
492 | 489 |
493 #endif | 490 #endif |
494 | 491 |
495 /////////////////////////////////////////////////////////////////////////////// | 492 /////////////////////////////////////////////////////////////////////////////// |
OLD | NEW |