| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 default: | 191 default: |
| 192 SkASSERT(!"unknown maskformat"); | 192 SkASSERT(!"unknown maskformat"); |
| 193 } | 193 } |
| 194 return kUnknown_GrPixelConfig; | 194 return kUnknown_GrPixelConfig; |
| 195 } | 195 } |
| 196 | 196 |
| 197 GrAtlas* GrAtlasMgr::addToAtlas(GrAtlas** atlas, | 197 GrAtlas* GrAtlasMgr::addToAtlas(GrAtlas** atlas, |
| 198 int width, int height, const void* image, | 198 int width, int height, const void* image, |
| 199 GrMaskFormat format, | 199 GrMaskFormat format, |
| 200 GrIPoint16* loc) { | 200 GrIPoint16* loc) { |
| 201 GrAssert(NULL == *atlas || (*atlas)->getMaskFormat() == format); | 201 SkASSERT(NULL == *atlas || (*atlas)->getMaskFormat() == format); |
| 202 | 202 |
| 203 // iterate through entire atlas list, see if we can find a hole | 203 // iterate through entire atlas list, see if we can find a hole |
| 204 GrAtlas* atlasIter = *atlas; | 204 GrAtlas* atlasIter = *atlas; |
| 205 while (atlasIter) { | 205 while (atlasIter) { |
| 206 if (atlasIter->addSubImage(width, height, image, loc)) { | 206 if (atlasIter->addSubImage(width, height, image, loc)) { |
| 207 return atlasIter; | 207 return atlasIter; |
| 208 } | 208 } |
| 209 atlasIter = atlasIter->fNext; | 209 atlasIter = atlasIter->fNext; |
| 210 } | 210 } |
| 211 | 211 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 newAtlas->fNext = *atlas; | 243 newAtlas->fNext = *atlas; |
| 244 *atlas = newAtlas; | 244 *atlas = newAtlas; |
| 245 | 245 |
| 246 return newAtlas; | 246 return newAtlas; |
| 247 } | 247 } |
| 248 | 248 |
| 249 void GrAtlasMgr::freePlot(GrMaskFormat format, int x, int y) { | 249 void GrAtlasMgr::freePlot(GrMaskFormat format, int x, int y) { |
| 250 SkASSERT(fPlotMgr->isBusy(x, y)); | 250 SkASSERT(fPlotMgr->isBusy(x, y)); |
| 251 fPlotMgr->freePlot(x, y); | 251 fPlotMgr->freePlot(x, y); |
| 252 } | 252 } |
| OLD | NEW |