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 CCPrioritizedTexture_h | 5 #ifndef CCPrioritizedTexture_h |
6 #define CCPrioritizedTexture_h | 6 #define CCPrioritizedTexture_h |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "CCPriorityCalculator.h" | 11 #include "CCPriorityCalculator.h" |
11 #include "CCResourceProvider.h" | 12 #include "CCResourceProvider.h" |
12 #include "CCTexture.h" | 13 #include "CCTexture.h" |
13 #include "GraphicsContext3D.h" | 14 #include "GraphicsContext3D.h" |
14 #include "IntRect.h" | 15 #include "IntRect.h" |
15 #include "IntSize.h" | 16 #include "IntSize.h" |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 | 19 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void deleteResource(CCResourceProvider*); | 100 void deleteResource(CCResourceProvider*); |
100 bool resourceHasBeenDeleted() const; | 101 bool resourceHasBeenDeleted() const; |
101 | 102 |
102 private: | 103 private: |
103 friend class CCPrioritizedTexture; | 104 friend class CCPrioritizedTexture; |
104 CCPrioritizedTexture* m_owner; | 105 CCPrioritizedTexture* m_owner; |
105 int m_priorityAtLastPriorityUpdate; | 106 int m_priorityAtLastPriorityUpdate; |
106 bool m_ownerExistedAtLastPriorityUpdate; | 107 bool m_ownerExistedAtLastPriorityUpdate; |
107 bool m_wasAbovePriorityCutoffAtLastPriorityUpdate; | 108 bool m_wasAbovePriorityCutoffAtLastPriorityUpdate; |
108 bool m_resourceHasBeenDeleted; | 109 bool m_resourceHasBeenDeleted; |
109 #ifndef NDEBUG | |
110 CCResourceProvider* m_resourceProvider; | 110 CCResourceProvider* m_resourceProvider; |
111 #endif | |
112 | 111 |
113 DISALLOW_COPY_AND_ASSIGN(Backing); | 112 DISALLOW_COPY_AND_ASSIGN(Backing); |
114 }; | 113 }; |
115 | 114 |
116 CCPrioritizedTexture(CCPrioritizedTextureManager*, IntSize, GC3Denum format)
; | 115 CCPrioritizedTexture(CCPrioritizedTextureManager*, IntSize, GC3Denum format)
; |
117 | 116 |
118 bool isAbovePriorityCutoff() { return m_isAbovePriorityCutoff; } | 117 bool isAbovePriorityCutoff() { return m_isAbovePriorityCutoff; } |
119 void setAbovePriorityCutoff(bool isAbovePriorityCutoff) { m_isAbovePriorityC
utoff = isAbovePriorityCutoff; } | 118 void setAbovePriorityCutoff(bool isAbovePriorityCutoff) { m_isAbovePriorityC
utoff = isAbovePriorityCutoff; } |
120 void setManagerInternal(CCPrioritizedTextureManager* manager) { m_manager =
manager; } | 119 void setManagerInternal(CCPrioritizedTextureManager* manager) { m_manager =
manager; } |
121 | 120 |
(...skipping 11 matching lines...) Expand all Loading... |
133 | 132 |
134 Backing* m_backing; | 133 Backing* m_backing; |
135 CCPrioritizedTextureManager* m_manager; | 134 CCPrioritizedTextureManager* m_manager; |
136 | 135 |
137 DISALLOW_COPY_AND_ASSIGN(CCPrioritizedTexture); | 136 DISALLOW_COPY_AND_ASSIGN(CCPrioritizedTexture); |
138 }; | 137 }; |
139 | 138 |
140 } // namespace cc | 139 } // namespace cc |
141 | 140 |
142 #endif | 141 #endif |
OLD | NEW |