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

Unified Diff: src/gpu/GrLayerCache.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/GrLayerCache.h ('k') | src/gpu/GrLayerHoister.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerCache.cpp
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp
index 4a2060779a22fc341a8183dba5f6d22b771076e7..e894c3023eba303a42b44d62c31b0234e176ef5f 100644
--- a/src/gpu/GrLayerCache.cpp
+++ b/src/gpu/GrLayerCache.cpp
@@ -90,7 +90,7 @@ GrLayerCache::~GrLayerCache() {
GrCachedLayer* layer = &(*iter);
SkASSERT(0 == layer->uses());
this->unlock(layer);
- SkDELETE(layer);
+ delete layer;
}
SkASSERT(0 == fPictureHash.count());
@@ -104,9 +104,9 @@ void GrLayerCache::initAtlas() {
GR_STATIC_ASSERT(kNumPlotsX*kNumPlotsX == GrPictureInfo::kNumPlots);
SkISize textureSize = SkISize::Make(kAtlasTextureWidth, kAtlasTextureHeight);
- fAtlas.reset(SkNEW_ARGS(GrAtlas, (fContext->getGpu(), kSkia8888_GrPixelConfig,
- kRenderTarget_GrSurfaceFlag,
- textureSize, kNumPlotsX, kNumPlotsY, false)));
+ fAtlas.reset(new GrAtlas(fContext->getGpu(), kSkia8888_GrPixelConfig,
+ kRenderTarget_GrSurfaceFlag, textureSize, kNumPlotsX, kNumPlotsY,
+ false));
}
void GrLayerCache::freeAll() {
@@ -115,7 +115,7 @@ void GrLayerCache::freeAll() {
for (; !iter.done(); ++iter) {
GrCachedLayer* layer = &(*iter);
this->unlock(layer);
- SkDELETE(layer);
+ delete layer;
}
fLayerHash.rewind();
@@ -133,9 +133,8 @@ GrCachedLayer* GrLayerCache::createLayer(uint32_t pictureID,
const SkPaint* paint) {
SkASSERT(pictureID != SK_InvalidGenID && start >= 0 && stop > 0);
- GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop,
- srcIR, dstIR, initialMat,
- key, keySize, paint));
+ GrCachedLayer* layer = new GrCachedLayer(pictureID, start, stop, srcIR, dstIR, initialMat, key,
+ keySize, paint);
fLayerHash.add(layer);
return layer;
}
@@ -200,7 +199,7 @@ bool GrLayerCache::tryToAtlas(GrCachedLayer* layer,
// Not in the atlas - will it fit?
GrPictureInfo* pictInfo = fPictureHash.find(layer->pictureID());
if (NULL == pictInfo) {
- pictInfo = SkNEW_ARGS(GrPictureInfo, (layer->pictureID()));
+ pictInfo = new GrPictureInfo(layer->pictureID());
fPictureHash.add(pictInfo);
}
@@ -235,7 +234,7 @@ bool GrLayerCache::tryToAtlas(GrCachedLayer* layer,
if (pictInfo->fPlotUsage.isEmpty()) {
fPictureHash.remove(pictInfo->fPictureID);
- SkDELETE(pictInfo);
+ delete pictInfo;
}
}
@@ -295,7 +294,7 @@ void GrLayerCache::unlock(GrCachedLayer* layer) {
if (pictInfo->fPlotUsage.isEmpty()) {
fPictureHash.remove(pictInfo->fPictureID);
- SkDELETE(pictInfo);
+ delete pictInfo;
}
}
@@ -380,13 +379,13 @@ void GrLayerCache::purge(uint32_t pictureID) {
SkASSERT(0 == toBeRemoved[i]->uses());
this->unlock(toBeRemoved[i]);
fLayerHash.remove(GrCachedLayer::GetKey(*toBeRemoved[i]));
- SkDELETE(toBeRemoved[i]);
+ delete toBeRemoved[i];
}
GrPictureInfo* pictInfo = fPictureHash.find(pictureID);
if (pictInfo) {
fPictureHash.remove(pictureID);
- SkDELETE(pictInfo);
+ delete pictInfo;
}
}
@@ -431,7 +430,7 @@ void GrLayerCache::purgePlot(GrPlot* plot) {
// Aggressively remove layers and, if it becomes totally uncached, delete the picture info
fLayerHash.remove(GrCachedLayer::GetKey(*toBeRemoved[i]));
- SkDELETE(toBeRemoved[i]);
+ delete toBeRemoved[i];
GrPictureInfo* pictInfo = fPictureHash.find(pictureIDToRemove);
if (pictInfo) {
@@ -442,7 +441,7 @@ void GrLayerCache::purgePlot(GrPlot* plot) {
if (pictInfo->fPlotUsage.isEmpty()) {
fPictureHash.remove(pictInfo->fPictureID);
- SkDELETE(pictInfo);
+ delete pictInfo;
}
}
}
« no previous file with comments | « src/gpu/GrLayerCache.h ('k') | src/gpu/GrLayerHoister.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698