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 "CCPriorityCalculator.h" | 8 #include "CCPriorityCalculator.h" |
9 #include "CCResourceProvider.h" | 9 #include "CCResourceProvider.h" |
10 #include "CCTexture.h" | 10 #include "CCTexture.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 class Backing : public CCTexture { | 87 class Backing : public CCTexture { |
88 WTF_MAKE_NONCOPYABLE(Backing); | 88 WTF_MAKE_NONCOPYABLE(Backing); |
89 public: | 89 public: |
90 Backing(unsigned id, CCResourceProvider*, IntSize, GC3Denum format); | 90 Backing(unsigned id, CCResourceProvider*, IntSize, GC3Denum format); |
91 ~Backing(); | 91 ~Backing(); |
92 void updatePriority(); | 92 void updatePriority(); |
93 | 93 |
94 CCPrioritizedTexture* owner() { return m_owner; } | 94 CCPrioritizedTexture* owner() { return m_owner; } |
95 bool hadOwnerAtLastPriorityUpdate() const { return m_ownerExistedAtLastP
riorityUpdate; } | 95 bool hadOwnerAtLastPriorityUpdate() const { return m_ownerExistedAtLastP
riorityUpdate; } |
96 bool requestPriorityAtLastPriorityUpdate() const { return m_priorityAtLa
stPriorityUpdate; } | 96 int requestPriorityAtLastPriorityUpdate() const { return m_priorityAtLas
tPriorityUpdate; } |
97 bool wasAbovePriorityCutoffAtLastPriorityUpdate() const { return m_wasAb
ovePriorityCutoffAtLastPriorityUpdate; } | 97 bool wasAbovePriorityCutoffAtLastPriorityUpdate() const { return m_wasAb
ovePriorityCutoffAtLastPriorityUpdate; } |
98 | 98 |
99 void deleteResource(CCResourceProvider*); | 99 void deleteResource(CCResourceProvider*); |
100 bool resourceHasBeenDeleted() const; | 100 bool resourceHasBeenDeleted() const; |
101 | 101 |
102 private: | 102 private: |
103 friend class CCPrioritizedTexture; | 103 friend class CCPrioritizedTexture; |
104 CCPrioritizedTexture* m_owner; | 104 CCPrioritizedTexture* m_owner; |
105 int m_priorityAtLastPriorityUpdate; | 105 int m_priorityAtLastPriorityUpdate; |
106 bool m_ownerExistedAtLastPriorityUpdate; | 106 bool m_ownerExistedAtLastPriorityUpdate; |
(...skipping 22 matching lines...) Expand all Loading... |
129 bool m_isAbovePriorityCutoff; | 129 bool m_isAbovePriorityCutoff; |
130 bool m_isSelfManaged; | 130 bool m_isSelfManaged; |
131 | 131 |
132 Backing* m_backing; | 132 Backing* m_backing; |
133 CCPrioritizedTextureManager* m_manager; | 133 CCPrioritizedTextureManager* m_manager; |
134 }; | 134 }; |
135 | 135 |
136 } // namespace cc | 136 } // namespace cc |
137 | 137 |
138 #endif | 138 #endif |
OLD | NEW |