OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/prioritized_resource_manager.h" | 5 #include "cc/prioritized_resource_manager.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "cc/prioritized_resource.h" | 9 #include "cc/prioritized_resource.h" |
10 #include "cc/priority_calculator.h" | 10 #include "cc/priority_calculator.h" |
11 #include "cc/proxy.h" | 11 #include "cc/proxy.h" |
12 #include <algorithm> | 12 #include <algorithm> |
13 | 13 |
14 using namespace std; | 14 using namespace std; |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 | 17 |
18 PrioritizedResourceManager::PrioritizedResourceManager(size_t maxMemoryLimitByte
s, int, int pool, const Proxy* proxy) | 18 PrioritizedResourceManager::PrioritizedResourceManager(int pool, const Proxy* pr
oxy) |
19 : m_proxy(proxy) | 19 : m_proxy(proxy) |
20 , m_maxMemoryLimitBytes(maxMemoryLimitBytes) | 20 , m_maxMemoryLimitBytes(defaultMemoryAllocationLimit()) |
21 , m_externalPriorityCutoff(PriorityCalculator::allowEverythingCutoff()) | 21 , m_externalPriorityCutoff(PriorityCalculator::allowEverythingCutoff()) |
22 , m_memoryUseBytes(0) | 22 , m_memoryUseBytes(0) |
23 , m_memoryAboveCutoffBytes(0) | 23 , m_memoryAboveCutoffBytes(0) |
24 , m_memoryAvailableBytes(0) | 24 , m_memoryAvailableBytes(0) |
25 , m_pool(pool) | 25 , m_pool(pool) |
26 , m_backingsTailNotSorted(false) | 26 , m_backingsTailNotSorted(false) |
27 , m_memoryVisibleBytes(0) | 27 , m_memoryVisibleBytes(0) |
28 , m_memoryVisibleAndNearbyBytes(0) | 28 , m_memoryVisibleAndNearbyBytes(0) |
29 , m_memoryVisibleLastPushedBytes(0) | 29 , m_memoryVisibleLastPushedBytes(0) |
30 , m_memoryVisibleAndNearbyLastPushedBytes(0) | 30 , m_memoryVisibleAndNearbyLastPushedBytes(0) |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 } | 470 } |
471 #endif | 471 #endif |
472 } | 472 } |
473 | 473 |
474 const Proxy* PrioritizedResourceManager::proxyForDebug() const | 474 const Proxy* PrioritizedResourceManager::proxyForDebug() const |
475 { | 475 { |
476 return m_proxy; | 476 return m_proxy; |
477 } | 477 } |
478 | 478 |
479 } // namespace cc | 479 } // namespace cc |
OLD | NEW |