Bug 1249033 - Enable Subpixel AA Text on Skia for Dwrite and GDI Fonts. r=jrmuizel
authorMason Chang <mchang@mozilla.com>
Thu, 18 Feb 2016 08:37:43 -0800
changeset 331912 1c20a8b69e1251a772819b96288e0f8d0ab3d773
parent 331911 ded9e2d81845f5b62dfb8035df307d7dc05c14f2
child 331913 81228410543e5249d7b0305b04007451a3df6f20
push id11113
push userrjesup@wgate.com
push dateThu, 18 Feb 2016 19:00:12 +0000
reviewersjrmuizel
bugs1249033
milestone47.0a1
Bug 1249033 - Enable Subpixel AA Text on Skia for Dwrite and GDI Fonts. r=jrmuizel
gfx/2d/DrawTargetSkia.cpp
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -549,16 +549,18 @@ DrawTargetSkia::ShouldLCDRenderText(Font
   // For non-opaque surfaces, only allow subpixel AA if explicitly permitted.
   if (!IsOpaque(mFormat) && !mPermitSubpixelAA) {
     return false;
   }
 
   if (aAntialiasMode == AntialiasMode::DEFAULT) {
     switch (aFontType) {
       case FontType::MAC:
+      case FontType::GDI:
+      case FontType::DWRITE:
         return true;
       default:
         // TODO: Figure out what to do for the other platforms.
         return false;
     }
   }
   return (aAntialiasMode == AntialiasMode::SUBPIXEL);
 }