OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkChecksum.h" | 8 #include "SkChecksum.h" |
9 #include "SkResourceCache.h" | 9 #include "SkResourceCache.h" |
10 #include "SkMipMap.h" | 10 #include "SkMipMap.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 size_t SkResourceCache::GetTotalByteLimit() { | 425 size_t SkResourceCache::GetTotalByteLimit() { |
426 SkAutoMutexAcquire am(gMutex); | 426 SkAutoMutexAcquire am(gMutex); |
427 return get_cache()->getTotalByteLimit(); | 427 return get_cache()->getTotalByteLimit(); |
428 } | 428 } |
429 | 429 |
430 size_t SkResourceCache::SetTotalByteLimit(size_t newLimit) { | 430 size_t SkResourceCache::SetTotalByteLimit(size_t newLimit) { |
431 SkAutoMutexAcquire am(gMutex); | 431 SkAutoMutexAcquire am(gMutex); |
432 return get_cache()->setTotalByteLimit(newLimit); | 432 return get_cache()->setTotalByteLimit(newLimit); |
433 } | 433 } |
434 | 434 |
| 435 SkResourceCache::DiscardableFactory SkResourceCache::GetDiscardableFactory() { |
| 436 SkAutoMutexAcquire am(gMutex); |
| 437 return get_cache()->discardableFactory(); |
| 438 } |
| 439 |
435 SkBitmap::Allocator* SkResourceCache::GetAllocator() { | 440 SkBitmap::Allocator* SkResourceCache::GetAllocator() { |
436 SkAutoMutexAcquire am(gMutex); | 441 SkAutoMutexAcquire am(gMutex); |
437 return get_cache()->allocator(); | 442 return get_cache()->allocator(); |
438 } | 443 } |
439 | 444 |
440 void SkResourceCache::Dump() { | 445 void SkResourceCache::Dump() { |
441 SkAutoMutexAcquire am(gMutex); | 446 SkAutoMutexAcquire am(gMutex); |
442 get_cache()->dump(); | 447 get_cache()->dump(); |
443 } | 448 } |
444 | 449 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 } | 493 } |
489 | 494 |
490 size_t SkGraphics::SetResourceCacheSingleAllocationByteLimit(size_t newLimit) { | 495 size_t SkGraphics::SetResourceCacheSingleAllocationByteLimit(size_t newLimit) { |
491 return SkResourceCache::SetSingleAllocationByteLimit(newLimit); | 496 return SkResourceCache::SetSingleAllocationByteLimit(newLimit); |
492 } | 497 } |
493 | 498 |
494 void SkGraphics::PurgeResourceCache() { | 499 void SkGraphics::PurgeResourceCache() { |
495 return SkResourceCache::PurgeAll(); | 500 return SkResourceCache::PurgeAll(); |
496 } | 501 } |
497 | 502 |
OLD | NEW |