• Home
  • Raw
  • Download

Lines Matching refs:globals

443     SkGlyphCache_Globals& globals = getGlobals();  in VisitAllCaches()  local
444 SkAutoMutexAcquire ac(globals.fMutex); in VisitAllCaches()
447 globals.validate(); in VisitAllCaches()
449 for (cache = globals.fHead; cache != NULL; cache = cache->fNext) { in VisitAllCaches()
455 globals.validate(); in VisitAllCaches()
469 SkGlyphCache_Globals& globals = getGlobals(); in VisitCache() local
470 SkAutoMutexAcquire ac(globals.fMutex); in VisitCache()
474 globals.validate(); in VisitCache()
477 SkGlyphCache** hash = globals.fHash; in VisitCache()
481 cache->detach(&globals.fHead); in VisitCache()
486 for (cache = globals.fHead; cache != NULL; cache = cache->fNext) { in VisitCache()
488 cache->detach(&globals.fHead); in VisitCache()
507 SkASSERT(globals.fTotalMemoryUsed >= cache->fMemoryUsed); in VisitCache()
508 globals.fTotalMemoryUsed -= cache->fMemoryUsed; in VisitCache()
515 cache->attachToHead(&globals.fHead); in VisitCache()
531 SkGlyphCache_Globals& globals = getGlobals(); in AttachCache() local
532 SkAutoMutexAcquire ac(globals.fMutex); in AttachCache()
534 globals.validate(); in AttachCache()
539 size_t allocated = globals.fTotalMemoryUsed + cache->fMemoryUsed; in AttachCache()
542 (void)InternalFreeCache(&globals, allocated - budgeted); in AttachCache()
546 cache->attachToHead(&globals.fHead); in AttachCache()
547 globals.fTotalMemoryUsed += cache->fMemoryUsed; in AttachCache()
551 SkASSERT(globals.fHash[index] != cache); in AttachCache()
552 globals.fHash[index] = cache; in AttachCache()
555 globals.validate(); in AttachCache()
559 SkGlyphCache_Globals& globals = getGlobals(); in GetCacheUsed() local
560 SkAutoMutexAcquire ac(globals.fMutex); in GetCacheUsed()
562 return SkGlyphCache::ComputeMemoryUsed(globals.fHead); in GetCacheUsed()
569 SkGlyphCache_Globals& globals = getGlobals(); in SetCacheUsed() local
570 SkAutoMutexAcquire ac(globals.fMutex); in SetCacheUsed()
572 return InternalFreeCache(&globals, curr - bytesUsed) > 0; in SetCacheUsed()
608 size_t SkGlyphCache::InternalFreeCache(SkGlyphCache_Globals* globals, in InternalFreeCache() argument
610 globals->validate(); in InternalFreeCache()
616 size_t minToPurge = globals->fTotalMemoryUsed >> 2; in InternalFreeCache()
620 SkGlyphCache* cache = FindTail(globals->fHead); in InternalFreeCache()
627 if (cache == globals->fHash[index]) { in InternalFreeCache()
628 globals->fHash[index] = NULL; in InternalFreeCache()
632 cache->detach(&globals->fHead); in InternalFreeCache()
638 SkASSERT(bytesFreed <= globals->fTotalMemoryUsed); in InternalFreeCache()
639 globals->fTotalMemoryUsed -= bytesFreed; in InternalFreeCache()
640 globals->validate(); in InternalFreeCache()