| Index: src/gpu/GrBatchAtlas.cpp
|
| diff --git a/src/gpu/GrBatchAtlas.cpp b/src/gpu/GrBatchAtlas.cpp
|
| index 2d9020644e2e30ca5b6b838a9dbc43bbbcd3a7ae..bbb0be71dec610998871191977aacc71647cc325 100644
|
| --- a/src/gpu/GrBatchAtlas.cpp
|
| +++ b/src/gpu/GrBatchAtlas.cpp
|
| @@ -219,6 +219,9 @@ GrBatchAtlas::GrBatchAtlas(GrTexture* texture, int numPlotsX, int numPlotsY)
|
|
|
| SkDEBUGCODE(fNumPlots = numPlotsX * numPlotsY;)
|
|
|
| + fTexture->setFromRawPixels(true);
|
| + fTexture->setException(true);
|
| +
|
| // We currently do not support compressed atlases...
|
| SkASSERT(!GrPixelConfigIsCompressed(texture->desc().fConfig));
|
|
|
| @@ -312,12 +315,12 @@ bool GrBatchAtlas::addToAtlas(AtlasID* id, GrDrawBatch::Target* batchTarget,
|
| // off the plot (ie let the batch target manage it) and create a new plot in its place in our
|
| // array. If it is equal to the currentToken, then the caller has to flush draws to the batch
|
| // target so we can spin off the plot
|
| - if (plot->lastUseToken() == batchTarget->currentToken()) {
|
| + if (plot->lastUseToken() == batchTarget->currentToken1()) {
|
| return false;
|
| }
|
|
|
| - SkASSERT(plot->lastUseToken() < batchTarget->currentToken());
|
| - SkASSERT(!batchTarget->hasTokenBeenFlushed(batchTarget->currentToken()));
|
| + SkASSERT(plot->lastUseToken() < batchTarget->currentToken1());
|
| + SkASSERT(!batchTarget->hasTokenBeenFlushed(batchTarget->currentToken1()));
|
|
|
| SkASSERT(!plot->unique()); // The GrPlotUpdater should have a ref too
|
|
|
| @@ -333,7 +336,7 @@ bool GrBatchAtlas::addToAtlas(AtlasID* id, GrDrawBatch::Target* batchTarget,
|
|
|
| // Note that this plot will be uploaded inline with the draws whereas the
|
| // one it displaced most likely was uploaded asap.
|
| - newPlot->setLastUploadToken(batchTarget->currentToken());
|
| + newPlot->setLastUploadToken(batchTarget->currentToken1());
|
| SkAutoTUnref<GrPlotUploader> uploader(new GrPlotUploader(newPlot, fTexture));
|
| batchTarget->upload(uploader);
|
| *id = newPlot->id();
|
|
|