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

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

Issue 1430403002: Disable preemptive batch preparation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Disabled pre-emptive preparation Created 5 years, 1 month 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 | « no previous file | src/gpu/GrBatchFlushState.h » ('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 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrBatchAtlas.h" 8 #include "GrBatchAtlas.h"
9 #include "GrBatchFlushState.h" 9 #include "GrBatchFlushState.h"
10 #include "GrRectanizer.h" 10 #include "GrRectanizer.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 this->processEviction(plot->id()); 324 this->processEviction(plot->id());
325 fPlotList.remove(plot); 325 fPlotList.remove(plot);
326 SkAutoTUnref<BatchPlot>& newPlot = fPlotArray[plot->index()]; 326 SkAutoTUnref<BatchPlot>& newPlot = fPlotArray[plot->index()];
327 newPlot.reset(plot->clone()); 327 newPlot.reset(plot->clone());
328 328
329 fPlotList.addToHead(newPlot.get()); 329 fPlotList.addToHead(newPlot.get());
330 SkASSERT(GrBytesPerPixel(fTexture->desc().fConfig) == newPlot->bpp()); 330 SkASSERT(GrBytesPerPixel(fTexture->desc().fConfig) == newPlot->bpp());
331 SkDEBUGCODE(bool verify = )newPlot->addSubImage(width, height, image, loc); 331 SkDEBUGCODE(bool verify = )newPlot->addSubImage(width, height, image, loc);
332 SkASSERT(verify); 332 SkASSERT(verify);
333 333
334 // Note that this plot will be uploaded inline with the draws whereas the
335 // one it displaced most likely was uploaded asap.
334 newPlot->setLastUploadToken(batchTarget->currentToken()); 336 newPlot->setLastUploadToken(batchTarget->currentToken());
335 SkAutoTUnref<GrPlotUploader> uploader(new GrPlotUploader(newPlot, fTexture)) ; 337 SkAutoTUnref<GrPlotUploader> uploader(new GrPlotUploader(newPlot, fTexture)) ;
336 batchTarget->upload(uploader); 338 batchTarget->upload(uploader);
337 *id = newPlot->id(); 339 *id = newPlot->id();
338 340
339 fAtlasGeneration++; 341 fAtlasGeneration++;
340 return true; 342 return true;
341 } 343 }
342 344
343 bool GrBatchAtlas::hasID(AtlasID id) { 345 bool GrBatchAtlas::hasID(AtlasID id) {
(...skipping 12 matching lines...) Expand all
356 358
357 void GrBatchAtlas::setLastUseTokenBulk(const BulkUseTokenUpdater& updater, 359 void GrBatchAtlas::setLastUseTokenBulk(const BulkUseTokenUpdater& updater,
358 GrBatchToken batchToken) { 360 GrBatchToken batchToken) {
359 int count = updater.fPlotsToUpdate.count(); 361 int count = updater.fPlotsToUpdate.count();
360 for (int i = 0; i < count; i++) { 362 for (int i = 0; i < count; i++) {
361 BatchPlot* plot = fPlotArray[updater.fPlotsToUpdate[i]]; 363 BatchPlot* plot = fPlotArray[updater.fPlotsToUpdate[i]];
362 this->makeMRU(plot); 364 this->makeMRU(plot);
363 plot->setLastUseToken(batchToken); 365 plot->setLastUseToken(batchToken);
364 } 366 }
365 } 367 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrBatchFlushState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698