Home | History | Annotate | Download | only in effects

Lines Matching refs:row

89 void GrTextureStripAtlas::lockRow(int row) {
90 // This should only be called on a row that is already locked.
91 SkASSERT(fRows[row].fLocks);
92 fRows[row].fLocks++;
119 // We already have the data in a row, so we can just return that row
120 AtlasRow* row = fKeyTable[index];
121 if (0 == row->fLocks) {
122 this->removeFromLRU(row);
124 ++row->fLocks;
128 // required for storing row numbers and just compute it with some pointer arithmetic
129 rowNumber = static_cast<int>(row - fRows);
134 // We don't have this data cached, so pick the least recently used row to copy into
135 AtlasRow* row = this->getLRU();
139 if (nullptr == row) {
142 row = this->getLRU();
143 if (nullptr == row) {
149 this->removeFromLRU(row);
151 uint32_t oldKey = row->fKey;
153 // If we are writing into a row that already held bitmap data, we need to remove the
167 row->fKey = key;
168 row->fLocks = 1;
169 fKeyTable.insert(index, 1, &row);
170 rowNumber = static_cast<int>(row - fRows);
191 void GrTextureStripAtlas::unlockRow(int row) {
193 --fRows[row].fLocks;
195 SkASSERT(fRows[row].fLocks >= 0 && fLockedRows >= 0);
196 if (0 == fRows[row].fLocks) {
197 this->appendLRU(fRows + row);
207 AtlasRow* row = fLRUFront;
208 return row;
265 void GrTextureStripAtlas::appendLRU(AtlasRow* row) {
266 SkASSERT(nullptr == row->fPrev && nullptr == row->fNext);
268 fLRUFront = row;
269 fLRUBack = row;
271 row->fPrev = fLRUBack;
272 fLRUBack->fNext = row;
273 fLRUBack = row;
277 void GrTextureStripAtlas::removeFromLRU(AtlasRow* row) {
278 SkASSERT(row);
279 if (row->fNext && row->fPrev) {
280 row->fPrev->fNext = row->fNext;
281 row->fNext->fPrev = row->fPrev;
283 if (nullptr == row->fNext) {
284 SkASSERT(row == fLRUBack);
285 fLRUBack = row->fPrev;
290 if (nullptr == row->fPrev) {
291 SkASSERT(row == fLRUFront);
292 fLRUFront = row->fNext;
298 row->fNext = nullptr;
299 row->fPrev = nullptr;
361 // Our count of locks should equal the sum of row locks, unless we ran out of rows and flushed,
363 // lock of a row; which ensures we don't unlock the texture prematurely).
366 // We should have one lru entry for each free row