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

Unified Diff: src/ports/SkFontHost_FreeType.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/ports/SkFontConfigTypeface.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_FreeType.cpp
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 63f598fd13d0df6a1604d0d74c7150540baad377..860f32002c49f86e811b9f5d2a3a59f41aa4cc3a 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -158,7 +158,7 @@ static bool ref_ft_library() {
if (0 == gFTCount) {
SkASSERT(NULL == gFTLibrary);
- gFTLibrary = SkNEW(FreeTypeLibrary);
+ gFTLibrary = new FreeTypeLibrary;
}
++gFTCount;
return gFTLibrary->library();
@@ -172,7 +172,7 @@ static void unref_ft_library() {
--gFTCount;
if (0 == gFTCount) {
SkASSERT(NULL != gFTLibrary);
- SkDELETE(gFTLibrary);
+ delete gFTLibrary;
SkDEBUGCODE(gFTLibrary = NULL;)
}
}
@@ -319,7 +319,7 @@ static FT_Face ref_ft_face(const SkTypeface* typeface) {
}
// this passes ownership of stream to the rec
- rec = SkNEW_ARGS(SkFaceRec, (data->detachStream(), fontID));
+ rec = new SkFaceRec(data->detachStream(), fontID);
FT_Open_Args args;
memset(&args, 0, sizeof(args));
@@ -336,7 +336,7 @@ static FT_Face ref_ft_face(const SkTypeface* typeface) {
FT_Error err = FT_Open_Face(gFTLibrary->library(), &args, data->getIndex(), &rec->fFace);
if (err) {
SkDEBUGF(("ERROR: unable to open font '%x'\n", fontID));
- SkDELETE(rec);
+ delete rec;
return NULL;
}
SkASSERT(rec->fFace);
@@ -374,7 +374,7 @@ static void unref_ft_face(FT_Face face) {
gFaceRecHead = next;
}
FT_Done_Face(face);
- SkDELETE(rec);
+ delete rec;
}
return;
}
@@ -662,11 +662,10 @@ static bool isAxisAligned(const SkScalerContext::Rec& rec) {
SkScalerContext* SkTypeface_FreeType::onCreateScalerContext(
const SkDescriptor* desc) const {
- SkScalerContext_FreeType* c = SkNEW_ARGS(SkScalerContext_FreeType,
- (const_cast<SkTypeface_FreeType*>(this),
- desc));
+ SkScalerContext_FreeType* c =
+ new SkScalerContext_FreeType(const_cast<SkTypeface_FreeType*>(this), desc);
if (!c->success()) {
- SkDELETE(c);
+ delete c;
c = NULL;
}
return c;
« no previous file with comments | « src/ports/SkFontConfigTypeface.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698