void MemoryCache::prune() { if (m_liveSize + m_deadSize <= m_capacity && m_maxDeadCapacity && m_deadSize <= m_maxDeadCapacity) // Fast path. return; pruneDeadResources(); // Prune dead first, in case it was "borrowing" capacity from live. pruneLiveResources(); }
void MemoryCache::prune() { if (!needsPruning()) return; pruneDeadResources(); // Prune dead first, in case it was "borrowing" capacity from live. pruneLiveResources(); }
void MemoryCache::prune() { if (m_liveSize + m_deadSize <= m_capacity && m_maxDeadCapacity && m_deadSize <= m_maxDeadCapacity) // Fast path. return; if (m_inPruneResources) return; TemporaryChange<bool> reentrancyProtector(m_inPruneResources, true); pruneDeadResources(); // Prune dead first, in case it was "borrowing" capacity from live. pruneLiveResources(); }
void MemoryCache::pruneNow(double currentTime) { if (m_prunePending) { m_prunePending = false; blink::Platform::current()->currentThread()->removeTaskObserver(this); } TemporaryChange<bool> reentrancyProtector(m_inPruneResources, true); pruneDeadResources(); // Prune dead first, in case it was "borrowing" capacity from live. pruneLiveResources(); m_pruneFrameTimeStamp = FrameView::currentFrameTimeStamp(); m_pruneTimeStamp = currentTime; }