mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1457505 - Fix the check for variation-font support in gfxWindowsPlatform: cannot depend on checking mUsingDirectWrite, as the fontlist is not yet set up. r=lsalzman
This commit is contained in:
parent
8524a808f2
commit
5e9926e820
@ -308,7 +308,6 @@ NS_IMPL_ISUPPORTS(D3DSharedTexturesReporter, nsIMemoryReporter)
|
||||
|
||||
gfxWindowsPlatform::gfxWindowsPlatform()
|
||||
: mRenderMode(RENDER_GDI)
|
||||
, mUsingDirectWrite(false)
|
||||
{
|
||||
/*
|
||||
* Initialize COM
|
||||
@ -562,7 +561,6 @@ gfxWindowsPlatform::CreatePlatformFontList()
|
||||
if (IsNotWin7PreRTM() && DWriteEnabled()) {
|
||||
pfl = new gfxDWriteFontList();
|
||||
if (NS_SUCCEEDED(pfl->InitFontList())) {
|
||||
mUsingDirectWrite = true;
|
||||
return pfl;
|
||||
}
|
||||
// DWrite font initialization failed! Don't know why this would happen,
|
||||
@ -573,7 +571,10 @@ gfxWindowsPlatform::CreatePlatformFontList()
|
||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_FONT_FAIL"));
|
||||
}
|
||||
|
||||
mUsingDirectWrite = false;
|
||||
// Ensure this is false, even if the Windows version was recent enough to
|
||||
// permit it, as we're using GDI fonts.
|
||||
mHasVariationFontSupport = false;
|
||||
|
||||
pfl = new gfxGDIFontList();
|
||||
|
||||
if (NS_SUCCEEDED(pfl->InitFontList())) {
|
||||
@ -2070,6 +2071,6 @@ gfxWindowsPlatform::SupportsPluginDirectDXGIDrawing()
|
||||
bool
|
||||
gfxWindowsPlatform::CheckVariationFontSupport()
|
||||
{
|
||||
// Variation font support is only on Fall Creators Update or later
|
||||
return mUsingDirectWrite && IsWin10FallCreatorsUpdateOrLater();
|
||||
// Variation font support is only available on Fall Creators Update or later.
|
||||
return IsWin10FallCreatorsUpdateOrLater();
|
||||
}
|
||||
|
@ -267,8 +267,6 @@ private:
|
||||
RefPtr<mozilla::layers::ReadbackManagerD3D11> mD3D11ReadbackManager;
|
||||
|
||||
nsTArray<D3D_FEATURE_LEVEL> mFeatureLevels;
|
||||
|
||||
bool mUsingDirectWrite;
|
||||
};
|
||||
|
||||
#endif /* GFX_WINDOWS_PLATFORM_H */
|
||||
|
Loading…
Reference in New Issue
Block a user