Backed out changeset 1dbf0a33cc36 (bug 1338426) for bustage. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 14 Feb 2017 21:35:27 +0100
changeset 342901 8a0b376c0afac43608015827a4c34b37eab3b718
parent 342900 13cfe25ef134da155ae827b5cc4a5c3a77219f85
child 342902 f944183330cc3eb499e84edfcd4c4864527635d9
push id31366
push usercbook@mozilla.com
push dateWed, 15 Feb 2017 11:25:19 +0000
treeherdermozilla-central@c0807d6938c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1338426
milestone54.0a1
backs out1dbf0a33cc36641f13a084fbdd0b9a23005598e5
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
Backed out changeset 1dbf0a33cc36 (bug 1338426) for bustage. r=backout
gfx/2d/2D.h
gfx/2d/ScaledFontBase.cpp
--- a/gfx/2d/2D.h
+++ b/gfx/2d/2D.h
@@ -26,16 +26,18 @@
 #include "mozilla/RefPtr.h"
 
 #include "mozilla/DebugOnly.h"
 
 #ifdef MOZ_ENABLE_FREETYPE
 #include <string>
 #endif
 
+#include "gfxPrefs.h"
+
 struct _cairo_surface;
 typedef _cairo_surface cairo_surface_t;
 
 struct _cairo_scaled_font;
 typedef _cairo_scaled_font cairo_scaled_font_t;
 
 struct _FcPattern;
 typedef _FcPattern FcPattern;
@@ -712,17 +714,23 @@ public:
 
   typedef void (*FontFileDataOutput)(const uint8_t *aData, uint32_t aLength, uint32_t aIndex, Float aGlyphSize,
                                      uint32_t aVariationCount, const VariationSetting* aVariations,
                                      void *aBaton);
   typedef void (*FontInstanceDataOutput)(const uint8_t* aData, uint32_t aLength, void* aBaton);
   typedef void (*FontDescriptorOutput)(const uint8_t* aData, uint32_t aLength, Float aFontSize, void* aBaton);
 
   virtual FontType GetType() const = 0;
-  virtual AntialiasMode GetDefaultAAMode();
+  virtual AntialiasMode GetDefaultAAMode() {
+    if (gfxPrefs::DisableAllTextAA()) {
+      return AntialiasMode::NONE;
+    }
+
+    return AntialiasMode::DEFAULT;
+  }
 
   /** This allows getting a path that describes the outline of a set of glyphs.
    * A target is passed in so that the guarantee is made the returned path
    * can be used with any DrawTarget that has the same backend as the one
    * passed in.
    */
   virtual already_AddRefed<Path> GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aTarget) = 0;
 
--- a/gfx/2d/ScaledFontBase.cpp
+++ b/gfx/2d/ScaledFontBase.cpp
@@ -1,17 +1,15 @@
 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ScaledFontBase.h"
 
-#include "gfxPrefs.h"
-
 #ifdef USE_SKIA
 #include "PathSkia.h"
 #include "skia/include/core/SkPaint.h"
 #endif
 
 #ifdef USE_CAIRO
 #include "PathCairo.h"
 #include "DrawTargetCairo.h"
@@ -21,26 +19,16 @@
 #include <vector>
 #include <cmath>
 
 using namespace std;
 
 namespace mozilla {
 namespace gfx {
 
-AntialiasMode
-ScaledFont::GetDefaultAAMode()
-{
-  if (gfxPrefs::DisableAllTextAA()) {
-    return AntialiasMode::NONE;
-  }
-
-  return AntialiasMode::DEFAULT;
-}
-
 ScaledFontBase::~ScaledFontBase()
 {
 #ifdef USE_SKIA
   SkSafeUnref(mTypeface);
 #endif
 #ifdef USE_CAIRO_SCALED_FONT
   cairo_scaled_font_destroy(mScaledFont);
 #endif
@@ -260,17 +248,17 @@ ScaledFontBase::GetGlyphDesignMetrics(co
 #ifdef USE_CAIRO_SCALED_FONT
 void
 ScaledFontBase::SetCairoScaledFont(cairo_scaled_font_t* font)
 {
   MOZ_ASSERT(!mScaledFont);
 
   if (font == mScaledFont)
     return;
-
+ 
   if (mScaledFont)
     cairo_scaled_font_destroy(mScaledFont);
 
   mScaledFont = font;
   cairo_scaled_font_reference(mScaledFont);
 }
 #endif