Backed out changeset 516ad0cab188 (bug 1801512) for causing reftest failures on 411334-1.xml CLOSED TREE

This commit is contained in:
Cristian Tuns 2022-11-24 11:50:23 -05:00
parent ced64a9f0f
commit 388949ba3a
2 changed files with 0 additions and 16 deletions

View File

@ -35,9 +35,6 @@
#define ENHANCED_CONTRAST_VALUE_NAME L"EnhancedContrastLevel"
#define CONTROL_PANEL_REGISTRY_KEY HKEY_CURRENT_USER, L"Control Panel\\Desktop"
#define FONT_SMOOTHING_GAMMA_VALUE L"FontSmoothingGamma"
// FIXME: This shouldn't look at constants probably.
static inline DWRITE_FONT_STRETCH DWriteFontStretchFromStretch(
mozilla::FontStretch aStretch) {

View File

@ -211,19 +211,6 @@ void gfxDWriteFont::UpdateClearTypeVars() {
gamma = defaultRenderingParams->GetGamma();
pixelGeometry = defaultRenderingParams->GetPixelGeometry();
renderingMode = defaultRenderingParams->GetRenderingMode();
if (RegOpenKeyExW(CONTROL_PANEL_REGISTRY_KEY, 0, KEY_READ, &hKey) ==
ERROR_SUCCESS) {
DWORD type;
DWORD value;
DWORD valueSize = sizeof(value);
if (RegQueryValueExW(hKey, FONT_SMOOTHING_GAMMA_VALUE, nullptr, &type,
(LPBYTE)&value, &valueSize) == ERROR_SUCCESS &&
type == REG_DWORD) {
gamma = value / 1000.0f;
}
RegCloseKey(hKey);
}
} else {
gfxWarning() << "Failed to create default rendering params";
}