mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 934533 - Remove the azure content enabled pref since we require it to be enabled for all platforms now. r=nrc
--HG-- extra : rebase_source : f5152dd3c088009c80cda2844589967ed047e888
This commit is contained in:
parent
b99e3bd0c2
commit
bc7e07900f
@ -262,7 +262,6 @@ pref("layers.acceleration.disabled", false);
|
||||
pref("layers.offmainthreadcomposition.async-animations", true);
|
||||
pref("layers.async-video.enabled", true);
|
||||
pref("layers.async-pan-zoom.enabled", true);
|
||||
pref("gfx.content.azure.enabled", true);
|
||||
pref("gfx.content.azure.backends", "cairo");
|
||||
#endif
|
||||
|
||||
|
@ -297,7 +297,8 @@ gfxPlatform::gfxPlatform()
|
||||
|
||||
uint32_t canvasMask = (1 << BACKEND_CAIRO) | (1 << BACKEND_SKIA);
|
||||
uint32_t contentMask = 1 << BACKEND_CAIRO;
|
||||
InitBackendPrefs(canvasMask, contentMask);
|
||||
InitBackendPrefs(canvasMask, BACKEND_CAIRO,
|
||||
contentMask, BACKEND_CAIRO);
|
||||
}
|
||||
|
||||
gfxPlatform*
|
||||
@ -1470,39 +1471,38 @@ gfxPlatform::AppendPrefLang(eFontPrefLang aPrefLangs[], uint32_t& aLen, eFontPre
|
||||
}
|
||||
|
||||
void
|
||||
gfxPlatform::InitBackendPrefs(uint32_t aCanvasBitmask, uint32_t aContentBitmask)
|
||||
gfxPlatform::InitBackendPrefs(uint32_t aCanvasBitmask, BackendType aCanvasDefault,
|
||||
uint32_t aContentBitmask, BackendType aContentDefault)
|
||||
{
|
||||
mPreferredCanvasBackend = GetCanvasBackendPref(aCanvasBitmask);
|
||||
if (!mPreferredCanvasBackend) {
|
||||
mPreferredCanvasBackend = BACKEND_CAIRO;
|
||||
mPreferredCanvasBackend = aCanvasDefault;
|
||||
}
|
||||
mFallbackCanvasBackend = GetCanvasBackendPref(aCanvasBitmask & ~(1 << mPreferredCanvasBackend));
|
||||
mFallbackCanvasBackend =
|
||||
GetCanvasBackendPref(aCanvasBitmask & ~(1 << mPreferredCanvasBackend));
|
||||
|
||||
mContentBackendBitmask = aContentBitmask;
|
||||
mContentBackend = GetContentBackendPref(mContentBackendBitmask);
|
||||
if (!mContentBackend) {
|
||||
mContentBackend = aContentDefault;
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ BackendType
|
||||
gfxPlatform::GetCanvasBackendPref(uint32_t aBackendBitmask)
|
||||
{
|
||||
return GetBackendPref(nullptr, "gfx.canvas.azure.backends", aBackendBitmask);
|
||||
return GetBackendPref("gfx.canvas.azure.backends", aBackendBitmask);
|
||||
}
|
||||
|
||||
/* static */ BackendType
|
||||
gfxPlatform::GetContentBackendPref(uint32_t &aBackendBitmask)
|
||||
{
|
||||
return GetBackendPref("gfx.content.azure.enabled", "gfx.content.azure.backends", aBackendBitmask);
|
||||
return GetBackendPref("gfx.content.azure.backends", aBackendBitmask);
|
||||
}
|
||||
|
||||
/* static */ BackendType
|
||||
gfxPlatform::GetBackendPref(const char* aEnabledPrefName, const char* aBackendPrefName, uint32_t &aBackendBitmask)
|
||||
gfxPlatform::GetBackendPref(const char* aBackendPrefName, uint32_t &aBackendBitmask)
|
||||
{
|
||||
if (aEnabledPrefName &&
|
||||
!Preferences::GetBool(aEnabledPrefName, false)) {
|
||||
aBackendBitmask = 0;
|
||||
return BACKEND_NONE;
|
||||
}
|
||||
|
||||
nsTArray<nsCString> backendList;
|
||||
nsCString prefString;
|
||||
if (NS_SUCCEEDED(Preferences::GetCString(aBackendPrefName, &prefString))) {
|
||||
|
@ -639,7 +639,8 @@ protected:
|
||||
* The backend used is determined by aBackendBitmask and the order specified
|
||||
* by the gfx.canvas.azure.backends pref.
|
||||
*/
|
||||
void InitBackendPrefs(uint32_t aCanvasBitmask, uint32_t aContentBitmask);
|
||||
void InitBackendPrefs(uint32_t aCanvasBitmask, mozilla::gfx::BackendType aCanvasDefault,
|
||||
uint32_t aContentBitmask, mozilla::gfx::BackendType aContentDefault);
|
||||
|
||||
/**
|
||||
* returns the first backend named in the pref gfx.canvas.azure.backends
|
||||
@ -654,15 +655,12 @@ protected:
|
||||
static mozilla::gfx::BackendType GetContentBackendPref(uint32_t &aBackendBitmask);
|
||||
|
||||
/**
|
||||
* If aEnabledPrefName is non-null, checks the aEnabledPrefName pref and
|
||||
* returns BACKEND_NONE if the pref is not enabled.
|
||||
* Otherwise it will return the first backend named in aBackendPrefName
|
||||
* Will return the first backend named in aBackendPrefName
|
||||
* allowed by aBackendBitmask, a bitmask of backend types.
|
||||
* It also modifies aBackendBitmask to only include backends that are
|
||||
* allowed given the prefs.
|
||||
*/
|
||||
static mozilla::gfx::BackendType GetBackendPref(const char* aEnabledPrefName,
|
||||
const char* aBackendPrefName,
|
||||
static mozilla::gfx::BackendType GetBackendPref(const char* aBackendPrefName,
|
||||
uint32_t &aBackendBitmask);
|
||||
/**
|
||||
* Decode the backend enumberation from a string.
|
||||
|
@ -93,7 +93,8 @@ gfxPlatformGtk::gfxPlatformGtk()
|
||||
#endif
|
||||
uint32_t canvasMask = (1 << BACKEND_CAIRO) | (1 << BACKEND_SKIA);
|
||||
uint32_t contentMask = (1 << BACKEND_CAIRO) | (1 << BACKEND_SKIA);
|
||||
InitBackendPrefs(canvasMask, contentMask);
|
||||
InitBackendPrefs(canvasMask, BACKEND_CAIRO,
|
||||
contentMask, BACKEND_CAIRO);
|
||||
}
|
||||
|
||||
gfxPlatformGtk::~gfxPlatformGtk()
|
||||
|
@ -67,8 +67,9 @@ gfxPlatformMac::gfxPlatformMac()
|
||||
mFontAntiAliasingThreshold = ReadAntiAliasingThreshold();
|
||||
|
||||
uint32_t canvasMask = (1 << BACKEND_CAIRO) | (1 << BACKEND_SKIA) | (1 << BACKEND_COREGRAPHICS);
|
||||
uint32_t contentMask = (1 << BACKEND_CAIRO) | (1 << BACKEND_COREGRAPHICS);
|
||||
InitBackendPrefs(canvasMask, contentMask);
|
||||
uint32_t contentMask = (1 << BACKEND_COREGRAPHICS);
|
||||
InitBackendPrefs(canvasMask, BACKEND_COREGRAPHICS,
|
||||
contentMask, BACKEND_COREGRAPHICS);
|
||||
}
|
||||
|
||||
gfxPlatformMac::~gfxPlatformMac()
|
||||
|
@ -508,13 +508,16 @@ gfxWindowsPlatform::UpdateRenderMode()
|
||||
|
||||
uint32_t canvasMask = 1 << BACKEND_CAIRO;
|
||||
uint32_t contentMask = 1 << BACKEND_CAIRO;
|
||||
BackendType defaultBackend = BACKEND_CAIRO;
|
||||
if (mRenderMode == RENDER_DIRECT2D) {
|
||||
canvasMask |= 1 << BACKEND_DIRECT2D;
|
||||
contentMask |= 1 << BACKEND_DIRECT2D;
|
||||
defaultBackend = BACKEND_DIRECT2D;
|
||||
} else {
|
||||
canvasMask |= 1 << BACKEND_SKIA;
|
||||
}
|
||||
InitBackendPrefs(canvasMask, contentMask);
|
||||
InitBackendPrefs(canvasMask, defaultBackend,
|
||||
contentMask, defaultBackend);
|
||||
}
|
||||
|
||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
||||
|
@ -374,13 +374,10 @@ pref("gfx.font_rendering.opentype_svg.enabled", true);
|
||||
// e.g., pref("gfx.canvas.azure.backends", "direct2d,skia,cairo");
|
||||
pref("gfx.canvas.azure.backends", "direct2d,skia,cairo");
|
||||
pref("gfx.content.azure.backends", "direct2d,cairo");
|
||||
pref("gfx.content.azure.enabled", true);
|
||||
#else
|
||||
pref("gfx.content.azure.enabled", false);
|
||||
#ifdef XP_MACOSX
|
||||
pref("gfx.content.azure.backends", "cg");
|
||||
pref("gfx.canvas.azure.backends", "cg");
|
||||
pref("gfx.content.azure.enabled", true);
|
||||
// Accelerated cg canvas where available (10.7+)
|
||||
pref("gfx.canvas.azure.accelerated", false);
|
||||
#else
|
||||
@ -390,13 +387,11 @@ pref("gfx.content.azure.backends", "cairo");
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
pref("gfx.content.azure.enabled", true);
|
||||
pref("gfx.content.azure.backends", "cairo");
|
||||
#endif
|
||||
#ifdef ANDROID
|
||||
pref("gfx.textures.poweroftwo.force-enabled", false);
|
||||
pref("gfx.content.azure.backends", "cairo");
|
||||
pref("gfx.content.azure.enabled", true);
|
||||
#endif
|
||||
|
||||
pref("gfx.work-around-driver-bugs", true);
|
||||
|
Loading…
Reference in New Issue
Block a user