зеркало из https://github.com/mozilla/gecko-dev.git
Bug 634286. Remove font cache size info from about:support on Windows. r=jmuizelaar
This commit is contained in:
Родитель
e95cda65f3
Коммит
4e1a8c20b8
|
@ -78,9 +78,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче