diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index f7f2deb06a5a..a975fbfca4e2 100644 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -78,9 +78,6 @@ #endif #endif -#include -#include - #ifdef CAIRO_HAS_D2D_SURFACE #include "gfxD2DSurface.h" @@ -779,36 +776,6 @@ gfxWindowsPlatform::GetDLLVersion(const PRUnichar *aDLLPath, nsAString& aVersion aVersion.Assign(NS_ConvertUTF8toUTF16(buf)); } -void -gfxWindowsPlatform::GetFontCacheSize(nsAString& aSize) -{ - WIN32_FIND_DATAW findFileData; - HANDLE file; - WCHAR path[MAX_PATH]; - - aSize.Assign(L"n/a"); - - if (FAILED(SHGetFolderPathW(NULL, CSIDL_WINDOWS, NULL, 0, path))) { - return; - } - - PathAppendW(path, - L"ServiceProfiles\\LocalService\\AppData\\Local\\FontCache-*-*.dat"); - file = FindFirstFileW(path, &findFileData); - if (file == INVALID_HANDLE_VALUE) { - return; - } - - WCHAR size[256]; - - double sizeMB = (double(findFileData.nFileSizeLow) + - findFileData.nFileSizeHigh * (double(MAXDWORD) + 1)) - / 1000000.0; - swprintf_s(size, NS_ARRAY_LENGTH(size), L"%.2f MB", sizeMB); - aSize.Assign(size); - FindClose(file); -} - void gfxWindowsPlatform::FontsPrefsChanged(nsIPrefBranch *aPrefBranch, const char *aPref) { diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h index e92c14bd1ff0..641d66220237 100644 --- a/gfx/thebes/gfxWindowsPlatform.h +++ b/gfx/thebes/gfxWindowsPlatform.h @@ -236,8 +236,6 @@ public: static void GetDLLVersion(const PRUnichar *aDLLPath, nsAString& aVersion); - static void GetFontCacheSize(nsAString& aSize); - virtual void FontsPrefsChanged(nsIPrefBranch *aPrefBranch, const char *aPref); #ifdef CAIRO_HAS_DWRITE_FONT diff --git a/widget/src/windows/GfxInfo.cpp b/widget/src/windows/GfxInfo.cpp index d7f4507d9cb9..342b642de444 100644 --- a/widget/src/windows/GfxInfo.cpp +++ b/widget/src/windows/GfxInfo.cpp @@ -102,13 +102,7 @@ GfxInfo::GetDWriteEnabled(PRBool *aEnabled) NS_IMETHODIMP GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) { - nsAutoString str; - gfxWindowsPlatform::GetPlatform()->GetDLLVersion(L"dwrite.dll", str); - aDwriteVersion.Assign(str); - aDwriteVersion.Append(L", font cache "); - gfxWindowsPlatform::GetPlatform()->GetFontCacheSize(str); - aDwriteVersion.Append(str); - + gfxWindowsPlatform::GetPlatform()->GetDLLVersion(L"dwrite.dll", aDwriteVersion); return NS_OK; }