mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1403220 - De-optimize some font functions to work around an MSVC PGO crash. r+a=RyanVM
This commit is contained in:
parent
a3b6b15cef
commit
cb46df4d86
@ -4485,6 +4485,10 @@ nsLayoutUtils::ComputeObjectDestRect(const nsRect& aConstraintRect,
|
||||
return nsRect(imageTopLeftPt, concreteObjectSize);
|
||||
}
|
||||
|
||||
// Bug 1403220: Suspected MSVC PGO miscompilation
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
already_AddRefed<nsFontMetrics>
|
||||
nsLayoutUtils::GetFontMetricsForFrame(const nsIFrame* aFrame, float aInflation)
|
||||
{
|
||||
@ -4504,6 +4508,9 @@ nsLayoutUtils::GetFontMetricsForFrame(const nsIFrame* aFrame, float aInflation)
|
||||
}
|
||||
return GetFontMetricsForStyleContext(styleContext, aInflation, variantWidth);
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
already_AddRefed<nsFontMetrics>
|
||||
nsLayoutUtils::GetFontMetricsForStyleContext(nsStyleContext* aStyleContext,
|
||||
|
@ -2006,6 +2006,10 @@ BuildTextRunsScanner::GetNextBreakBeforeFrame(uint32_t* aIndex)
|
||||
return static_cast<nsTextFrame*>(mLineBreakBeforeFrames.ElementAt(index));
|
||||
}
|
||||
|
||||
// Bug 1403220: Suspected MSVC PGO miscompilation
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
static gfxFontGroup*
|
||||
GetFontGroupForFrame(const nsIFrame* aFrame, float aFontSizeInflation,
|
||||
nsFontMetrics** aOutFontMetrics = nullptr)
|
||||
@ -2024,6 +2028,9 @@ GetFontGroupForFrame(const nsIFrame* aFrame, float aFontSizeInflation,
|
||||
// not actually happen. But we should fix this.
|
||||
return fontGroup;
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
static already_AddRefed<DrawTarget>
|
||||
CreateReferenceDrawTarget(const nsTextFrame* aTextFrame)
|
||||
|
Loading…
Reference in New Issue
Block a user