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

Side by Side Diff: src/sfnt/SkOTUtils.h

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/SkTypeface_win_dw.cpp ('k') | src/utils/SkCanvasStack.h » ('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 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkOTUtils_DEFINED 8 #ifndef SkOTUtils_DEFINED
9 #define SkOTUtils_DEFINED 9 #define SkOTUtils_DEFINED
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 int typesCount) 45 int typesCount)
46 : fTypes(types), fTypesCount(typesCount), fTypesIndex(0) 46 : fTypes(types), fTypesCount(typesCount), fTypesIndex(0)
47 , fNameTableData(nameTableData), fFamilyNameIter(*nameTableData, fTy pes[fTypesIndex]) 47 , fNameTableData(nameTableData), fFamilyNameIter(*nameTableData, fTy pes[fTypesIndex])
48 { } 48 { }
49 49
50 /** Creates an iterator over all the family names in the 'name' table of a typeface. 50 /** Creates an iterator over all the family names in the 'name' table of a typeface.
51 * If no valid 'name' table can be found, returns NULL. 51 * If no valid 'name' table can be found, returns NULL.
52 */ 52 */
53 static LocalizedStrings_NameTable* CreateForFamilyNames(const SkTypeface & typeface); 53 static LocalizedStrings_NameTable* CreateForFamilyNames(const SkTypeface & typeface);
54 54
55 virtual bool next(SkTypeface::LocalizedString* localizedString) SK_OVERR IDE; 55 bool next(SkTypeface::LocalizedString* localizedString) SK_OVERRIDE;
56 private: 56 private:
57 static SkOTTableName::Record::NameID::Predefined::Value familyNameTypes[ 3]; 57 static SkOTTableName::Record::NameID::Predefined::Value familyNameTypes[ 3];
58 58
59 SkOTTableName::Record::NameID::Predefined::Value* fTypes; 59 SkOTTableName::Record::NameID::Predefined::Value* fTypes;
60 int fTypesCount; 60 int fTypesCount;
61 int fTypesIndex; 61 int fTypesIndex;
62 SkAutoTDeleteArray<SkOTTableName> fNameTableData; 62 SkAutoTDeleteArray<SkOTTableName> fNameTableData;
63 SkOTTableName::Iterator fFamilyNameIter; 63 SkOTTableName::Iterator fFamilyNameIter;
64 }; 64 };
65 65
66 /** An implementation of LocalizedStrings which has one name. */ 66 /** An implementation of LocalizedStrings which has one name. */
67 class LocalizedStrings_SingleName : public SkTypeface::LocalizedStrings { 67 class LocalizedStrings_SingleName : public SkTypeface::LocalizedStrings {
68 public: 68 public:
69 LocalizedStrings_SingleName(SkString name, SkString language) 69 LocalizedStrings_SingleName(SkString name, SkString language)
70 : fName(name), fLanguage(language), fHasNext(true) 70 : fName(name), fLanguage(language), fHasNext(true)
71 { } 71 { }
72 72
73 virtual bool next(SkTypeface::LocalizedString* localizedString) SK_OVERR IDE { 73 bool next(SkTypeface::LocalizedString* localizedString) SK_OVERRIDE {
74 localizedString->fString = fName; 74 localizedString->fString = fName;
75 localizedString->fLanguage = fLanguage; 75 localizedString->fLanguage = fLanguage;
76 76
77 bool hadNext = fHasNext; 77 bool hadNext = fHasNext;
78 fHasNext = false; 78 fHasNext = false;
79 return hadNext; 79 return hadNext;
80 } 80 }
81 81
82 private: 82 private:
83 SkString fName; 83 SkString fName;
84 SkString fLanguage; 84 SkString fLanguage;
85 bool fHasNext; 85 bool fHasNext;
86 }; 86 };
87 }; 87 };
88 88
89 #endif 89 #endif
OLDNEW
« no previous file with comments | « src/ports/SkTypeface_win_dw.cpp ('k') | src/utils/SkCanvasStack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698