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

Side by Side Diff: src/ports/SkFontConfigTypeface.h

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/ports/SkFontConfigInterface_direct.cpp ('k') | src/ports/SkFontHost_FreeType.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 2013 Google Inc. 2 * Copyright 2013 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 "SkFontConfigInterface.h" 8 #include "SkFontConfigInterface.h"
9 #include "SkFontHost_FreeType_common.h" 9 #include "SkFontHost_FreeType_common.h"
10 #include "SkStream.h" 10 #include "SkStream.h"
11 #include "SkTypefaceCache.h" 11 #include "SkTypefaceCache.h"
12 12
13 class SkFontDescriptor; 13 class SkFontDescriptor;
14 14
15 class FontConfigTypeface : public SkTypeface_FreeType { 15 class FontConfigTypeface : public SkTypeface_FreeType {
16 SkFontConfigInterface::FontIdentity fIdentity; 16 SkFontConfigInterface::FontIdentity fIdentity;
17 SkString fFamilyName; 17 SkString fFamilyName;
18 SkAutoTDelete<SkStreamAsset> fLocalStream; 18 SkAutoTDelete<SkStreamAsset> fLocalStream;
19 19
20 public: 20 public:
21 static FontConfigTypeface* Create(const SkFontStyle& style, 21 static FontConfigTypeface* Create(const SkFontStyle& style,
22 const SkFontConfigInterface::FontIdentity& fi, 22 const SkFontConfigInterface::FontIdentity& fi,
23 const SkString& familyName) { 23 const SkString& familyName) {
24 return SkNEW_ARGS(FontConfigTypeface, (style, fi, familyName)); 24 return new FontConfigTypeface(style, fi, familyName);
25 } 25 }
26 26
27 static FontConfigTypeface* Create(const SkFontStyle& style, bool fixedWidth, 27 static FontConfigTypeface* Create(const SkFontStyle& style, bool fixedWidth,
28 SkStreamAsset* localStream) { 28 SkStreamAsset* localStream) {
29 return SkNEW_ARGS(FontConfigTypeface, (style, fixedWidth, localStream)); 29 return new FontConfigTypeface(style, fixedWidth, localStream);
30 } 30 }
31 31
32 const SkFontConfigInterface::FontIdentity& getIdentity() const { 32 const SkFontConfigInterface::FontIdentity& getIdentity() const {
33 return fIdentity; 33 return fIdentity;
34 } 34 }
35 35
36 SkStreamAsset* getLocalStream() const { return fLocalStream.get(); } 36 SkStreamAsset* getLocalStream() const { return fLocalStream.get(); }
37 37
38 bool isFamilyName(const char* name) const { 38 bool isFamilyName(const char* name) const {
39 return fFamilyName.equals(name); 39 return fFamilyName.equals(name);
(...skipping 16 matching lines...) Expand all
56 // we default to empty fFamilyName and fIdentity 56 // we default to empty fFamilyName and fIdentity
57 } 57 }
58 58
59 void onGetFamilyName(SkString* familyName) const override; 59 void onGetFamilyName(SkString* familyName) const override;
60 void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; 60 void onGetFontDescriptor(SkFontDescriptor*, bool*) const override;
61 SkStreamAsset* onOpenStream(int* ttcIndex) const override; 61 SkStreamAsset* onOpenStream(int* ttcIndex) const override;
62 62
63 private: 63 private:
64 typedef SkTypeface_FreeType INHERITED; 64 typedef SkTypeface_FreeType INHERITED;
65 }; 65 };
OLDNEW
« no previous file with comments | « src/ports/SkFontConfigInterface_direct.cpp ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698