| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 static GrPixelConfig maskformat2pixelconfig(GrMaskFormat format) { | 183 static GrPixelConfig maskformat2pixelconfig(GrMaskFormat format) { |
| 184 switch (format) { | 184 switch (format) { |
| 185 case kA8_GrMaskFormat: | 185 case kA8_GrMaskFormat: |
| 186 return kAlpha_8_GrPixelConfig; | 186 return kAlpha_8_GrPixelConfig; |
| 187 case kA565_GrMaskFormat: | 187 case kA565_GrMaskFormat: |
| 188 return kRGB_565_GrPixelConfig; | 188 return kRGB_565_GrPixelConfig; |
| 189 case kA888_GrMaskFormat: | 189 case kA888_GrMaskFormat: |
| 190 return kSkia8888_GrPixelConfig; | 190 return kSkia8888_GrPixelConfig; |
| 191 default: | 191 default: |
| 192 SkASSERT(!"unknown maskformat"); | 192 SkDEBUGFAIL("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 SkASSERT(NULL == *atlas || (*atlas)->getMaskFormat() == format); | 201 SkASSERT(NULL == *atlas || (*atlas)->getMaskFormat() == format); |
| 202 | 202 |
| (...skipping 40 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 |