зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1338426 - gfx/2d/2D.h should not include gfxPrefs.h. - r=bas
MozReview-Commit-ID: 8Ep8ZrqFtxO
This commit is contained in:
Родитель
c33ae45d5e
Коммит
617a860f57
10
gfx/2d/2D.h
10
gfx/2d/2D.h
|
@ -31,8 +31,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gfxPrefs.h"
|
|
||||||
|
|
||||||
struct _cairo_surface;
|
struct _cairo_surface;
|
||||||
typedef _cairo_surface cairo_surface_t;
|
typedef _cairo_surface cairo_surface_t;
|
||||||
|
|
||||||
|
@ -719,13 +717,7 @@ public:
|
||||||
typedef void (*FontDescriptorOutput)(const uint8_t* aData, uint32_t aLength, Float aFontSize, void* aBaton);
|
typedef void (*FontDescriptorOutput)(const uint8_t* aData, uint32_t aLength, Float aFontSize, void* aBaton);
|
||||||
|
|
||||||
virtual FontType GetType() const = 0;
|
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.
|
/** 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
|
* A target is passed in so that the guarantee is made the returned path
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#include "ScaledFontBase.h"
|
#include "ScaledFontBase.h"
|
||||||
|
|
||||||
|
#include "gfxPrefs.h"
|
||||||
|
|
||||||
#ifdef USE_SKIA
|
#ifdef USE_SKIA
|
||||||
#include "PathSkia.h"
|
#include "PathSkia.h"
|
||||||
#include "skia/include/core/SkPaint.h"
|
#include "skia/include/core/SkPaint.h"
|
||||||
|
@ -24,6 +26,16 @@ using namespace std;
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace gfx {
|
namespace gfx {
|
||||||
|
|
||||||
|
AntialiasMode
|
||||||
|
ScaledFont::GetDefaultAAMode()
|
||||||
|
{
|
||||||
|
if (gfxPrefs::DisableAllTextAA()) {
|
||||||
|
return AntialiasMode::NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return AntialiasMode::DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
ScaledFontBase::~ScaledFontBase()
|
ScaledFontBase::~ScaledFontBase()
|
||||||
{
|
{
|
||||||
#ifdef USE_SKIA
|
#ifdef USE_SKIA
|
||||||
|
@ -253,7 +265,7 @@ ScaledFontBase::SetCairoScaledFont(cairo_scaled_font_t* font)
|
||||||
|
|
||||||
if (font == mScaledFont)
|
if (font == mScaledFont)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mScaledFont)
|
if (mScaledFont)
|
||||||
cairo_scaled_font_destroy(mScaledFont);
|
cairo_scaled_font_destroy(mScaledFont);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче