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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "CCPrioritizedTextureManager.h" | 7 #include "CCPrioritizedTextureManager.h" |
8 | 8 |
9 #include "CCPrioritizedTexture.h" | 9 #include "CCPrioritizedTexture.h" |
10 #include "CCPriorityCalculator.h" | 10 #include "CCPriorityCalculator.h" |
11 #include "CCProxy.h" | 11 #include "CCProxy.h" |
12 #include "TraceEvent.h" | 12 #include "TraceEvent.h" |
13 #include <algorithm> | 13 #include <algorithm> |
14 | 14 |
15 using namespace std; | 15 using namespace std; |
16 | 16 |
17 namespace WebCore { | 17 namespace cc { |
18 | 18 |
19 CCPrioritizedTextureManager::CCPrioritizedTextureManager(size_t maxMemoryLimitBy
tes, int, int pool) | 19 CCPrioritizedTextureManager::CCPrioritizedTextureManager(size_t maxMemoryLimitBy
tes, int, int pool) |
20 : m_maxMemoryLimitBytes(maxMemoryLimitBytes) | 20 : m_maxMemoryLimitBytes(maxMemoryLimitBytes) |
21 , m_memoryUseBytes(0) | 21 , m_memoryUseBytes(0) |
22 , m_memoryAboveCutoffBytes(0) | 22 , m_memoryAboveCutoffBytes(0) |
23 , m_memoryAvailableBytes(0) | 23 , m_memoryAvailableBytes(0) |
24 , m_pool(pool) | 24 , m_pool(pool) |
25 { | 25 { |
26 } | 26 } |
27 | 27 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 for (BackingSet::iterator it = m_backings.begin(); it != m_backings.end(); +
+it) { | 355 for (BackingSet::iterator it = m_backings.begin(); it != m_backings.end(); +
+it) { |
356 if ((*it)->owner() && (*it)->owner()->isAbovePriorityCutoff()) | 356 if ((*it)->owner() && (*it)->owner()->isAbovePriorityCutoff()) |
357 reachedProtected = true; | 357 reachedProtected = true; |
358 if (reachedProtected) | 358 if (reachedProtected) |
359 ASSERT((*it)->owner() && (*it)->owner()->isAbovePriorityCutoff()); | 359 ASSERT((*it)->owner() && (*it)->owner()->isAbovePriorityCutoff()); |
360 } | 360 } |
361 } | 361 } |
362 #endif | 362 #endif |
363 | 363 |
364 | 364 |
365 } // namespace WebCore | 365 } // namespace cc |
OLD | NEW |