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

Unified Diff: src/gpu/effects/GrTextureStripAtlas.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/effects/GrTextureStripAtlas.h ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureStripAtlas.cpp
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp
index e8de4d7c30f769a2eea1f8d63a33e1157972a64d..6aeaf6f1844f4f23ba985cb6419897bccb3117b9 100644
--- a/src/gpu/effects/GrTextureStripAtlas.cpp
+++ b/src/gpu/effects/GrTextureStripAtlas.cpp
@@ -27,7 +27,7 @@ GrTextureStripAtlas::Hash* GrTextureStripAtlas::gAtlasCache = NULL;
GrTextureStripAtlas::Hash* GrTextureStripAtlas::GetCache() {
if (NULL == gAtlasCache) {
- gAtlasCache = SkNEW(Hash);
+ gAtlasCache = new Hash;
}
return gAtlasCache;
@@ -43,10 +43,10 @@ void GrTextureStripAtlas::CleanUp(const GrContext*, void* info) {
GetCache()->remove(entry->fDesc);
// remove the actual entry
- SkDELETE(entry);
+ delete entry;
if (0 == GetCache()->count()) {
- SkDELETE(gAtlasCache);
+ delete gAtlasCache;
gAtlasCache = NULL;
}
}
@@ -54,9 +54,9 @@ void GrTextureStripAtlas::CleanUp(const GrContext*, void* info) {
GrTextureStripAtlas* GrTextureStripAtlas::GetAtlas(const GrTextureStripAtlas::Desc& desc) {
AtlasEntry* entry = GetCache()->find(desc);
if (NULL == entry) {
- entry = SkNEW(AtlasEntry);
+ entry = new AtlasEntry;
- entry->fAtlas = SkNEW_ARGS(GrTextureStripAtlas, (desc));
+ entry->fAtlas = new GrTextureStripAtlas(desc);
entry->fDesc = desc;
desc.fContext->addCleanUp(CleanUp, entry);
@@ -73,7 +73,7 @@ GrTextureStripAtlas::GrTextureStripAtlas(GrTextureStripAtlas::Desc desc)
, fDesc(desc)
, fNumRows(desc.fHeight / desc.fRowHeight)
, fTexture(NULL)
- , fRows(SkNEW_ARRAY(AtlasRow, fNumRows))
+ , fRows(new AtlasRow[fNumRows])
, fLRUFront(NULL)
, fLRUBack(NULL) {
SkASSERT(fNumRows * fDesc.fRowHeight == fDesc.fHeight);
@@ -82,9 +82,7 @@ GrTextureStripAtlas::GrTextureStripAtlas(GrTextureStripAtlas::Desc desc)
VALIDATE;
}
-GrTextureStripAtlas::~GrTextureStripAtlas() {
- SkDELETE_ARRAY(fRows);
-}
+GrTextureStripAtlas::~GrTextureStripAtlas() { delete[] fRows; }
int GrTextureStripAtlas::lockRow(const SkBitmap& data) {
VALIDATE;
« no previous file with comments | « src/gpu/effects/GrTextureStripAtlas.h ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698