| 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 CC_PRIORITIZED_RESOURCE_H_ | 5 #ifndef CC_PRIORITIZED_RESOURCE_H_ |
| 6 #define CC_PRIORITIZED_RESOURCE_H_ | 6 #define CC_PRIORITIZED_RESOURCE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 friend class PrioritizedResourceManager; | 115 friend class PrioritizedResourceManager; |
| 116 PrioritizedResource* m_owner; | 116 PrioritizedResource* m_owner; |
| 117 int m_priorityAtLastPriorityUpdate; | 117 int m_priorityAtLastPriorityUpdate; |
| 118 bool m_wasAbovePriorityCutoffAtLastPriorityUpdate; | 118 bool m_wasAbovePriorityCutoffAtLastPriorityUpdate; |
| 119 | 119 |
| 120 // Set if this is currently-drawing impl tree. | 120 // Set if this is currently-drawing impl tree. |
| 121 bool m_inDrawingImplTree; | 121 bool m_inDrawingImplTree; |
| 122 | 122 |
| 123 bool m_resourceHasBeenDeleted; | 123 bool m_resourceHasBeenDeleted; |
| 124 | 124 |
| 125 // Set when getEvictedBackings adds this backing to a list, and | |
| 126 // un-set unlinkEvictedBackings passes it back in. This must never | |
| 127 // be set when already true, and must be false when the backing is | |
| 128 // destroyed. | |
| 129 bool m_inMainThreadEvictedList; | |
| 130 #ifndef NDEBUG | 125 #ifndef NDEBUG |
| 131 ResourceProvider* m_resourceProvider; | 126 ResourceProvider* m_resourceProvider; |
| 132 #endif | 127 #endif |
| 133 DISALLOW_COPY_AND_ASSIGN(Backing); | 128 DISALLOW_COPY_AND_ASSIGN(Backing); |
| 134 }; | 129 }; |
| 135 | 130 |
| 136 PrioritizedResource(PrioritizedResourceManager*, gfx::Size, GLenum format); | 131 PrioritizedResource(PrioritizedResourceManager*, gfx::Size, GLenum format); |
| 137 | 132 |
| 138 bool isAbovePriorityCutoff() { return m_isAbovePriorityCutoff; } | 133 bool isAbovePriorityCutoff() { return m_isAbovePriorityCutoff; } |
| 139 void setAbovePriorityCutoff(bool isAbovePriorityCutoff) { m_isAbovePriorityC
utoff = isAbovePriorityCutoff; } | 134 void setAbovePriorityCutoff(bool isAbovePriorityCutoff) { m_isAbovePriorityC
utoff = isAbovePriorityCutoff; } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 154 | 149 |
| 155 Backing* m_backing; | 150 Backing* m_backing; |
| 156 PrioritizedResourceManager* m_manager; | 151 PrioritizedResourceManager* m_manager; |
| 157 | 152 |
| 158 DISALLOW_COPY_AND_ASSIGN(PrioritizedResource); | 153 DISALLOW_COPY_AND_ASSIGN(PrioritizedResource); |
| 159 }; | 154 }; |
| 160 | 155 |
| 161 } // namespace cc | 156 } // namespace cc |
| 162 | 157 |
| 163 #endif // CC_PRIORITIZED_RESOURCE_H_ | 158 #endif // CC_PRIORITIZED_RESOURCE_H_ |
| OLD | NEW |