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 #ifndef CCPrioritizedTextureManager_h | 5 #ifndef CCPrioritizedTextureManager_h |
6 #define CCPrioritizedTextureManager_h | 6 #define CCPrioritizedTextureManager_h |
7 | 7 |
| 8 #include "base/basictypes.h" |
8 #include "CCPrioritizedTexture.h" | 9 #include "CCPrioritizedTexture.h" |
9 #include "CCPriorityCalculator.h" | 10 #include "CCPriorityCalculator.h" |
10 #include "CCTexture.h" | 11 #include "CCTexture.h" |
11 #include "GraphicsContext3D.h" | 12 #include "GraphicsContext3D.h" |
12 #include "IntRect.h" | 13 #include "IntRect.h" |
13 #include "IntSize.h" | 14 #include "IntSize.h" |
14 #include <wtf/HashSet.h> | 15 #include <wtf/HashSet.h> |
15 #include <wtf/ListHashSet.h> | 16 #include <wtf/ListHashSet.h> |
16 #include <wtf/Vector.h> | 17 #include <wtf/Vector.h> |
17 | 18 |
18 namespace cc { | 19 namespace cc { |
19 | 20 |
20 class CCPrioritizedTexture; | 21 class CCPrioritizedTexture; |
21 class CCPriorityCalculator; | 22 class CCPriorityCalculator; |
22 | 23 |
23 class CCPrioritizedTextureManager { | 24 class CCPrioritizedTextureManager { |
24 WTF_MAKE_NONCOPYABLE(CCPrioritizedTextureManager); | |
25 public: | 25 public: |
26 static PassOwnPtr<CCPrioritizedTextureManager> create(size_t maxMemoryLimitB
ytes, int maxTextureSize, int pool) | 26 static PassOwnPtr<CCPrioritizedTextureManager> create(size_t maxMemoryLimitB
ytes, int maxTextureSize, int pool) |
27 { | 27 { |
28 return adoptPtr(new CCPrioritizedTextureManager(maxMemoryLimitBytes, max
TextureSize, pool)); | 28 return adoptPtr(new CCPrioritizedTextureManager(maxMemoryLimitBytes, max
TextureSize, pool)); |
29 } | 29 } |
30 PassOwnPtr<CCPrioritizedTexture> createTexture(IntSize size, GC3Denum format
) | 30 PassOwnPtr<CCPrioritizedTexture> createTexture(IntSize size, GC3Denum format
) |
31 { | 31 { |
32 return adoptPtr(new CCPrioritizedTexture(this, size, format)); | 32 return adoptPtr(new CCPrioritizedTexture(this, size, format)); |
33 } | 33 } |
34 ~CCPrioritizedTextureManager(); | 34 ~CCPrioritizedTextureManager(); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 TextureSet m_textures; | 132 TextureSet m_textures; |
133 BackingSet m_backings; | 133 BackingSet m_backings; |
134 BackingVector m_evictedBackings; | 134 BackingVector m_evictedBackings; |
135 | 135 |
136 TextureVector m_tempTextureVector; | 136 TextureVector m_tempTextureVector; |
137 BackingVector m_tempBackingVector; | 137 BackingVector m_tempBackingVector; |
138 | 138 |
139 // Set by the main thread when it adjust priorities in such a way that | 139 // Set by the main thread when it adjust priorities in such a way that |
140 // the m_backings array's view of priorities is now out of date. | 140 // the m_backings array's view of priorities is now out of date. |
141 bool m_needsUpdateBackingsPrioritites; | 141 bool m_needsUpdateBackingsPrioritites; |
| 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(CCPrioritizedTextureManager); |
142 }; | 144 }; |
143 | 145 |
144 } // cc | 146 } // namespace cc |
145 | 147 |
146 #endif | 148 #endif |
OLD | NEW |