Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: src/gpu/GrAtlas.cpp

Issue 388103002: Make GrAtlas::removePlot static (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrAtlas.h ('k') | src/gpu/GrTextStrike.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrAtlas.h ('k') | src/gpu/GrTextStrike.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698