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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 *(usage->fPlots.append()) = plot; | 248 *(usage->fPlots.append()) = plot; |
249 return plot; | 249 return plot; |
250 } | 250 } |
251 plotIter.next(); | 251 plotIter.next(); |
252 } | 252 } |
253 | 253 |
254 // If the above fails, then the current plot list has no room | 254 // If the above fails, then the current plot list has no room |
255 return NULL; | 255 return NULL; |
256 } | 256 } |
257 | 257 |
258 void GrAtlas::removePlot(ClientPlotUsage* usage, const GrPlot* plot) { | 258 void GrAtlas::RemovePlot(ClientPlotUsage* usage, const GrPlot* plot) { |
259 int index = usage->fPlots.find(const_cast<GrPlot*>(plot)); | 259 int index = usage->fPlots.find(const_cast<GrPlot*>(plot)); |
260 if (index >= 0) { | 260 if (index >= 0) { |
261 usage->fPlots.remove(index); | 261 usage->fPlots.remove(index); |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 // get a plot that's not being used by the current draw | 265 // get a plot that's not being used by the current draw |
266 GrPlot* GrAtlas::getUnusedPlot() { | 266 GrPlot* GrAtlas::getUnusedPlot() { |
267 GrPlotList::Iter plotIter; | 267 GrPlotList::Iter plotIter; |
268 plotIter.init(fPlotList, GrPlotList::Iter::kTail_IterStart); | 268 plotIter.init(fPlotList, GrPlotList::Iter::kTail_IterStart); |
(...skipping 12 matching lines...) Expand all Loading... |
281 if (fBatchUploads) { | 281 if (fBatchUploads) { |
282 GrPlotList::Iter plotIter; | 282 GrPlotList::Iter plotIter; |
283 plotIter.init(fPlotList, GrPlotList::Iter::kHead_IterStart); | 283 plotIter.init(fPlotList, GrPlotList::Iter::kHead_IterStart); |
284 GrPlot* plot; | 284 GrPlot* plot; |
285 while (NULL != (plot = plotIter.get())) { | 285 while (NULL != (plot = plotIter.get())) { |
286 plot->uploadToTexture(); | 286 plot->uploadToTexture(); |
287 plotIter.next(); | 287 plotIter.next(); |
288 } | 288 } |
289 } | 289 } |
290 } | 290 } |
OLD | NEW |