Bug 1495282 - cherry-pick Skia fix for Mac font gamma. r=mstange
authorLee Salzman <lsalzman@mozilla.com>
Thu, 17 Jan 2019 16:49:18 -0500
changeset 454399 e74eb5b1a8c24dde5473ae3d5409f5fc08ec4a1e
parent 454398 2406b20fb10552e834fdc91054917e3dd633fdff
child 454400 732c870d85fcb67eb1a9e770d6200058332462a0
push id35396
push userebalazs@mozilla.com
push dateFri, 18 Jan 2019 09:40:42 +0000
treeherdermozilla-central@3aa256c255f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1495282
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1495282 - cherry-pick Skia fix for Mac font gamma. r=mstange
gfx/skia/skia/src/ports/SkFontHost_mac.cpp
--- a/gfx/skia/skia/src/ports/SkFontHost_mac.cpp
+++ b/gfx/skia/skia/src/ports/SkFontHost_mac.cpp
@@ -1442,17 +1442,17 @@ void SkScalerContext_Mac::generateImage(
     if (cgPixels == nullptr) {
         return;
     }
 
     // Fix the glyph
     if ((glyph.fMaskFormat == SkMask::kLCD16_Format) ||
         (glyph.fMaskFormat == SkMask::kA8_Format
          && requestSmooth
-         && smooth_behavior() == SmoothBehavior::subpixel))
+         && smooth_behavior() != SmoothBehavior::none))
     {
         const uint8_t* linear = gLinearCoverageFromCGLCDValue.data();
 
         //Note that the following cannot really be integrated into the
         //pre-blend, since we may not be applying the pre-blend; when we aren't
         //applying the pre-blend it means that a filter wants linear anyway.
         //Other code may also be applying the pre-blend, so we'd need another
         //one with this and one without.