| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 : m_inPruneResources(false), | 77 : m_inPruneResources(false), |
| 78 m_prunePending(false), | 78 m_prunePending(false), |
| 79 m_maxPruneDeferralDelay(cMaxPruneDeferralDelay), | 79 m_maxPruneDeferralDelay(cMaxPruneDeferralDelay), |
| 80 m_pruneTimeStamp(0.0), | 80 m_pruneTimeStamp(0.0), |
| 81 m_pruneFrameTimeStamp(0.0), | 81 m_pruneFrameTimeStamp(0.0), |
| 82 m_lastFramePaintTimeStamp(0.0), | 82 m_lastFramePaintTimeStamp(0.0), |
| 83 m_capacity(cDefaultCacheCapacity), | 83 m_capacity(cDefaultCacheCapacity), |
| 84 m_delayBeforeLiveDecodedPrune(cMinDelayBeforeLiveDecodedPrune), | 84 m_delayBeforeLiveDecodedPrune(cMinDelayBeforeLiveDecodedPrune), |
| 85 m_size(0) { | 85 m_size(0) { |
| 86 MemoryCacheDumpProvider::instance()->setMemoryCache(this); | 86 MemoryCacheDumpProvider::instance()->setMemoryCache(this); |
| 87 if (ProcessHeap::isLowEndDevice()) | 87 if (MemoryCoordinator::isLowEndDevice()) |
| 88 MemoryCoordinator::instance().registerClient(this); | 88 MemoryCoordinator::instance().registerClient(this); |
| 89 } | 89 } |
| 90 | 90 |
| 91 MemoryCache* MemoryCache::create() { | 91 MemoryCache* MemoryCache::create() { |
| 92 return new MemoryCache; | 92 return new MemoryCache; |
| 93 } | 93 } |
| 94 | 94 |
| 95 MemoryCache::~MemoryCache() { | 95 MemoryCache::~MemoryCache() { |
| 96 if (m_prunePending) | 96 if (m_prunePending) |
| 97 Platform::current()->currentThread()->removeTaskObserver(this); | 97 Platform::current()->currentThread()->removeTaskObserver(this); |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 return true; | 460 return true; |
| 461 } | 461 } |
| 462 | 462 |
| 463 void MemoryCache::onMemoryPressure(WebMemoryPressureLevel level) { | 463 void MemoryCache::onMemoryPressure(WebMemoryPressureLevel level) { |
| 464 pruneAll(); | 464 pruneAll(); |
| 465 } | 465 } |
| 466 | 466 |
| 467 } // namespace blink | 467 } // namespace blink |
| OLD | NEW |