Backed out changeset 3bc5f2964d59 (bug 1345222) for being an older, busted version of the patch a=backout
authorWes Kocher <wkocher@mozilla.com>
Fri, 17 Mar 2017 10:40:01 -0700
changeset 379099 fe3a14531fea8e7b9a1e8cb86d72c14d698c31a7
parent 379098 993b574eb8289875f621f72965d3ba05f3202a1e
child 379100 a41eef042ceb6cdba74b279d5df464f14a7bd181
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1345222
milestone53.0
backs out3bc5f2964d595f91fa0144a45e704493087cec77
Backed out changeset 3bc5f2964d59 (bug 1345222) for being an older, busted version of the patch a=backout
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1166,20 +1166,18 @@ gfxWindowsPlatform::FontsPrefsChanged(co
     if (clearTextFontCaches) {
         gfxFontCache *fc = gfxFontCache::GetCache();
         if (fc) {
             fc->Flush();
         }
     }
 }
 
-#define DISPLAY1_REGISTRY_KEY \
-    HKEY_CURRENT_USER, "Software\\Microsoft\\Avalon.Graphics\\DISPLAY1"
-
-#define ENHANCED_CONTRAST_VALUE_NAME "EnhancedContrastLevel"
+#define ENHANCED_CONTRAST_REGISTRY_KEY \
+    HKEY_CURRENT_USER, "Software\\Microsoft\\Avalon.Graphics\\DISPLAY1\\EnhancedContrastLevel"
 
 void
 gfxWindowsPlatform::SetupClearTypeParams()
 {
     if (GetDWriteFactory()) {
         // any missing prefs will default to invalid (-1) and be ignored;
         // out-of-range values will also be ignored
         FLOAT gamma = -1.0;
@@ -1236,24 +1234,20 @@ gfxWindowsPlatform::SetupClearTypeParams
         RefPtr<IDWriteRenderingParams> defaultRenderingParams;
         GetDWriteFactory()->CreateRenderingParams(getter_AddRefs(defaultRenderingParams));
         // For EnhancedContrast, we override the default if the user has not set it
         // in the registry (by using the ClearType Tuner).
         if (contrast >= 0.0 && contrast <= 10.0) {
             contrast = contrast;
         } else {
             HKEY hKey;
-            LONG res = RegOpenKeyExA(DISPLAY1_REGISTRY_KEY,
-                                     0, KEY_READ, &hKey);
-            if (res == ERROR_SUCCESS) {
-                res = RegQueryValueExA(hKey, ENHANCED_CONTRAST_VALUE_NAME,
-                                       nullptr, nullptr, nullptr, nullptr);
-                if (res == ERROR_SUCCESS) {
-                    contrast = defaultRenderingParams->GetEnhancedContrast();
-                }
+            if (RegOpenKeyExA(ENHANCED_CONTRAST_REGISTRY_KEY,
+                              0, KEY_READ, &hKey) == ERROR_SUCCESS)
+            {
+                contrast = defaultRenderingParams->GetEnhancedContrast();
                 RegCloseKey(hKey);
             } else {
                 contrast = 1.0;
             }
         }
 
         // For parameters that have not been explicitly set,
         // we copy values from default params (or our overridden value for contrast)