mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1890245 - Make gfxUserFontSet::mGeneration an atomic var, so we can read it safely without locking. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D207618
This commit is contained in:
parent
dca313655e
commit
50a66bfbd8
@ -469,7 +469,7 @@ void gfxUserFontEntry::DoLoadNextSrc(bool aIsContinue) {
|
||||
if (fe) {
|
||||
LOG(("userfonts (%p) [src %d] loaded local: (%s) for (%s) gen: %8.8x\n",
|
||||
fontSet.get(), mCurrentSrcIndex, currSrc.mLocalName.get(),
|
||||
mFamilyName.get(), uint32_t(fontSet->mGeneration)));
|
||||
mFamilyName.get(), uint32_t(fontSet->GetGeneration())));
|
||||
fe->mFeatureSettings.AppendElements(mFeatureSettings);
|
||||
fe->mVariationSettings.AppendElements(mVariationSettings);
|
||||
fe->mLanguageOverride = mLanguageOverride;
|
||||
@ -816,7 +816,7 @@ bool gfxUserFontEntry::LoadPlatformFont(uint32_t aSrcIndex,
|
||||
"(%p) gen: %8.8x compress: %d%%\n",
|
||||
fontSet.get(), aSrcIndex,
|
||||
mSrcList[aSrcIndex].mURI->GetSpecOrDefault().get(), mFamilyName.get(),
|
||||
this, uint32_t(fontSet->mGeneration), fontCompressionRatio));
|
||||
this, uint32_t(fontSet->GetGeneration()), fontCompressionRatio));
|
||||
mPlatformFontEntry = fe;
|
||||
SetLoadState(STATUS_LOADED);
|
||||
if (NS_IsMainThread()) {
|
||||
|
@ -545,8 +545,8 @@ class gfxUserFontSet {
|
||||
// font families defined by @font-face rules
|
||||
nsRefPtrHashtable<nsCStringHashKey, gfxUserFontFamily> mFontFamilies;
|
||||
|
||||
uint64_t mGeneration; // bumped on any font load change
|
||||
uint64_t mRebuildGeneration; // only bumped on rebuilds
|
||||
mozilla::Atomic<uint64_t> mGeneration; // bumped on any font load change
|
||||
uint64_t mRebuildGeneration; // only bumped on rebuilds
|
||||
|
||||
// true when local names have been looked up, false otherwise
|
||||
bool mLocalRulesUsed;
|
||||
|
Loading…
Reference in New Issue
Block a user