| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2012 Google Inc. | 2  * Copyright 2012 Google Inc. | 
| 3  * | 3  * | 
| 4  * Use of this source code is governed by a BSD-style license that can be | 4  * Use of this source code is governed by a BSD-style license that can be | 
| 5  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 6  */ | 6  */ | 
| 7 | 7 | 
| 8 #ifndef GrTextureStripAtlas_DEFINED | 8 #ifndef GrTextureStripAtlas_DEFINED | 
| 9 #define GrTextureStripAtlas_DEFINED | 9 #define GrTextureStripAtlas_DEFINED | 
| 10 | 10 | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 72 | 72 | 
| 73 private: | 73 private: | 
| 74 | 74 | 
| 75     // Key to indicate an atlas row without any meaningful data stored in it | 75     // Key to indicate an atlas row without any meaningful data stored in it | 
| 76     const static uint32_t kEmptyAtlasRowKey = 0xffffffff; | 76     const static uint32_t kEmptyAtlasRowKey = 0xffffffff; | 
| 77 | 77 | 
| 78     /** | 78     /** | 
| 79      * The state of a single row in our cache, next/prev pointers allow these to
      be chained | 79      * The state of a single row in our cache, next/prev pointers allow these to
      be chained | 
| 80      * together to represent LRU status | 80      * together to represent LRU status | 
| 81      */ | 81      */ | 
| 82     struct AtlasRow : public SkNoncopyable { | 82     struct AtlasRow : SkNoncopyable { | 
| 83         AtlasRow() : fKey(kEmptyAtlasRowKey), fLocks(0), fNext(NULL), fPrev(NULL
     ) { } | 83         AtlasRow() : fKey(kEmptyAtlasRowKey), fLocks(0), fNext(NULL), fPrev(NULL
     ) { } | 
| 84         // GenerationID of the bitmap that is represented by this row, 0xfffffff
     f means "empty" | 84         // GenerationID of the bitmap that is represented by this row, 0xfffffff
     f means "empty" | 
| 85         uint32_t fKey; | 85         uint32_t fKey; | 
| 86         // How many times this has been locked (0 == unlocked) | 86         // How many times this has been locked (0 == unlocked) | 
| 87         int32_t fLocks; | 87         int32_t fLocks; | 
| 88         // We maintain an LRU linked list between unlocked nodes with these poin
     ters | 88         // We maintain an LRU linked list between unlocked nodes with these poin
     ters | 
| 89         AtlasRow* fNext; | 89         AtlasRow* fNext; | 
| 90         AtlasRow* fPrev; | 90         AtlasRow* fPrev; | 
| 91     }; | 91     }; | 
| 92 | 92 | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 185                                                       const AtlasHashKey& key) { | 185                                                       const AtlasHashKey& key) { | 
| 186     return entry.fKey == key; | 186     return entry.fKey == key; | 
| 187 } | 187 } | 
| 188 | 188 | 
| 189 inline bool GrTextureStripAtlas::AtlasHashKey::LessThan(const AtlasEntry& entry, | 189 inline bool GrTextureStripAtlas::AtlasHashKey::LessThan(const AtlasEntry& entry, | 
| 190                                                         const AtlasHashKey& key)
      { | 190                                                         const AtlasHashKey& key)
      { | 
| 191     return entry.fKey < key; | 191     return entry.fKey < key; | 
| 192 } | 192 } | 
| 193 | 193 | 
| 194 #endif | 194 #endif | 
| OLD | NEW | 
|---|