Bug 1040668 part 6 - Add some specifier on gfxTextRun and gfxShapedWord so that compilers are able to reason out certain optimizations. r=jfkthame

This commit is contained in:
Xidorn Quan 2015-11-28 11:56:33 +11:00
parent dd323bcbe4
commit db8da6ef2c
2 changed files with 2 additions and 2 deletions

View File

@ -1141,7 +1141,7 @@ protected:
* The glyph data is copied into gfxTextRuns as needed from the cache of
* ShapedWords associated with each gfxFont instance.
*/
class gfxShapedWord : public gfxShapedText
class gfxShapedWord final : public gfxShapedText
{
public:
// Create a ShapedWord that can hold glyphs for aLength characters,

View File

@ -476,7 +476,7 @@ public:
void SortGlyphRuns();
void SanitizeGlyphRuns();
CompressedGlyph* GetCharacterGlyphs() {
CompressedGlyph* GetCharacterGlyphs() final {
NS_ASSERTION(mCharacterGlyphs, "failed to initialize mCharacterGlyphs");
return mCharacterGlyphs;
}