diff options
Diffstat (limited to 'src/ports')
-rw-r--r-- | src/ports/SkFontConfigInterface_direct.cpp | 8 | ||||
-rw-r--r-- | src/ports/SkFontConfigTypeface.h | 6 | ||||
-rw-r--r-- | src/ports/SkFontHost_FreeType.cpp | 16 | ||||
-rw-r--r-- | src/ports/SkFontHost_FreeType_common.h | 20 | ||||
-rw-r--r-- | src/ports/SkFontHost_linux.cpp | 46 | ||||
-rwxr-xr-x | src/ports/SkFontHost_mac.cpp | 68 | ||||
-rwxr-xr-x | src/ports/SkFontHost_win.cpp | 70 | ||||
-rw-r--r-- | src/ports/SkFontMgr_android.cpp | 40 | ||||
-rw-r--r-- | src/ports/SkFontMgr_fontconfig.cpp | 42 | ||||
-rw-r--r-- | src/ports/SkFontMgr_win_dw.cpp | 66 | ||||
-rw-r--r-- | src/ports/SkImageDecoder_WIC.cpp | 2 | ||||
-rw-r--r-- | src/ports/SkImageGenerator_skia.cpp | 10 | ||||
-rw-r--r-- | src/ports/SkRemotableFontMgr_win_dw.cpp | 34 | ||||
-rw-r--r-- | src/ports/SkScalerContext_win_dw.h | 14 | ||||
-rw-r--r-- | src/ports/SkTypeface_win_dw.cpp | 2 | ||||
-rw-r--r-- | src/ports/SkTypeface_win_dw.h | 26 |
16 files changed, 235 insertions, 235 deletions
diff --git a/src/ports/SkFontConfigInterface_direct.cpp b/src/ports/SkFontConfigInterface_direct.cpp index 0f2d882ca8..5d4aca905b 100644 --- a/src/ports/SkFontConfigInterface_direct.cpp +++ b/src/ports/SkFontConfigInterface_direct.cpp @@ -111,14 +111,14 @@ public: SkTypeface::Style requested, FontIdentity* outFontIdentifier, SkString* outFamilyName, - SkTypeface::Style* outStyle) SK_OVERRIDE; - SkStreamAsset* openStream(const FontIdentity&) SK_OVERRIDE; + SkTypeface::Style* outStyle) override; + SkStreamAsset* openStream(const FontIdentity&) override; // new APIs - SkDataTable* getFamilyNames() SK_OVERRIDE; + SkDataTable* getFamilyNames() override; virtual bool matchFamilySet(const char inFamilyName[], SkString* outFamilyName, - SkTArray<FontIdentity>*) SK_OVERRIDE; + SkTArray<FontIdentity>*) override; private: SkMutex mutex_; diff --git a/src/ports/SkFontConfigTypeface.h b/src/ports/SkFontConfigTypeface.h index 851bfb794f..3672f4e8d3 100644 --- a/src/ports/SkFontConfigTypeface.h +++ b/src/ports/SkFontConfigTypeface.h @@ -56,9 +56,9 @@ protected: // we default to empty fFamilyName and fIdentity } - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; + void onGetFamilyName(SkString* familyName) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; private: typedef SkTypeface_FreeType INHERITED; diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 19aed66a5c..5a4b75579b 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -193,14 +193,14 @@ public: } protected: - unsigned generateGlyphCount() SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; - void generateImage(const SkGlyph& glyph) SK_OVERRIDE; - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; - SkUnichar generateGlyphToChar(uint16_t glyph) SK_OVERRIDE; + unsigned generateGlyphCount() override; + uint16_t generateCharToGlyph(SkUnichar uni) override; + void generateAdvance(SkGlyph* glyph) override; + void generateMetrics(SkGlyph* glyph) override; + void generateImage(const SkGlyph& glyph) override; + void generatePath(const SkGlyph& glyph, SkPath* path) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; + SkUnichar generateGlyphToChar(uint16_t glyph) override; private: SkFaceRec* fFaceRec; diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h index 57aedd07cf..36efba011d 100644 --- a/src/ports/SkFontHost_FreeType_common.h +++ b/src/ports/SkFontHost_FreeType_common.h @@ -59,23 +59,23 @@ protected: {} virtual SkScalerContext* onCreateScalerContext( - const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; + const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE; - int onGetUPEM() const SK_OVERRIDE; + const uint32_t*, uint32_t) const override; + int onGetUPEM() const override; virtual bool onGetKerningPairAdjustments(const uint16_t glyphs[], int count, - int32_t adjustments[]) const SK_OVERRIDE; + int32_t adjustments[]) const override; virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], - int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; + int glyphCount) const override; + int onCountGlyphs() const override; - LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; + LocalizedStrings* onCreateFamilyNameIterator() const override; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; + size_t length, void* data) const override; private: mutable int fGlyphCount; diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp index 72508e989a..d96365b381 100644 --- a/src/ports/SkFontHost_linux.cpp +++ b/src/ports/SkFontHost_linux.cpp @@ -41,11 +41,11 @@ public: virtual const char* getUniqueString() const = 0; protected: - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { *familyName = fFamilyName; } - void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const SK_OVERRIDE { + void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const override { desc->setFamilyName(fFamilyName.c_str()); desc->setFontFileName(this->getUniqueString()); desc->setFontIndex(fIndex); @@ -69,10 +69,10 @@ class SkTypeface_Empty : public SkTypeface_Custom { public: SkTypeface_Empty() : INHERITED(SkFontStyle(), false, true, SkString(), 0) {} - const char* getUniqueString() const SK_OVERRIDE { return NULL; } + const char* getUniqueString() const override { return NULL; } protected: - SkStreamAsset* onOpenStream(int*) const SK_OVERRIDE { return NULL; } + SkStreamAsset* onOpenStream(int*) const override { return NULL; } private: typedef SkTypeface_Custom INHERITED; @@ -87,10 +87,10 @@ public: , fStream(stream) { } - const char* getUniqueString() const SK_OVERRIDE { return NULL; } + const char* getUniqueString() const override { return NULL; } protected: - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = this->getIndex(); return fStream->duplicate(); } @@ -118,7 +118,7 @@ public: , fStream(c_CustomTypefaceRetain ? SkStream::NewFromFile(fPath.c_str()) : NULL) { } - const char* getUniqueString() const SK_OVERRIDE { + const char* getUniqueString() const override { const char* str = strrchr(fPath.c_str(), '/'); if (str) { str += 1; // skip the '/' @@ -127,7 +127,7 @@ public: } protected: - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = this->getIndex(); if (fStream.get()) { return fStream->duplicate(); @@ -154,11 +154,11 @@ class SkFontStyleSet_Custom : public SkFontStyleSet { public: explicit SkFontStyleSet_Custom(const SkString familyName) : fFamilyName(familyName) { } - int count() SK_OVERRIDE { + int count() override { return fStyles.count(); } - void getStyle(int index, SkFontStyle* style, SkString* name) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* style, SkString* name) override { SkASSERT(index < fStyles.count()); bool bold = fStyles[index]->isBold(); bool italic = fStyles[index]->isItalic(); @@ -168,7 +168,7 @@ public: name->reset(); } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { SkASSERT(index < fStyles.count()); return SkRef(fStyles[index].get()); } @@ -181,7 +181,7 @@ public: return score; } - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& pattern) override { if (0 == fStyles.count()) { return NULL; } @@ -231,21 +231,21 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fFamilies.count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { SkASSERT(index < fFamilies.count()); familyName->set(fFamilies[index]->fFamilyName); } - SkFontStyleSet_Custom* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet_Custom* onCreateStyleSet(int index) const override { SkASSERT(index < fFamilies.count()); return SkRef(fFamilies[index].get()); } - SkFontStyleSet_Custom* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet_Custom* onMatchFamily(const char familyName[]) const override { for (int i = 0; i < fFamilies.count(); ++i) { if (fFamilies[i]->fFamilyName.equals(familyName)) { return SkRef(fFamilies[i].get()); @@ -255,7 +255,7 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& fontStyle) const SK_OVERRIDE + const SkFontStyle& fontStyle) const override { SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); return sset->matchStyle(fontStyle); @@ -263,13 +263,13 @@ protected: virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE + SkUnichar character) const override { return NULL; } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle& fontStyle) const SK_OVERRIDE + const SkFontStyle& fontStyle) const override { for (int i = 0; i < fFamilies.count(); ++i) { for (int j = 0; j < fFamilies[i]->fStyles.count(); ++j) { @@ -281,11 +281,11 @@ protected: return NULL; } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { return this->createFromStream(new SkMemoryStream(data), ttcIndex); } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete<SkStreamAsset> stream(bareStream); if (NULL == stream || stream->getLength() <= 0) { return NULL; @@ -302,13 +302,13 @@ protected: } } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { SkAutoTDelete<SkStreamAsset> stream(SkStream::NewFromFile(path)); return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : NULL; } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE + unsigned styleBits) const override { SkTypeface::Style oldStyle = (SkTypeface::Style)styleBits; SkFontStyle style = SkFontStyle(oldStyle & SkTypeface::kBold diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 99766ed152..5be7cc1f97 100755 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -463,22 +463,22 @@ public: AutoCFRelease<CTFontRef> fFontRef; protected: - int onGetUPEM() const SK_OVERRIDE; - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + int onGetUPEM() const override; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; + void onGetFamilyName(SkString* familyName) const override; + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; - SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; + size_t length, void* data) const override; + SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE; + const uint32_t*, uint32_t) const override; virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], - int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; + int glyphCount) const override; + int onCountGlyphs() const override; private: bool fIsLocalStream; @@ -630,13 +630,13 @@ public: SkScalerContext_Mac(SkTypeface_Mac*, const SkDescriptor*); protected: - unsigned generateGlyphCount(void) SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; - void generateImage(const SkGlyph& glyph) SK_OVERRIDE; - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; + unsigned generateGlyphCount(void) override; + uint16_t generateCharToGlyph(SkUnichar uni) override; + void generateAdvance(SkGlyph* glyph) override; + void generateMetrics(SkGlyph* glyph) override; + void generateImage(const SkGlyph& glyph) override; + void generatePath(const SkGlyph& glyph, SkPath* path) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; private: static void CTPathElement(void *info, const CGPathElement *element); @@ -2108,11 +2108,11 @@ public: CFRelease(fFamilyName); } - int count() SK_OVERRIDE { + int count() override { return fCount; } - void getStyle(int index, SkFontStyle* style, SkString* name) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* style, SkString* name) override { SkASSERT((unsigned)index < (unsigned)fCount); CTFontDescriptorRef desc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fArray, index); if (style) { @@ -2125,14 +2125,14 @@ public: } } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { SkASSERT((unsigned)index < (unsigned)CFArrayGetCount(fArray)); CTFontDescriptorRef desc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fArray, index); return createFromDesc(fFamilyName, desc); } - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& pattern) override { if (0 == fCount) { return NULL; } @@ -2196,11 +2196,11 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fCount; } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { if ((unsigned)index < (unsigned)fCount) { CFStringToSkString(this->stringAt(index), familyName); } else { @@ -2208,35 +2208,35 @@ protected: } } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { if ((unsigned)index >= (unsigned)fCount) { return NULL; } return CreateSet(this->stringAt(index)); } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { AutoCFRelease<CFStringRef> cfName(make_CFString(familyName)); return CreateSet(cfName); } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle&) const SK_OVERRIDE { + const SkFontStyle&) const override { return NULL; } virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE { + SkUnichar character) const override { return NULL; } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle&) const SK_OVERRIDE { + const SkFontStyle&) const override { return NULL; } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { AutoCFRelease<CGDataProviderRef> pr(SkCreateDataProviderFromData(data)); if (NULL == pr) { return NULL; @@ -2244,7 +2244,7 @@ protected: return create_from_dataProvider(pr); } - SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const override { AutoCFRelease<CGDataProviderRef> pr(SkCreateDataProviderFromStream(stream)); if (NULL == pr) { return NULL; @@ -2252,7 +2252,7 @@ protected: return create_from_dataProvider(pr); } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { AutoCFRelease<CGDataProviderRef> pr(CGDataProviderCreateWithFilename(path)); if (NULL == pr) { return NULL; @@ -2261,7 +2261,7 @@ protected: } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { SkFontStyle style = SkFontStyle((SkTypeface::Style)styleBits); if (familyName) { diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index dc248fb31d..bb5f8de782 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -254,22 +254,22 @@ public: } protected: - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; - SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; + SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; + const uint32_t*, uint32_t) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; virtual int onCharsToGlyphs(const void* chars, Encoding encoding, - uint16_t glyphs[], int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; - int onGetUPEM() const SK_OVERRIDE; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + uint16_t glyphs[], int glyphCount) const override; + int onCountGlyphs() const override; + int onGetUPEM() const override; + void onGetFamilyName(SkString* familyName) const override; + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; + size_t length, void* data) const override; }; class FontMemResourceTypeface : public LogFontTypeface { @@ -282,7 +282,7 @@ public: } protected: - void weak_dispose() const SK_OVERRIDE { + void weak_dispose() const override { RemoveFontMemResourceEx(fFontMemResource); //SkTypefaceCache::Remove(this); INHERITED::weak_dispose(); @@ -540,13 +540,13 @@ public: bool isValid() const; protected: - unsigned generateGlyphCount() SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; - void generateImage(const SkGlyph& glyph) SK_OVERRIDE; - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; + unsigned generateGlyphCount() override; + uint16_t generateCharToGlyph(SkUnichar uni) override; + void generateAdvance(SkGlyph* glyph) override; + void generateMetrics(SkGlyph* glyph) override; + void generateImage(const SkGlyph& glyph) override; + void generatePath(const SkGlyph& glyph, SkPath* path) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; private: DWORD getGDIGlyphPath(const SkGlyph& glyph, UINT flags, @@ -2401,11 +2401,11 @@ public: ::DeleteDC(hdc); } - int count() SK_OVERRIDE { + int count() override { return fArray.count(); } - void getStyle(int index, SkFontStyle* fs, SkString* styleName) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* fs, SkString* styleName) override { if (fs) { *fs = get_style(fArray[index].elfLogFont); } @@ -2422,11 +2422,11 @@ public: } } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { return SkCreateTypefaceFromLOGFONT(fArray[index].elfLogFont); } - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& pattern) override { // todo: return SkCreateTypefaceFromLOGFONT(fArray[0].elfLogFont); } @@ -2448,21 +2448,21 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fLogFontArray.count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { SkASSERT((unsigned)index < (unsigned)fLogFontArray.count()); tchar_to_skstring(fLogFontArray[index].elfLogFont.lfFaceName, familyName); } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { SkASSERT((unsigned)index < (unsigned)fLogFontArray.count()); return SkNEW_ARGS(SkFontStyleSetGDI, (fLogFontArray[index].elfLogFont.lfFaceName)); } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { if (NULL == familyName) { familyName = ""; // do we need this check??? } @@ -2472,7 +2472,7 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& fontstyle) const SK_OVERRIDE { + const SkFontStyle& fontstyle) const override { // could be in base impl SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); return sset->matchStyle(fontstyle); @@ -2480,35 +2480,35 @@ protected: virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE { + SkUnichar character) const override { return NULL; } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle& fontstyle) const SK_OVERRIDE { + const SkFontStyle& fontstyle) const override { // could be in base impl SkString familyName; ((LogFontTypeface*)familyMember)->getFamilyName(&familyName); return this->matchFamilyStyle(familyName.c_str(), fontstyle); } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete<SkStreamAsset> stream(bareStream); return create_from_stream(stream); } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { // could be in base impl return this->createFromStream(SkNEW_ARGS(SkMemoryStream, (data))); } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { // could be in base impl return this->createFromStream(SkStream::NewFromFile(path)); } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { LOGFONT lf; if (NULL == familyName) { lf = get_default_font(); diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp index 11f9449971..49ca08194b 100644 --- a/src/ports/SkFontMgr_android.cpp +++ b/src/ports/SkFontMgr_android.cpp @@ -36,7 +36,7 @@ public: , fFamilyName(familyName) { } protected: - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { *familyName = fFamilyName; } @@ -62,7 +62,7 @@ public: , fVariantStyle(variantStyle) { } virtual void onGetFontDescriptor(SkFontDescriptor* desc, - bool* serialize) const SK_OVERRIDE { + bool* serialize) const override { SkASSERT(desc); SkASSERT(serialize); desc->setFamilyName(fFamilyName.c_str()); @@ -70,7 +70,7 @@ public: desc->setFontIndex(fIndex); *serialize = false; } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = fIndex; return SkStream::NewFromFile(fPathName.c_str()); } @@ -93,7 +93,7 @@ public: , fStream(stream) { } virtual void onGetFontDescriptor(SkFontDescriptor* desc, - bool* serialize) const SK_OVERRIDE { + bool* serialize) const override { SkASSERT(desc); SkASSERT(serialize); desc->setFamilyName(fFamilyName.c_str()); @@ -101,7 +101,7 @@ public: *serialize = true; } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = fIndex; return fStream->duplicate(); } @@ -169,10 +169,10 @@ public: } } - int count() SK_OVERRIDE { + int count() override { return fStyles.count(); } - void getStyle(int index, SkFontStyle* style, SkString* name) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* style, SkString* name) override { if (index < 0 || fStyles.count() <= index) { return; } @@ -183,7 +183,7 @@ public: name->reset(); } } - SkTypeface_AndroidSystem* createTypeface(int index) SK_OVERRIDE { + SkTypeface_AndroidSystem* createTypeface(int index) override { if (index < 0 || fStyles.count() <= index) { return NULL; } @@ -194,7 +194,7 @@ public: * TODO: consider replacing with SkStyleSet_Indirect::matchStyle(); * this simpler version using match_score() passes all our tests. */ - SkTypeface_AndroidSystem* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface_AndroidSystem* matchStyle(const SkFontStyle& pattern) override { if (0 == fStyles.count()) { return NULL; } @@ -269,11 +269,11 @@ protected: /** Returns not how many families we have, but how many unique names * exist among the families. */ - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fNameToFamilyMap.count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { if (index < 0 || fNameToFamilyMap.count() <= index) { familyName->reset(); return; @@ -281,14 +281,14 @@ protected: familyName->set(fNameToFamilyMap[index].name); } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { if (index < 0 || fNameToFamilyMap.count() <= index) { return NULL; } return SkRef(fNameToFamilyMap[index].styleSet); } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { if (!familyName) { return NULL; } @@ -308,13 +308,13 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& style) const SK_OVERRIDE { + const SkFontStyle& style) const override { SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); return sset->matchStyle(style); } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* typeface, - const SkFontStyle& style) const SK_OVERRIDE { + const SkFontStyle& style) const override { for (int i = 0; i < fFontStyleSets.count(); ++i) { for (int j = 0; j < fFontStyleSets[i]->fStyles.count(); ++j) { if (fFontStyleSets[i]->fStyles[j] == typeface) { @@ -359,7 +359,7 @@ protected: const SkFontStyle& style, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE + SkUnichar character) const override { // The variant 'elegant' is 'not squashed', 'compact' is 'stays in ascent/descent'. // The variant 'default' means 'compact and elegant'. @@ -393,16 +393,16 @@ protected: return NULL; } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { return this->createFromStream(new SkMemoryStream(data), ttcIndex); } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { SkAutoTDelete<SkStreamAsset> stream(SkStream::NewFromFile(path)); return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : NULL; } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete<SkStreamAsset> stream(bareStream); bool isFixedPitch; SkFontStyle style; @@ -416,7 +416,7 @@ protected: virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { SkFontStyle style = SkFontStyle(styleBits); if (familyName) { diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp index a0e45facf6..dc4d8c5a8c 100644 --- a/src/ports/SkFontMgr_fontconfig.cpp +++ b/src/ports/SkFontMgr_fontconfig.cpp @@ -382,16 +382,16 @@ public: , fIndex(index) { }; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { familyName->reset(); } - void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE { + void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const override { desc->setFontIndex(fIndex); *serialize = true; } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = fIndex; return fStream->duplicate(); } @@ -411,11 +411,11 @@ public: } mutable SkAutoFcPattern fPattern; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { *familyName = get_string(fPattern, FC_FAMILY); } - void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE { + void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const override { FCLocker lock; desc->setFamilyName(get_string(fPattern, FC_FAMILY)); desc->setFullName(get_string(fPattern, FC_FULLNAME)); @@ -425,7 +425,7 @@ public: *serialize = false; } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { FCLocker lock; *ttcIndex = get_int(fPattern, FC_INDEX, 0); return SkStream::NewFromFile(get_string(fPattern, FC_FILE)); @@ -469,9 +469,9 @@ class SkFontMgr_fontconfig : public SkFontMgr { fFontSet.reset(); } - int count() SK_OVERRIDE { return fFontSet->nfont; } + int count() override { return fFontSet->nfont; } - void getStyle(int index, SkFontStyle* style, SkString* styleName) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* style, SkString* styleName) override { if (index < 0 || fFontSet->nfont <= index) { return; } @@ -485,14 +485,14 @@ class SkFontMgr_fontconfig : public SkFontMgr { } } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { FCLocker lock; FcPattern* match = fFontSet->fonts[index]; return fFontMgr->createTypefaceFromFcPattern(match); } - SkTypeface* matchStyle(const SkFontStyle& style) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& style) override { FCLocker lock; SkAutoFcPattern pattern; @@ -607,15 +607,15 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fFamilyNames->count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { familyName->set(fFamilyNames->atStr(index)); } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { return this->onMatchFamily(fFamilyNames->atStr(index)); } @@ -684,7 +684,7 @@ protected: return false; } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { FCLocker lock; SkAutoFcPattern pattern; @@ -726,7 +726,7 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& style) const SK_OVERRIDE + const SkFontStyle& style) const override { FCLocker lock; @@ -767,7 +767,7 @@ protected: const SkFontStyle& style, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE + SkUnichar character) const override { FCLocker lock; @@ -801,7 +801,7 @@ protected: } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* typeface, - const SkFontStyle& style) const SK_OVERRIDE + const SkFontStyle& style) const override { //TODO: should the SkTypeface_fontconfig know its family? const SkTypeface_fontconfig* fcTypeface = @@ -809,7 +809,7 @@ protected: return this->matchFamilyStyle(get_string(fcTypeface->fPattern, FC_FAMILY), style); } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete<SkStreamAsset> stream(bareStream); const size_t length = stream->getLength(); if (length <= 0 || (1u << 30) < length) { @@ -826,16 +826,16 @@ protected: static_cast<SkStreamAsset*>(stream.detach()))); } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { return this->createFromStream(SkNEW_ARGS(SkMemoryStream, (data)), ttcIndex); } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { return this->createFromStream(SkStream::NewFromFile(path), ttcIndex); } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { bool bold = styleBits & SkTypeface::kBold; bool italic = styleBits & SkTypeface::kItalic; SkFontStyle style = SkFontStyle(bold ? SkFontStyle::kBold_Weight diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp index bff8593688..b07a05091d 100644 --- a/src/ports/SkFontMgr_win_dw.cpp +++ b/src/ports/SkFontMgr_win_dw.cpp @@ -277,22 +277,22 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE; - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE; - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE; - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE; + int onCountFamilies() const override; + void onGetFamilyName(int index, SkString* familyName) const override; + SkFontStyleSet* onCreateStyleSet(int index) const override; + SkFontStyleSet* onMatchFamily(const char familyName[]) const override; virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& fontstyle) const SK_OVERRIDE; + const SkFontStyle& fontstyle) const override; virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE; + SkUnichar character) const override; virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle& fontstyle) const SK_OVERRIDE; - SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const SK_OVERRIDE; - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE; - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE; + const SkFontStyle& fontstyle) const override; + SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const override; + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override; + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override; virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE; + unsigned styleBits) const override; private: HRESULT getByFamilyName(const WCHAR familyName[], IDWriteFontFamily** fontFamily) const; @@ -324,10 +324,10 @@ public: , fFontFamily(SkRefComPtr(fontFamily)) { } - int count() SK_OVERRIDE; - void getStyle(int index, SkFontStyle* fs, SkString* styleName) SK_OVERRIDE; - SkTypeface* createTypeface(int index) SK_OVERRIDE; - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE; + int count() override; + void getStyle(int index, SkFontStyle* fs, SkString* styleName) override; + SkTypeface* createTypeface(int index) override; + SkTypeface* matchStyle(const SkFontStyle& pattern) override; private: SkAutoTUnref<const SkFontMgr_DirectWrite> fFontMgr; @@ -519,7 +519,7 @@ public: DWRITE_MEASURING_MODE measuringMode, DWRITE_GLYPH_RUN const* glyphRun, DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { SkTScopedComPtr<IDWriteFont> font; HRM(fOuter->fFontCollection->GetFontFromFontFace(glyphRun->fontFace, &font), @@ -547,7 +547,7 @@ public: FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_UNDERLINE const* underline, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE DrawStrikethrough( @@ -555,7 +555,7 @@ public: FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_STRIKETHROUGH const* strikethrough, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE DrawInlineObject( @@ -565,13 +565,13 @@ public: IDWriteInlineObject* inlineObject, BOOL isSideways, BOOL isRightToLeft, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } // IDWritePixelSnapping methods virtual HRESULT STDMETHODCALLTYPE IsPixelSnappingDisabled( void* clientDrawingContext, - BOOL* isDisabled) SK_OVERRIDE + BOOL* isDisabled) override { *isDisabled = FALSE; return S_OK; @@ -579,7 +579,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetCurrentTransform( void* clientDrawingContext, - DWRITE_MATRIX* transform) SK_OVERRIDE + DWRITE_MATRIX* transform) override { const DWRITE_MATRIX ident = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }; *transform = ident; @@ -588,18 +588,18 @@ public: virtual HRESULT STDMETHODCALLTYPE GetPixelsPerDip( void* clientDrawingContext, - FLOAT* pixelsPerDip) SK_OVERRIDE + FLOAT* pixelsPerDip) override { *pixelsPerDip = 1.0f; return S_OK; } // IUnknown methods - ULONG STDMETHODCALLTYPE AddRef() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE AddRef() override { return InterlockedIncrement(&fRefCount); } - ULONG STDMETHODCALLTYPE Release() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE Release() override { ULONG newCount = InterlockedDecrement(&fRefCount); if (0 == newCount) { delete this; @@ -607,7 +607,7 @@ public: return newCount; } - virtual HRESULT STDMETHODCALLTYPE QueryInterface(IID const& riid, void** ppvObject) SK_OVERRIDE{ + virtual HRESULT STDMETHODCALLTYPE QueryInterface(IID const& riid, void** ppvObject) override{ if (__uuidof(IUnknown) == riid || __uuidof(IDWritePixelSnapping) == riid || __uuidof(IDWriteTextRenderer) == riid) @@ -660,7 +660,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetTextAtPosition( UINT32 textPosition, WCHAR const** textString, - UINT32* textLength) SK_OVERRIDE + UINT32* textLength) override { if (fLength <= textPosition) { *textString = NULL; @@ -675,7 +675,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetTextBeforePosition( UINT32 textPosition, WCHAR const** textString, - UINT32* textLength) SK_OVERRIDE + UINT32* textLength) override { if (textPosition < 1 || fLength <= textPosition) { *textString = NULL; @@ -687,7 +687,7 @@ public: return S_OK; } - virtual DWRITE_READING_DIRECTION STDMETHODCALLTYPE GetParagraphReadingDirection() SK_OVERRIDE { + virtual DWRITE_READING_DIRECTION STDMETHODCALLTYPE GetParagraphReadingDirection() override { // TODO: this is also interesting. return DWRITE_READING_DIRECTION_LEFT_TO_RIGHT; } @@ -695,7 +695,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetLocaleName( UINT32 textPosition, UINT32* textLength, - WCHAR const** localeName) SK_OVERRIDE + WCHAR const** localeName) override { *localeName = fLocale; return S_OK; @@ -704,18 +704,18 @@ public: virtual HRESULT STDMETHODCALLTYPE GetNumberSubstitution( UINT32 textPosition, UINT32* textLength, - IDWriteNumberSubstitution** numberSubstitution) SK_OVERRIDE + IDWriteNumberSubstitution** numberSubstitution) override { *numberSubstitution = fNumberSubstitution; return S_OK; } // IUnknown methods - ULONG STDMETHODCALLTYPE AddRef() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE AddRef() override { return InterlockedIncrement(&fRefCount); } - ULONG STDMETHODCALLTYPE Release() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE Release() override { ULONG newCount = InterlockedDecrement(&fRefCount); if (0 == newCount) { delete this; @@ -723,7 +723,7 @@ public: return newCount; } - virtual HRESULT STDMETHODCALLTYPE QueryInterface(IID const& riid, void** ppvObject) SK_OVERRIDE{ + virtual HRESULT STDMETHODCALLTYPE QueryInterface(IID const& riid, void** ppvObject) override{ if (__uuidof(IUnknown) == riid || __uuidof(IDWriteTextAnalysisSource) == riid) { diff --git a/src/ports/SkImageDecoder_WIC.cpp b/src/ports/SkImageDecoder_WIC.cpp index 80fb8a3254..55344a7c18 100644 --- a/src/ports/SkImageDecoder_WIC.cpp +++ b/src/ports/SkImageDecoder_WIC.cpp @@ -67,7 +67,7 @@ public: bool decodeStream(SkStream* stream, SkBitmap* bm, WICModes wicMode, Format* format) const; protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) override; }; struct FormatConversion { diff --git a/src/ports/SkImageGenerator_skia.cpp b/src/ports/SkImageGenerator_skia.cpp index 6938880357..3c2ce09281 100644 --- a/src/ports/SkImageGenerator_skia.cpp +++ b/src/ports/SkImageGenerator_skia.cpp @@ -21,7 +21,7 @@ public: {} protected: - bool allocPixelRef(SkBitmap* bm, SkColorTable* ctable) SK_OVERRIDE { + bool allocPixelRef(SkBitmap* bm, SkColorTable* ctable) override { const SkImageInfo bmi = bm->info(); if (bmi.width() != fInfo.width() || bmi.height() != fInfo.height() || bmi.colorType() != fInfo.colorType()) @@ -43,12 +43,12 @@ public: {} protected: - SkData* onRefEncodedData() SK_OVERRIDE { + SkData* onRefEncodedData() override { return SkRef(fData.get()); } #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO - virtual bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { + virtual bool onGetInfo(SkImageInfo* info) override { *info = fInfo; return true; } @@ -56,7 +56,7 @@ protected: virtual Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options&, - SkPMColor ctableEntries[], int* ctableCount) SK_OVERRIDE { + SkPMColor ctableEntries[], int* ctableCount) override { SkMemoryStream stream(fData->data(), fData->size(), false); SkAutoTUnref<BareMemoryAllocator> allocator(SkNEW_ARGS(BareMemoryAllocator, (info, pixels, rowBytes))); @@ -90,7 +90,7 @@ protected: } bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], - SkYUVColorSpace* colorSpace) SK_OVERRIDE { + SkYUVColorSpace* colorSpace) override { SkMemoryStream stream(fData->data(), fData->size(), false); return fDecoder->decodeYUV8Planes(&stream, sizes, planes, rowBytes, colorSpace); } diff --git a/src/ports/SkRemotableFontMgr_win_dw.cpp b/src/ports/SkRemotableFontMgr_win_dw.cpp index ad1efb7b12..8c6dd84ba5 100644 --- a/src/ports/SkRemotableFontMgr_win_dw.cpp +++ b/src/ports/SkRemotableFontMgr_win_dw.cpp @@ -91,7 +91,7 @@ public: memcpy(fLocaleName.get(), localeName, localeNameLength * sizeof(WCHAR)); } - SkDataTable* getFamilyNames() const SK_OVERRIDE { + SkDataTable* getFamilyNames() const override { int count = fFontCollection->GetFontFamilyCount(); SkDataTableBuilder names(1024); @@ -158,7 +158,7 @@ public: return S_OK; } - SkRemotableFontIdentitySet* getIndex(int familyIndex) const SK_OVERRIDE { + SkRemotableFontIdentitySet* getIndex(int familyIndex) const override { SkTScopedComPtr<IDWriteFontFamily> fontFamily; HRNM(fFontCollection->GetFontFamily(familyIndex, &fontFamily), "Could not get requested family."); @@ -177,7 +177,7 @@ public: } virtual SkFontIdentity matchIndexStyle(int familyIndex, - const SkFontStyle& pattern) const SK_OVERRIDE + const SkFontStyle& pattern) const override { SkFontIdentity identity = { SkFontIdentity::kInvalidDataId }; @@ -216,7 +216,7 @@ public: return S_OK; } - SkRemotableFontIdentitySet* matchName(const char familyName[]) const SK_OVERRIDE { + SkRemotableFontIdentitySet* matchName(const char familyName[]) const override { SkSMallocWCHAR dwFamilyName; if (NULL == familyName) { HR_GENERAL(getDefaultFontFamilyName(&dwFamilyName), @@ -239,7 +239,7 @@ public: } virtual SkFontIdentity matchNameStyle(const char familyName[], - const SkFontStyle& style) const SK_OVERRIDE + const SkFontStyle& style) const override { SkFontIdentity identity = { SkFontIdentity::kInvalidDataId }; @@ -279,7 +279,7 @@ public: DWRITE_MEASURING_MODE measuringMode, DWRITE_GLYPH_RUN const* glyphRun, DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { SkTScopedComPtr<IDWriteFont> font; HRM(fOuter->fFontCollection->GetFontFromFontFace(glyphRun->fontFace, &font), @@ -303,7 +303,7 @@ public: FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_UNDERLINE const* underline, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE DrawStrikethrough( @@ -311,7 +311,7 @@ public: FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_STRIKETHROUGH const* strikethrough, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE DrawInlineObject( @@ -321,13 +321,13 @@ public: IDWriteInlineObject* inlineObject, BOOL isSideways, BOOL isRightToLeft, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } // IDWritePixelSnapping methods virtual HRESULT STDMETHODCALLTYPE IsPixelSnappingDisabled( void* clientDrawingContext, - BOOL* isDisabled) SK_OVERRIDE + BOOL* isDisabled) override { *isDisabled = FALSE; return S_OK; @@ -335,7 +335,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetCurrentTransform( void* clientDrawingContext, - DWRITE_MATRIX* transform) SK_OVERRIDE + DWRITE_MATRIX* transform) override { const DWRITE_MATRIX ident = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0}; *transform = ident; @@ -344,18 +344,18 @@ public: virtual HRESULT STDMETHODCALLTYPE GetPixelsPerDip( void* clientDrawingContext, - FLOAT* pixelsPerDip) SK_OVERRIDE + FLOAT* pixelsPerDip) override { *pixelsPerDip = 1.0f; return S_OK; } // IUnknown methods - ULONG STDMETHODCALLTYPE AddRef() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE AddRef() override { return InterlockedIncrement(&fRefCount); } - ULONG STDMETHODCALLTYPE Release() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE Release() override { ULONG newCount = InterlockedDecrement(&fRefCount); if (0 == newCount) { delete this; @@ -364,7 +364,7 @@ public: } virtual HRESULT STDMETHODCALLTYPE QueryInterface( - IID const& riid, void** ppvObject) SK_OVERRIDE + IID const& riid, void** ppvObject) override { if (__uuidof(IUnknown) == riid || __uuidof(IDWritePixelSnapping) == riid || @@ -390,7 +390,7 @@ public: virtual SkFontIdentity matchNameStyleCharacter(const char familyName[], const SkFontStyle& pattern, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE + SkUnichar character) const override { SkFontIdentity identity = { SkFontIdentity::kInvalidDataId }; @@ -452,7 +452,7 @@ public: return fontFallbackRenderer->FallbackIdentity(); } - SkStreamAsset* getData(int dataId) const SK_OVERRIDE { + SkStreamAsset* getData(int dataId) const override { SkAutoMutexAcquire ama(fDataIdCacheMutex); if (dataId >= fDataIdCache.count()) { return NULL; diff --git a/src/ports/SkScalerContext_win_dw.h b/src/ports/SkScalerContext_win_dw.h index 5c13eab615..abf2bc9aa0 100644 --- a/src/ports/SkScalerContext_win_dw.h +++ b/src/ports/SkScalerContext_win_dw.h @@ -24,13 +24,13 @@ public: virtual ~SkScalerContext_DW(); protected: - unsigned generateGlyphCount() SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; - void generateImage(const SkGlyph& glyph) SK_OVERRIDE; - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; + unsigned generateGlyphCount() override; + uint16_t generateCharToGlyph(SkUnichar uni) override; + void generateAdvance(SkGlyph* glyph) override; + void generateMetrics(SkGlyph* glyph) override; + void generateImage(const SkGlyph& glyph) override; + void generatePath(const SkGlyph& glyph, SkPath* path) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; private: const void* drawDWMask(const SkGlyph& glyph, diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp index a5072b96ce..6650751f3a 100644 --- a/src/ports/SkTypeface_win_dw.cpp +++ b/src/ports/SkTypeface_win_dw.cpp @@ -137,7 +137,7 @@ public: : fIndex(0), fStrings(strings) { } - bool next(SkTypeface::LocalizedString* localizedString) SK_OVERRIDE { + bool next(SkTypeface::LocalizedString* localizedString) override { if (fIndex >= fStrings->GetCount()) { return false; } diff --git a/src/ports/SkTypeface_win_dw.h b/src/ports/SkTypeface_win_dw.h index 9e824e5948..9921aed4f7 100644 --- a/src/ports/SkTypeface_win_dw.h +++ b/src/ports/SkTypeface_win_dw.h @@ -84,7 +84,7 @@ public: } protected: - void weak_dispose() const SK_OVERRIDE { + void weak_dispose() const override { if (fDWriteFontCollectionLoader.get()) { HRV(fFactory->UnregisterFontCollectionLoader(fDWriteFontCollectionLoader.get())); } @@ -96,22 +96,22 @@ protected: INHERITED::weak_dispose(); } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; - SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; + SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; + const uint32_t*, uint32_t) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; virtual int onCharsToGlyphs(const void* chars, Encoding encoding, - uint16_t glyphs[], int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; - int onGetUPEM() const SK_OVERRIDE; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + uint16_t glyphs[], int glyphCount) const override; + int onCountGlyphs() const override; + int onGetUPEM() const override; + void onGetFamilyName(SkString* familyName) const override; + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; + size_t length, void* data) const override; private: typedef SkTypeface INHERITED; |