Home | History | Annotate | Download | only in effects

Lines Matching refs:row

101         // We already have the data in a row, so we can just return that row
102 AtlasRow* row = fKeyTable[index];
103 if (0 == row->fLocks) {
104 this->removeFromLRU(row);
106 ++row->fLocks;
110 // required for storing row numbers and just compute it with some pointer arithmetic
111 rowNumber = static_cast<int>(row - fRows);
116 // We don't have this data cached, so pick the least recently used row to copy into
117 AtlasRow* row = this->getLRU();
121 if (NULL == row) {
124 row = this->getLRU();
125 if (NULL == row) {
131 this->removeFromLRU(row);
133 uint32_t oldKey = row->fKey;
135 // If we are writing into a row that already held bitmap data, we need to remove the
149 row->fKey = key;
150 row->fLocks = 1;
151 fKeyTable.insert(index, 1, &row);
152 rowNumber = static_cast<int>(row - fRows);
172 void GrTextureStripAtlas::unlockRow(int row) {
174 --fRows[row].fLocks;
176 GrAssert(fRows[row].fLocks >= 0 && fLockedRows >= 0);
177 if (0 == fRows[row].fLocks) {
178 this->appendLRU(fRows + row);
188 AtlasRow* row = fLRUFront;
189 return row;
236 void GrTextureStripAtlas::appendLRU(AtlasRow* row) {
237 GrAssert(NULL == row->fPrev && NULL == row->fNext);
239 fLRUFront = row;
240 fLRUBack = row;
242 row->fPrev = fLRUBack;
243 fLRUBack->fNext = row;
244 fLRUBack = row;
248 void GrTextureStripAtlas::removeFromLRU(AtlasRow* row) {
249 GrAssert(NULL != row);
250 if (NULL != row->fNext && NULL != row->fPrev) {
251 row->fPrev->fNext = row->fNext;
252 row->fNext->fPrev = row->fPrev;
254 if (NULL == row->fNext) {
255 GrAssert(row == fLRUBack);
256 fLRUBack = row->fPrev;
261 if (NULL == row->fPrev) {
262 GrAssert(row == fLRUFront);
263 fLRUFront = row->fNext;
269 row->fNext = NULL;
270 row->fPrev = NULL;
332 // Our count of locks should equal the sum of row locks, unless we ran out of rows and flushed,
334 // lock of a row; which ensures we don't unlock the texture prematurely).
337 // We should have one lru entry for each free row