| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 GrAtlasMgr::GrAtlasMgr(GrGpu* gpu) { | 164 GrAtlasMgr::GrAtlasMgr(GrGpu* gpu) { |
| 165 fGpu = gpu; | 165 fGpu = gpu; |
| 166 gpu->ref(); | 166 gpu->ref(); |
| 167 Gr_bzero(fTexture, sizeof(fTexture)); | 167 Gr_bzero(fTexture, sizeof(fTexture)); |
| 168 fPlotMgr = SkNEW_ARGS(GrPlotMgr, (GR_PLOT_WIDTH, GR_PLOT_HEIGHT)); | 168 fPlotMgr = SkNEW_ARGS(GrPlotMgr, (GR_PLOT_WIDTH, GR_PLOT_HEIGHT)); |
| 169 } | 169 } |
| 170 | 170 |
| 171 GrAtlasMgr::~GrAtlasMgr() { | 171 GrAtlasMgr::~GrAtlasMgr() { |
| 172 for (size_t i = 0; i < GR_ARRAY_COUNT(fTexture); i++) { | 172 for (size_t i = 0; i < GR_ARRAY_COUNT(fTexture); i++) { |
| 173 GrSafeUnref(fTexture[i]); | 173 SkSafeUnref(fTexture[i]); |
| 174 } | 174 } |
| 175 delete fPlotMgr; | 175 delete fPlotMgr; |
| 176 | 176 |
| 177 fGpu->unref(); | 177 fGpu->unref(); |
| 178 #if FONT_CACHE_STATS | 178 #if FONT_CACHE_STATS |
| 179 GrPrintf("Num uploads: %d\n", g_UploadCount); | 179 GrPrintf("Num uploads: %d\n", g_UploadCount); |
| 180 #endif | 180 #endif |
| 181 } | 181 } |
| 182 | 182 |
| 183 static GrPixelConfig maskformat2pixelconfig(GrMaskFormat format) { | 183 static GrPixelConfig maskformat2pixelconfig(GrMaskFormat format) { |
| (...skipping 59 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 |