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

Side by Side Diff: src/fonts/SkTestScalerContext.h

Issue 1101343002: Update {virtual,override} to follow C++11 style in src/fonts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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/fonts/SkGScalerContext.h ('k') | no next file » | 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 #ifndef SkTestScalerContext_DEFINED 8 #ifndef SkTestScalerContext_DEFINED
9 #define SkTestScalerContext_DEFINED 9 #define SkTestScalerContext_DEFINED
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual ~SkTestTypeface() { 61 virtual ~SkTestTypeface() {
62 SkSafeUnref(fTestFont); 62 SkSafeUnref(fTestFont);
63 } 63 }
64 void getAdvance(SkGlyph* glyph); 64 void getAdvance(SkGlyph* glyph);
65 void getFontMetrics(SkPaint::FontMetrics* metrics); 65 void getFontMetrics(SkPaint::FontMetrics* metrics);
66 void getMetrics(SkGlyph* glyph); 66 void getMetrics(SkGlyph* glyph);
67 void getPath(const SkGlyph& glyph, SkPath* path); 67 void getPath(const SkGlyph& glyph, SkPath* path);
68 protected: 68 protected:
69 SkScalerContext* onCreateScalerContext(const SkDescriptor* desc) const overr ide; 69 SkScalerContext* onCreateScalerContext(const SkDescriptor* desc) const overr ide;
70 void onFilterRec(SkScalerContextRec* rec) const override; 70 void onFilterRec(SkScalerContextRec* rec) const override;
71 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( 71 SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
72 SkAdvancedTypefaceMetrics::PerGlyphInfo , 72 SkAdvancedTypefaceMetrics::PerGlyphInfo,
73 const uint32_t* glyphIDs, 73 const uint32_t* glyphIDs,
74 uint32_t glyphIDsCount) const override; 74 uint32_t glyphIDsCount) const override;
75 75
76 SkStreamAsset* onOpenStream(int* ttcIndex) const override { 76 SkStreamAsset* onOpenStream(int* ttcIndex) const override {
77 SkASSERT(0); // don't expect to get here 77 SkASSERT(0); // don't expect to get here
78 return NULL; 78 return NULL;
79 } 79 }
80 80
81 void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const overri de; 81 void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const overri de;
82 82
83 virtual int onCharsToGlyphs(const void* chars, Encoding encoding, 83 int onCharsToGlyphs(const void* chars, Encoding encoding,
84 uint16_t glyphs[], int glyphCount) const overrid e; 84 uint16_t glyphs[], int glyphCount) const override;
85 85
86 int onCountGlyphs() const override { 86 int onCountGlyphs() const override {
87 return (int) fTestFont->fCharCodesCount; 87 return (int) fTestFont->fCharCodesCount;
88 } 88 }
89 89
90 int onGetUPEM() const override { 90 int onGetUPEM() const override {
91 SkASSERT(0); // don't expect to get here 91 SkASSERT(0); // don't expect to get here
92 return 1; 92 return 1;
93 } 93 }
94 94
95 void onGetFamilyName(SkString* familyName) const override; 95 void onGetFamilyName(SkString* familyName) const override;
96 SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; 96 SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override;
97 97
98 int onGetTableTags(SkFontTableTag tags[]) const override { 98 int onGetTableTags(SkFontTableTag tags[]) const override {
99 return 0; 99 return 0;
100 } 100 }
101 101
102 virtual size_t onGetTableData(SkFontTableTag tag, size_t offset, 102 size_t onGetTableData(SkFontTableTag tag, size_t offset,
103 size_t length, void* data) const override { 103 size_t length, void* data) const override {
104 return 0; 104 return 0;
105 } 105 }
106 private: 106 private:
107 SkTestFont* fTestFont; 107 SkTestFont* fTestFont;
108 friend class SkTestScalerContext; 108 friend class SkTestScalerContext;
109 }; 109 };
110 110
111 SkTypeface* CreateTestTypeface(const char* name, SkTypeface::Style style); 111 SkTypeface* CreateTestTypeface(const char* name, SkTypeface::Style style);
112 112
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « src/fonts/SkGScalerContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698