Bug 1568841 - force GDI parameters for GDI render mode. r=jrmuizel, a=RyanVM
authorLee Salzman <lsalzman@mozilla.com>
Fri, 26 Jul 2019 16:49:14 +0000
changeset 544812 dcfb654ea440ff77d19f3243f7ce0a40c1650cf1
parent 544811 4859fe78b41602342cb67bd6409f1ed79c8030db
child 544813 e9d988b1941c1e0d856779d45d3afee2a481c3ab
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, RyanVM
bugs1568841
milestone69.0
Bug 1568841 - force GDI parameters for GDI render mode. r=jrmuizel, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D39529
gfx/thebes/gfxDWriteFonts.cpp
--- a/gfx/thebes/gfxDWriteFonts.cpp
+++ b/gfx/thebes/gfxDWriteFonts.cpp
@@ -663,17 +663,17 @@ already_AddRefed<ScaledFont> gfxDWriteFo
             UsingClearType()
                 ? (forceGDI ? gfxWindowsPlatform::TEXT_RENDERING_GDI_CLASSIC
                             : gfxWindowsPlatform::TEXT_RENDERING_NORMAL)
                 : gfxWindowsPlatform::TEXT_RENDERING_NO_CLEARTYPE);
 
     DWRITE_RENDERING_MODE renderingMode = params->GetRenderingMode();
     FLOAT gamma = params->GetGamma();
     FLOAT contrast = params->GetEnhancedContrast();
-    if (forceGDI) {
+    if (forceGDI || renderingMode == DWRITE_RENDERING_MODE_GDI_CLASSIC) {
       renderingMode = DWRITE_RENDERING_MODE_GDI_CLASSIC;
       gamma = GetSystemGDIGamma();
       contrast = 0.0f;
     }
 
     const gfxFontStyle* fontStyle = GetStyle();
     mAzureScaledFont = Factory::CreateScaledFontForDWriteFont(
         mFontFace, fontStyle, GetUnscaledFont(), GetAdjustedSize(),