Bug 1514112 - Listen for font setting changes even if DWrite is not used. r=jrmuizel, a=RyanVM
authorLee Salzman <lsalzman@mozilla.com>
Mon, 07 Jan 2019 11:46:04 -0500
changeset 509367 7755fe5f3b0a84cc095b37a10a67d3488bf9cb1a
parent 509366 2046aa36055220d9187f968fca3ab070d2de7665
child 509368 d902ac21513900909c9673423827f16f76b12ada
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, RyanVM
bugs1514112
milestone65.0
Bug 1514112 - Listen for font setting changes even if DWrite is not used. r=jrmuizel, a=RyanVM
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -427,16 +427,20 @@ void gfxWindowsPlatform::InitAcceleratio
   InitializeDevices();
   UpdateANGLEConfig();
   UpdateRenderMode();
 
   // If we have Skia and we didn't init dwrite already, do it now.
   if (!DWriteEnabled() && GetDefaultContentBackend() == BackendType::SKIA) {
     InitDWriteSupport();
   }
+  // We need to listen for font setting changes even if DWrite is not used.
+  Factory::SetSystemTextQuality(gfxVars::SystemTextQuality());
+  gfxVars::SetSystemTextQualityListener(
+      gfxDWriteFont::SystemTextQualityChanged);
 
   // CanUseHardwareVideoDecoding depends on DeviceManagerDx state,
   // so update the cached value now.
   UpdateCanUseHardwareVideoDecoding();
 }
 
 void gfxWindowsPlatform::InitWebRenderConfig() {
   gfxPlatform::InitWebRenderConfig();
@@ -460,19 +464,16 @@ bool gfxWindowsPlatform::CanUseHardwareV
 bool gfxWindowsPlatform::InitDWriteSupport() {
   mozilla::ScopedGfxFeatureReporter reporter("DWrite");
   if (!Factory::EnsureDWriteFactory()) {
     return false;
   }
 
   SetupClearTypeParams();
   reporter.SetSuccessful();
-  Factory::SetSystemTextQuality(gfxVars::SystemTextQuality());
-  gfxVars::SetSystemTextQualityListener(
-      gfxDWriteFont::SystemTextQualityChanged);
   return true;
 }
 
 bool gfxWindowsPlatform::HandleDeviceReset() {
   DeviceResetReason resetReason = DeviceResetReason::OK;
   if (!DidRenderingDeviceReset(&resetReason)) {
     return false;
   }