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

Unified Diff: src/gpu/GrBatchAtlas.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchFlushState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchFlushState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698