зеркало из 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>
|
||||
#endif
|
||||
|
||||
#include "gfxPrefs.h"
|
||||
|
||||
struct _cairo_surface;
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче