From 385fe4d4b62d7d1dd76116dd570df3290a2f487b Mon Sep 17 00:00:00 2001 From: halcanary Date: Wed, 26 Aug 2015 13:07:48 -0700 Subject: Style Change: SkNEW->new; SkDELETE->delete DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003 --- src/gpu/GrBatchAtlas.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gpu/GrBatchAtlas.cpp') diff --git a/src/gpu/GrBatchAtlas.cpp b/src/gpu/GrBatchAtlas.cpp index f75df8bf12..1607ed12f6 100644 --- a/src/gpu/GrBatchAtlas.cpp +++ b/src/gpu/GrBatchAtlas.cpp @@ -234,13 +234,13 @@ GrBatchAtlas::GrBatchAtlas(GrTexture* texture, int numPlotsX, int numPlotsY) // set up allocated plots fBPP = GrBytesPerPixel(texture->desc().fConfig); - fPlotArray = SkNEW_ARRAY(SkAutoTUnref, (fNumPlotsX * fNumPlotsY)); + fPlotArray = new SkAutoTUnref[(fNumPlotsX * fNumPlotsY)]; SkAutoTUnref* currPlot = fPlotArray; for (int y = fNumPlotsY - 1, r = 0; y >= 0; --y, ++r) { for (int x = fNumPlotsX - 1, c = 0; x >= 0; --x, ++c) { uint32_t id = r * fNumPlotsX + c; - currPlot->reset(SkNEW(BatchPlot)); + currPlot->reset(new BatchPlot); (*currPlot)->init(this, texture, id, 1, x, y, fPlotWidth, fPlotHeight, fBPP); // build LRU list @@ -252,7 +252,7 @@ GrBatchAtlas::GrBatchAtlas(GrTexture* texture, int numPlotsX, int numPlotsY) GrBatchAtlas::~GrBatchAtlas() { SkSafeUnref(fTexture); - SkDELETE_ARRAY(fPlotArray); + delete[] fPlotArray; } void GrBatchAtlas::processEviction(AtlasID id) { @@ -278,7 +278,7 @@ inline void GrBatchAtlas::updatePlot(GrDrawBatch::Target* target, AtlasID* id, B // This new update will piggy back on that previously scheduled update. if (target->hasTokenBeenFlushed(plot->lastUploadToken())) { plot->setLastUploadToken(target->asapToken()); - SkAutoTUnref uploader(SkNEW_ARGS(GrPlotUploader, (plot))); + SkAutoTUnref uploader(new GrPlotUploader(plot)); target->upload(uploader); } *id = plot->id(); @@ -338,14 +338,14 @@ bool GrBatchAtlas::addToAtlas(AtlasID* id, GrDrawBatch::Target* batchTarget, this->processEviction(plot->id()); fPlotList.remove(plot); SkAutoTUnref& newPlot = fPlotArray[plot->index()]; - newPlot.reset(SkNEW(BatchPlot)); + newPlot.reset(new BatchPlot); newPlot->init(this, fTexture, index, ++generation, x, y, fPlotWidth, fPlotHeight, fBPP); fPlotList.addToHead(newPlot.get()); SkDEBUGCODE(bool verify = )newPlot->addSubImage(width, height, image, loc, fBPP * width); SkASSERT(verify); newPlot->setLastUploadToken(batchTarget->currentToken()); - SkAutoTUnref uploader(SkNEW_ARGS(GrPlotUploader, (newPlot))); + SkAutoTUnref uploader(new GrPlotUploader(newPlot)); batchTarget->upload(uploader); *id = newPlot->id(); plot->unref(); -- cgit v1.2.3