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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 size_t minDeadCapacity() const { return m_minDeadCapacity; } | 216 size_t minDeadCapacity() const { return m_minDeadCapacity; } |
217 size_t maxDeadCapacity() const { return m_maxDeadCapacity; } | 217 size_t maxDeadCapacity() const { return m_maxDeadCapacity; } |
218 size_t capacity() const { return m_capacity; } | 218 size_t capacity() const { return m_capacity; } |
219 size_t liveSize() const { return m_liveSize; } | 219 size_t liveSize() const { return m_liveSize; } |
220 size_t deadSize() const { return m_deadSize; } | 220 size_t deadSize() const { return m_deadSize; } |
221 | 221 |
222 // Exposed for testing | 222 // Exposed for testing |
223 MemoryCacheLiveResourcePriority priority(Resource*) const; | 223 MemoryCacheLiveResourcePriority priority(Resource*) const; |
224 | 224 |
225 // TaskObserver implementation | 225 // TaskObserver implementation |
226 virtual void willProcessTask() override; | 226 void willProcessTask() override; |
227 virtual void didProcessTask() override; | 227 void didProcessTask() override; |
228 | 228 |
229 void pruneAll(); | 229 void pruneAll(); |
230 | 230 |
231 void updateFramePaintTimestamp(); | 231 void updateFramePaintTimestamp(); |
232 | 232 |
233 private: | 233 private: |
234 enum PruneStrategy { | 234 enum PruneStrategy { |
235 // Automatically decide how much to prune. | 235 // Automatically decide how much to prune. |
236 AutomaticPrune, | 236 AutomaticPrune, |
237 // Maximally prune resources. | 237 // Maximally prune resources. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 // Returns the global cache. | 322 // Returns the global cache. |
323 CORE_EXPORT MemoryCache* memoryCache(); | 323 CORE_EXPORT MemoryCache* memoryCache(); |
324 | 324 |
325 // Sets the global cache, used to swap in a test instance. Returns the old | 325 // Sets the global cache, used to swap in a test instance. Returns the old |
326 // MemoryCache object. | 326 // MemoryCache object. |
327 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); | 327 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); |
328 | 328 |
329 } | 329 } |
330 | 330 |
331 #endif | 331 #endif |
OLD | NEW |