| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
| 4 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 5 | 5 |
| 6 This library is free software; you can redistribute it and/or | 6 This library is free software; you can redistribute it and/or |
| 7 modify it under the terms of the GNU Library General Public | 7 modify it under the terms of the GNU Library General Public |
| 8 License as published by the Free Software Foundation; either | 8 License as published by the Free Software Foundation; either |
| 9 version 2 of the License, or (at your option) any later version. | 9 version 2 of the License, or (at your option) any later version. |
| 10 | 10 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 void setCapacities(size_t minDeadBytes, | 182 void setCapacities(size_t minDeadBytes, |
| 183 size_t maxDeadBytes, | 183 size_t maxDeadBytes, |
| 184 size_t totalBytes); | 184 size_t totalBytes); |
| 185 void setDelayBeforeLiveDecodedPrune(double seconds) { | 185 void setDelayBeforeLiveDecodedPrune(double seconds) { |
| 186 m_delayBeforeLiveDecodedPrune = seconds; | 186 m_delayBeforeLiveDecodedPrune = seconds; |
| 187 } | 187 } |
| 188 void setMaxPruneDeferralDelay(double seconds) { | 188 void setMaxPruneDeferralDelay(double seconds) { |
| 189 m_maxPruneDeferralDelay = seconds; | 189 m_maxPruneDeferralDelay = seconds; |
| 190 } | 190 } |
| 191 | 191 |
| 192 void evictResources(); | 192 enum EvictResourcePolicy { EvictAllResources, DoNotEvictUnusedPreloads }; |
| 193 void evictResources(EvictResourcePolicy = EvictAllResources); |
| 193 | 194 |
| 194 void prune(); | 195 void prune(); |
| 195 | 196 |
| 196 // Called to adjust a resource's size, lru list position, and access count. | 197 // Called to adjust a resource's size, lru list position, and access count. |
| 197 void update(Resource*, | 198 void update(Resource*, |
| 198 size_t oldSize, | 199 size_t oldSize, |
| 199 size_t newSize, | 200 size_t newSize, |
| 200 bool wasAccessed = false); | 201 bool wasAccessed = false); |
| 201 void updateForAccess(Resource* resource) { | 202 void updateForAccess(Resource* resource) { |
| 202 update(resource, resource->size(), resource->size(), true); | 203 update(resource, resource->size(), resource->size(), true); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // Returns the global cache. | 310 // Returns the global cache. |
| 310 CORE_EXPORT MemoryCache* memoryCache(); | 311 CORE_EXPORT MemoryCache* memoryCache(); |
| 311 | 312 |
| 312 // Sets the global cache, used to swap in a test instance. Returns the old | 313 // Sets the global cache, used to swap in a test instance. Returns the old |
| 313 // MemoryCache object. | 314 // MemoryCache object. |
| 314 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); | 315 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); |
| 315 | 316 |
| 316 } // namespace blink | 317 } // namespace blink |
| 317 | 318 |
| 318 #endif | 319 #endif |
| OLD | NEW |