Bug 1207258 - Give back the ability to run direct write without D2D, but only with a *force* preference. r=dvander

This commit is contained in:
Milan Sreckovic 2015-10-05 11:40:00 +02:00
parent ea412304c7
commit faa5c52d49
3 changed files with 11 additions and 0 deletions

View File

@ -240,6 +240,7 @@ private:
DECL_GFX_PREF(Live, "gfx.direct2d.use1_1", Direct2DUse1_1, bool, false);
DECL_GFX_PREF(Live, "gfx.direct2d.allow1_0", Direct2DAllow1_0, bool, false);
DECL_GFX_PREF(Live, "gfx.draw-color-bars", CompositorDrawColorBars, bool, false);
DECL_GFX_PREF(Once, "gfx.font_rendering.directwrite.force-enabled", DirectWriteFontRenderingForceEnabled, bool, false);
DECL_GFX_PREF(Live, "gfx.gralloc.fence-with-readpixels", GrallocFenceWithReadPixels, bool, false);
DECL_GFX_PREF(Live, "gfx.layerscope.enabled", LayerScopeEnabled, bool, false);
DECL_GFX_PREF(Live, "gfx.layerscope.port", LayerScopePort, int32_t, 23456);

View File

@ -2249,6 +2249,15 @@ gfxWindowsPlatform::InitializeDevices()
if (mD3D11Status == FeatureStatus::Available) {
InitializeD2D();
}
// Usually we want D2D in order to use DWrite, but if the users have it
// forced, we'll let them have it, as unsupported configuration.
if (gfxPrefs::DirectWriteFontRenderingForceEnabled() &&
IsFeatureStatusFailure(mD2DStatus) &&
!mDWriteFactory) {
gfxCriticalNote << "Attempting DWrite without D2D support";
InitDWriteSupport();
}
}
FeatureStatus

View File

@ -670,6 +670,7 @@ pref("gfx.font_rendering.wordcache.maxentries", 10000);
pref("gfx.font_rendering.graphite.enabled", true);
#ifdef XP_WIN
pref("gfx.font_rendering.directwrite.force-enabled", false);
pref("gfx.font_rendering.directwrite.use_gdi_table_loading", true);
#endif