From 9662cfeab486a71cdd4473001d56cf61e673d5b5 Mon Sep 17 00:00:00 2001 From: John Daggett Date: Wed, 10 Dec 2014 13:09:30 +0900 Subject: [PATCH] Bug 1109403 - trim out unused Azure FontOptions struct. r=m_kato --- gfx/2d/2D.h | 14 -------------- gfx/thebes/gfxFT2FontBase.cpp | 23 ----------------------- gfx/thebes/gfxFT2FontBase.h | 6 ------ 3 files changed, 43 deletions(-) diff --git a/gfx/2d/2D.h b/gfx/2d/2D.h index e0d495332c6..6dedea9e6f2 100644 --- a/gfx/2d/2D.h +++ b/gfx/2d/2D.h @@ -598,20 +598,6 @@ protected: UserData mUserData; }; -#ifdef MOZ_ENABLE_FREETYPE -/** - * Describes a font. - * Used to pass the key informatin from a gfxFont into Azure - * @todo Should be replaced by a more long term solution, perhaps Bug 738014 - */ -struct FontOptions -{ - std::string mName; - FontStyle mStyle; -}; -#endif - - /** This class is designed to allow passing additional glyph rendering * parameters to the glyph drawing functions. This is an empty wrapper class * merely used to allow holding on to and passing around platform specific diff --git a/gfx/thebes/gfxFT2FontBase.cpp b/gfx/thebes/gfxFT2FontBase.cpp index 22710869073..5bc62783c00 100644 --- a/gfx/thebes/gfxFT2FontBase.cpp +++ b/gfx/thebes/gfxFT2FontBase.cpp @@ -20,7 +20,6 @@ gfxFT2FontBase::gfxFT2FontBase(cairo_scaled_font_t *aScaledFont, mHasMetrics(false) { cairo_scaled_font_reference(mScaledFont); - ConstructFontOptions(); } gfxFT2FontBase::~gfxFT2FontBase() @@ -216,25 +215,3 @@ gfxFT2FontBase::SetupCairoFont(gfxContext *aContext) cairo_set_scaled_font(cr, cairoFont); return true; } - -void -gfxFT2FontBase::ConstructFontOptions() -{ - NS_LossyConvertUTF16toASCII name(this->GetName()); - mFontOptions.mName = name.get(); - - const gfxFontStyle* style = this->GetStyle(); - if (style->style == NS_FONT_STYLE_ITALIC) { - if (style->weight == NS_FONT_WEIGHT_BOLD) { - mFontOptions.mStyle = FontStyle::BOLD_ITALIC; - } else { - mFontOptions.mStyle = FontStyle::ITALIC; - } - } else { - if (style->weight == NS_FONT_WEIGHT_BOLD) { - mFontOptions.mStyle = FontStyle::BOLD; - } else { - mFontOptions.mStyle = FontStyle::NORMAL; - } - } -} diff --git a/gfx/thebes/gfxFT2FontBase.h b/gfx/thebes/gfxFT2FontBase.h index 623d73a5441..b1a5ed26cc4 100644 --- a/gfx/thebes/gfxFT2FontBase.h +++ b/gfx/thebes/gfxFT2FontBase.h @@ -34,18 +34,12 @@ public: virtual FontType GetType() const MOZ_OVERRIDE { return FONT_TYPE_FT2; } - mozilla::gfx::FontOptions* GetFontOptions() { return &mFontOptions; } - protected: virtual const Metrics& GetHorizontalMetrics() MOZ_OVERRIDE; uint32_t mSpaceGlyph; bool mHasMetrics; Metrics mMetrics; - - // Azure font description - mozilla::gfx::FontOptions mFontOptions; - void ConstructFontOptions(); }; #endif /* GFX_FT2FONTBASE_H */