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

Unified Diff: src/gpu/GrAtlas.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 4 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/GrAllocator.h ('k') | src/gpu/GrAtlasTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlas.cpp
diff --git a/src/gpu/GrAtlas.cpp b/src/gpu/GrAtlas.cpp
index 0322f70dc07bbb0a2b56cf142575d147deb16512..e2803020ae57b739521c65571a8bc348db9588d6 100644
--- a/src/gpu/GrAtlas.cpp
+++ b/src/gpu/GrAtlas.cpp
@@ -33,7 +33,7 @@ GrPlot::GrPlot()
}
GrPlot::~GrPlot() {
- SkDELETE_ARRAY(fPlotData);
+ delete[] fPlotData;
fPlotData = NULL;
delete fRects;
}
@@ -67,7 +67,7 @@ bool GrPlot::addSubImage(int width, int height, const void* image, SkIPoint16* l
int plotWidth = fRects->width();
int plotHeight = fRects->height();
if (fBatchUploads && NULL == fPlotData && 0.0f == percentFull) {
- fPlotData = SkNEW_ARRAY(unsigned char, fBytesPerPixel*plotWidth*plotHeight);
+ fPlotData = new unsigned char[fBytesPerPixel * plotWidth * plotHeight];
memset(fPlotData, 0, fBytesPerPixel*plotWidth*plotHeight);
}
@@ -138,7 +138,7 @@ GrAtlas::GrAtlas(GrGpu* gpu, GrPixelConfig config, GrSurfaceFlags flags,
// set up allocated plots
size_t bpp = GrBytesPerPixel(fPixelConfig);
- fPlotArray = SkNEW_ARRAY(GrPlot, (fNumPlotsX*fNumPlotsY));
+ fPlotArray = new GrPlot[(fNumPlotsX * fNumPlotsY)];
GrPlot* currPlot = fPlotArray;
for (int y = numPlotsY-1; y >= 0; --y) {
@@ -154,7 +154,7 @@ GrAtlas::GrAtlas(GrGpu* gpu, GrPixelConfig config, GrSurfaceFlags flags,
GrAtlas::~GrAtlas() {
SkSafeUnref(fTexture);
- SkDELETE_ARRAY(fPlotArray);
+ delete[] fPlotArray;
fGpu->unref();
#if FONT_CACHE_STATS
« no previous file with comments | « src/gpu/GrAllocator.h ('k') | src/gpu/GrAtlasTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698