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

Side by Side Diff: src/core/SkFont.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, 3 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 unified diff | Download patch
« no previous file with comments | « src/core/SkFilterShader.cpp ('k') | src/core/SkFontDescriptor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkFont.h" 8 #include "SkFont.h"
9 #include "SkTypeface.h" 9 #include "SkTypeface.h"
10 #include "SkUtils.h" 10 #include "SkUtils.h"
(...skipping 22 matching lines...) Expand all
33 if (size <= 0 || !SkScalarIsFinite(size)) { 33 if (size <= 0 || !SkScalarIsFinite(size)) {
34 return NULL; 34 return NULL;
35 } 35 }
36 if (scaleX <= 0 || !SkScalarIsFinite(scaleX)) { 36 if (scaleX <= 0 || !SkScalarIsFinite(scaleX)) {
37 return NULL; 37 return NULL;
38 } 38 }
39 if (!SkScalarIsFinite(skewX)) { 39 if (!SkScalarIsFinite(skewX)) {
40 return NULL; 40 return NULL;
41 } 41 }
42 flags &= kAllFlags; 42 flags &= kAllFlags;
43 return SkNEW_ARGS(SkFont, (face, size, scaleX, skewX, mt, flags)); 43 return new SkFont(face, size, scaleX, skewX, mt, flags);
44 } 44 }
45 45
46 SkFont* SkFont::Create(SkTypeface* face, SkScalar size, MaskType mt, uint32_t fl ags) { 46 SkFont* SkFont::Create(SkTypeface* face, SkScalar size, MaskType mt, uint32_t fl ags) {
47 return SkFont::Create(face, size, 1, 0, mt, flags); 47 return SkFont::Create(face, size, 1, 0, mt, flags);
48 } 48 }
49 49
50 SkFont* SkFont::cloneWithSize(SkScalar newSize) const { 50 SkFont* SkFont::cloneWithSize(SkScalar newSize) const {
51 return SkFont::Create(this->getTypeface(), newSize, this->getScaleX(), this- >getSkewX(), 51 return SkFont::Create(this->getTypeface(), newSize, this->getScaleX(), this- >getSkewX(),
52 this->getMaskType(), this->getFlags()); 52 this->getMaskType(), this->getFlags());
53 } 53 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 MaskType maskType = SkFont::kBW_MaskType; 148 MaskType maskType = SkFont::kBW_MaskType;
149 if (paint.isAntiAlias()) { 149 if (paint.isAntiAlias()) {
150 maskType = paint.isLCDRenderText() ? kLCD_MaskType : kA8_MaskType; 150 maskType = paint.isLCDRenderText() ? kLCD_MaskType : kA8_MaskType;
151 } 151 }
152 152
153 return Create(paint.getTypeface(), 153 return Create(paint.getTypeface(),
154 paint.getTextSize(), paint.getTextScaleX(), paint.getTextSkewX (), 154 paint.getTextSize(), paint.getTextScaleX(), paint.getTextSkewX (),
155 maskType, flags); 155 maskType, flags);
156 } 156 }
OLDNEW
« no previous file with comments | « src/core/SkFilterShader.cpp ('k') | src/core/SkFontDescriptor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698