| 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) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 | 6 |
| 7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
| 8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
| 9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
| 10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 m_lastFramePaintTimeStamp(0.0), | 100 m_lastFramePaintTimeStamp(0.0), |
| 101 m_capacity(cDefaultCacheCapacity), | 101 m_capacity(cDefaultCacheCapacity), |
| 102 m_minDeadCapacity(0), | 102 m_minDeadCapacity(0), |
| 103 m_maxDeadCapacity(cDefaultCacheCapacity), | 103 m_maxDeadCapacity(cDefaultCacheCapacity), |
| 104 m_maxDeferredPruneDeadCapacity(cDeferredPruneDeadCapacityFactor * | 104 m_maxDeferredPruneDeadCapacity(cDeferredPruneDeadCapacityFactor * |
| 105 cDefaultCacheCapacity), | 105 cDefaultCacheCapacity), |
| 106 m_delayBeforeLiveDecodedPrune(cMinDelayBeforeLiveDecodedPrune), | 106 m_delayBeforeLiveDecodedPrune(cMinDelayBeforeLiveDecodedPrune), |
| 107 m_liveSize(0), | 107 m_liveSize(0), |
| 108 m_deadSize(0) { | 108 m_deadSize(0) { |
| 109 MemoryCacheDumpProvider::instance()->setMemoryCache(this); | 109 MemoryCacheDumpProvider::instance()->setMemoryCache(this); |
| 110 if (ProcessHeap::isLowEndDevice()) | 110 if (MemoryCoordinator::instance().isLowEndDevice()) |
| 111 MemoryCoordinator::instance().registerClient(this); | 111 MemoryCoordinator::instance().registerClient(this); |
| 112 } | 112 } |
| 113 | 113 |
| 114 MemoryCache* MemoryCache::create() { | 114 MemoryCache* MemoryCache::create() { |
| 115 return new MemoryCache; | 115 return new MemoryCache; |
| 116 } | 116 } |
| 117 | 117 |
| 118 MemoryCache::~MemoryCache() { | 118 MemoryCache::~MemoryCache() { |
| 119 if (m_prunePending) | 119 if (m_prunePending) |
| 120 Platform::current()->currentThread()->removeTaskObserver(this); | 120 Platform::current()->currentThread()->removeTaskObserver(this); |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 bool MemoryCache::isInSameLRUListForTest(const Resource* x, const Resource* y) { | 779 bool MemoryCache::isInSameLRUListForTest(const Resource* x, const Resource* y) { |
| 780 MemoryCacheEntry* ex = getEntryForResource(x); | 780 MemoryCacheEntry* ex = getEntryForResource(x); |
| 781 MemoryCacheEntry* ey = getEntryForResource(y); | 781 MemoryCacheEntry* ey = getEntryForResource(y); |
| 782 DCHECK(ex); | 782 DCHECK(ex); |
| 783 DCHECK(ey); | 783 DCHECK(ey); |
| 784 return lruListFor(ex->m_accessCount, x->size()) == | 784 return lruListFor(ex->m_accessCount, x->size()) == |
| 785 lruListFor(ey->m_accessCount, y->size()); | 785 lruListFor(ey->m_accessCount, y->size()); |
| 786 } | 786 } |
| 787 | 787 |
| 788 } // namespace blink | 788 } // namespace blink |
| OLD | NEW |