| Index: src/gpu/GrAtlas.cpp | 
| diff --git a/src/gpu/GrAtlas.cpp b/src/gpu/GrAtlas.cpp | 
| index f2daca11c5879340a0c9cb05e0b6724d80aafff6..5207061a8a8765159e42dac6a4f3317bb797fadb 100644 | 
| --- a/src/gpu/GrAtlas.cpp | 
| +++ b/src/gpu/GrAtlas.cpp | 
| @@ -50,10 +50,10 @@ | 
| static int g_UploadCount = 0; | 
| #endif | 
|  | 
| -GrAtlas::GrAtlas(GrAtlasMgr* mgr, int plotX, int plotY, GrMaskFormat format) { | 
| +GrAtlas::GrAtlas(GrAtlasMgr* mgr, int plotX, int plotY, GrMaskFormat format) : | 
| +                 fDrawToken(NULL, 0) { | 
| fAtlasMgr = mgr;    // just a pointer, not an owner | 
| fNext = NULL; | 
| -    fUsed = false; | 
|  | 
| fTexture = mgr->getTexture(format); // we're not an owner, just a pointer | 
| fPlot.set(plotX, plotY); | 
| @@ -87,7 +87,7 @@ bool GrAtlas::RemoveUnusedAtlases(GrAtlasMgr* atlasMgr, GrAtlas** startAtlas) { | 
| GrAtlas* atlas = *startAtlas; | 
| bool removed = false; | 
| while (NULL != atlas) { | 
| -        if (!atlas->used()) { | 
| +        if (atlas->drawToken().isIssued()) { | 
| *atlasRef = atlas->fNext; | 
| atlasMgr->deleteAtlas(atlas); | 
| atlas = *atlasRef; | 
| @@ -189,7 +189,7 @@ static GrPixelConfig maskformat2pixelconfig(GrMaskFormat format) { | 
| case kA888_GrMaskFormat: | 
| return kSkia8888_GrPixelConfig; | 
| default: | 
| -            GrAssert(!"unknown maskformat"); | 
| +            SkASSERT(!"unknown maskformat"); | 
| } | 
| return kUnknown_GrPixelConfig; | 
| } | 
| @@ -217,8 +217,8 @@ GrAtlas* GrAtlasMgr::addToAtlas(GrAtlas** atlas, | 
| return NULL; | 
| } | 
|  | 
| -    GrAssert(0 == kA8_GrMaskFormat); | 
| -    GrAssert(1 == kA565_GrMaskFormat); | 
| +    SkASSERT(0 == kA8_GrMaskFormat); | 
| +    SkASSERT(1 == kA565_GrMaskFormat); | 
| if (NULL == fTexture[format]) { | 
| // TODO: Update this to use the cache rather than directly creating a texture. | 
| GrTextureDesc desc; | 
| @@ -247,6 +247,6 @@ GrAtlas* GrAtlasMgr::addToAtlas(GrAtlas** atlas, | 
| } | 
|  | 
| void GrAtlasMgr::freePlot(GrMaskFormat format, int x, int y) { | 
| -    GrAssert(fPlotMgr->isBusy(x, y)); | 
| +    SkASSERT(fPlotMgr->isBusy(x, y)); | 
| fPlotMgr->freePlot(x, y); | 
| } | 
|  |