diff options
Diffstat (limited to 'src/gpu/GrBatchAtlas.cpp')
-rw-r--r-- | src/gpu/GrBatchAtlas.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gpu/GrBatchAtlas.cpp b/src/gpu/GrBatchAtlas.cpp index 3374e00a9f..566cd5d922 100644 --- a/src/gpu/GrBatchAtlas.cpp +++ b/src/gpu/GrBatchAtlas.cpp @@ -227,8 +227,7 @@ GrBatchAtlas::GrBatchAtlas(GrTexture* texture, int numPlotsX, int numPlotsY) , fNumPlotsX(numPlotsX) , fNumPlotsY(numPlotsY) , fPlotWidth(texture->width() / numPlotsX) - , fPlotHeight(texture->height() / numPlotsY) - , fAtlasGeneration(kInvalidAtlasGeneration + 1) { + , fPlotHeight(texture->height() / numPlotsY) { SkASSERT(fPlotWidth * fNumPlotsX == texture->width()); SkASSERT(fPlotHeight * fNumPlotsY == texture->height()); @@ -244,7 +243,7 @@ GrBatchAtlas::GrBatchAtlas(GrTexture* texture, int numPlotsX, int numPlotsY) for (int x = fNumPlotsX - 1, c = 0; x >= 0; --x, ++c) { int id = r * fNumPlotsX + c; currPlot->reset(SkNEW(BatchPlot)); - (*currPlot)->init(this, texture, id, 1, x, y, fPlotWidth, fPlotHeight, fBPP); + (*currPlot)->init(this, texture, id, 0, x, y, fPlotWidth, fPlotHeight, fBPP); // build LRU list fPlotList.addToHead(currPlot->get()); @@ -319,7 +318,6 @@ bool GrBatchAtlas::addToAtlas(AtlasID* id, GrBatchTarget* batchTarget, SkDEBUGCODE(bool verify = )plot->addSubImage(width, height, image, loc, fBPP * width); SkASSERT(verify); this->updatePlot(batchTarget, id, plot); - fAtlasGeneration++; return true; } @@ -354,7 +352,6 @@ bool GrBatchAtlas::addToAtlas(AtlasID* id, GrBatchTarget* batchTarget, batchTarget->upload(uploader); *id = newPlot->id(); plot->unref(); - fAtlasGeneration++; return true; } |