Bug 1338426 - gfx/2d/2D.h should not include gfxPrefs.h. - r=bas

MozReview-Commit-ID: 8Ep8ZrqFtxO
This commit is contained in:
Jeff Gilbert 2017-02-09 20:42:14 -08:00
Родитель 8c84a0ad77
Коммит 5087ca68c8
2 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -32,8 +32,6 @@
#include <string>
#endif
#include "gfxPrefs.h"
struct _cairo_surface;
typedef _cairo_surface cairo_surface_t;
@ -720,13 +718,7 @@ public:
typedef void (*FontDescriptorOutput)(const uint8_t* aData, uint32_t aLength, Float aFontSize, void* aBaton);
virtual FontType GetType() const = 0;
virtual AntialiasMode GetDefaultAAMode() {
if (gfxPrefs::DisableAllTextAA()) {
return AntialiasMode::NONE;
}
return AntialiasMode::DEFAULT;
}
virtual AntialiasMode GetDefaultAAMode();
/** 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

Просмотреть файл

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