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 #include "GrAtlas.h" | 9 #include "GrAtlas.h" |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 } | 183 } |
184 } | 184 } |
185 | 185 |
186 GrAtlas::~GrAtlas() { | 186 GrAtlas::~GrAtlas() { |
187 SkSafeUnref(fTexture); | 187 SkSafeUnref(fTexture); |
188 SkDELETE_ARRAY(fPlotArray); | 188 SkDELETE_ARRAY(fPlotArray); |
189 | 189 |
190 fGpu->unref(); | 190 fGpu->unref(); |
191 #if FONT_CACHE_STATS | 191 #if FONT_CACHE_STATS |
192 GrPrintf("Num uploads: %d\n", g_UploadCount); | 192 SkDebugf("Num uploads: %d\n", g_UploadCount); |
193 #endif | 193 #endif |
194 } | 194 } |
195 | 195 |
196 void GrAtlas::makeMRU(GrPlot* plot) { | 196 void GrAtlas::makeMRU(GrPlot* plot) { |
197 if (fPlotList.head() == plot) { | 197 if (fPlotList.head() == plot) { |
198 return; | 198 return; |
199 } | 199 } |
200 | 200 |
201 fPlotList.remove(plot); | 201 fPlotList.remove(plot); |
202 fPlotList.addToHead(plot); | 202 fPlotList.addToHead(plot); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 if (fBatchUploads) { | 278 if (fBatchUploads) { |
279 GrPlotList::Iter plotIter; | 279 GrPlotList::Iter plotIter; |
280 plotIter.init(fPlotList, GrPlotList::Iter::kHead_IterStart); | 280 plotIter.init(fPlotList, GrPlotList::Iter::kHead_IterStart); |
281 GrPlot* plot; | 281 GrPlot* plot; |
282 while ((plot = plotIter.get())) { | 282 while ((plot = plotIter.get())) { |
283 plot->uploadToTexture(); | 283 plot->uploadToTexture(); |
284 plotIter.next(); | 284 plotIter.next(); |
285 } | 285 } |
286 } | 286 } |
287 } | 287 } |
OLD | NEW |