Backed out changeset 1dbf0a33cc36 (bug 1338426) for bustage. r=backout

This commit is contained in:
Sebastian Hengst 2017-02-14 21:35:27 +01:00
parent d2703c8176
commit 9f66506283
2 changed files with 10 additions and 14 deletions

View File

@ -31,6 +31,8 @@
#include <string>
#endif
#include "gfxPrefs.h"
struct _cairo_surface;
typedef _cairo_surface cairo_surface_t;
@ -717,7 +719,13 @@ public:
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

View File

@ -5,8 +5,6 @@
#include "ScaledFontBase.h"
#include "gfxPrefs.h"
#ifdef USE_SKIA
#include "PathSkia.h"
#include "skia/include/core/SkPaint.h"
@ -26,16 +24,6 @@ using namespace std;
namespace mozilla {
namespace gfx {
AntialiasMode
ScaledFont::GetDefaultAAMode()
{
if (gfxPrefs::DisableAllTextAA()) {
return AntialiasMode::NONE;
}
return AntialiasMode::DEFAULT;
}
ScaledFontBase::~ScaledFontBase()
{
#ifdef USE_SKIA
@ -265,7 +253,7 @@ ScaledFontBase::SetCairoScaledFont(cairo_scaled_font_t* font)
if (font == mScaledFont)
return;
if (mScaledFont)
cairo_scaled_font_destroy(mScaledFont);