From 49d793eefcb4bafc2bc13b19bfafb0e74e91a0dc Mon Sep 17 00:00:00 2001 From: John Daggett Date: Wed, 7 Jan 2015 14:29:21 +0900 Subject: [PATCH] Bug 1118601 - trim out unused pref fonts list from platform objects. r=m_kato --- gfx/thebes/gfxMacPlatformFontList.h | 2 -- gfx/thebes/gfxQtPlatform.h | 5 ----- gfx/thebes/gfxWindowsPlatform.cpp | 13 ------------- gfx/thebes/gfxWindowsPlatform.h | 8 -------- 4 files changed, 28 deletions(-) diff --git a/gfx/thebes/gfxMacPlatformFontList.h b/gfx/thebes/gfxMacPlatformFontList.h index 6a3e25f15a45..3e51140a37b0 100644 --- a/gfx/thebes/gfxMacPlatformFontList.h +++ b/gfx/thebes/gfxMacPlatformFontList.h @@ -93,8 +93,6 @@ public: const uint8_t* aFontData, uint32_t aLength); - void ClearPrefFonts() { mPrefFonts.Clear(); } - private: friend class gfxPlatformMac; diff --git a/gfx/thebes/gfxQtPlatform.h b/gfx/thebes/gfxQtPlatform.h index 29b9216d9537..e900ba63d14d 100644 --- a/gfx/thebes/gfxQtPlatform.h +++ b/gfx/thebes/gfxQtPlatform.h @@ -72,8 +72,6 @@ public: virtual bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags) MOZ_OVERRIDE; - virtual void ClearPrefFonts() { mPrefFonts.Clear(); } - static int32_t GetDPI(); virtual gfxImageFormat GetOffscreenFormat() MOZ_OVERRIDE; @@ -90,9 +88,6 @@ protected: private: virtual void GetPlatformCMSOutputProfile(void *&mem, size_t &size) MOZ_OVERRIDE; - // TODO: unify this with mPrefFonts (NB: holds families, not fonts) in gfxPlatformFontList - nsDataHashtable > > mPrefFonts; - int mScreenDepth; }; diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index 125d3cc3e03b..064075022429 100644 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -326,7 +326,6 @@ NS_IMPL_ISUPPORTS(GPUAdapterReporter, nsIMemoryReporter) gfxWindowsPlatform::gfxWindowsPlatform() : mD3D11DeviceInitialized(false) - , mPrefFonts(32) { mUseClearTypeForDownloadableFonts = UNINITIALIZED_VALUE; mUseClearTypeAlways = UNINITIALIZED_VALUE; @@ -1098,18 +1097,6 @@ gfxWindowsPlatform::GetPlatformCMSOutputProfile(void* &mem, size_t &mem_size) #endif // _WIN32 } -bool -gfxWindowsPlatform::GetPrefFontEntries(const nsCString& aKey, nsTArray > *array) -{ - return mPrefFonts.Get(aKey, array); -} - -void -gfxWindowsPlatform::SetPrefFontEntries(const nsCString& aKey, nsTArray >& array) -{ - mPrefFonts.Put(aKey, array); -} - bool gfxWindowsPlatform::UseClearTypeForDownloadableFonts() { diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h index 6d37d84aff97..1207828e9cf3 100644 --- a/gfx/thebes/gfxWindowsPlatform.h +++ b/gfx/thebes/gfxWindowsPlatform.h @@ -215,11 +215,6 @@ public: gfxFontFamily *FindFontFamily(const nsAString& aName); gfxFontEntry *FindFontEntry(const nsAString& aName, const gfxFontStyle& aFontStyle); - bool GetPrefFontEntries(const nsCString& aLangGroup, nsTArray > *array); - void SetPrefFontEntries(const nsCString& aLangGroup, nsTArray >& array); - - void ClearPrefFonts() { mPrefFonts.Clear(); } - // ClearType is not always enabled even when available (e.g. Windows XP) // if either of these prefs are enabled and apply, use ClearType rendering bool UseClearTypeForDownloadableFonts(); @@ -290,9 +285,6 @@ private: mozilla::RefPtr mD3D11ReadbackManager; virtual void GetPlatformCMSOutputProfile(void* &mem, size_t &size); - - // TODO: unify this with mPrefFonts (NB: holds families, not fonts) in gfxPlatformFontList - nsDataHashtable > > mPrefFonts; }; bool DoesD3D11TextureSharingWork(ID3D11Device *device);