зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1759686 - patch 3 - Ensure prefs that may be accessed by canvas2d text code are atomic. r=lsalzman
These need to be atomic so that they can be accessed by canvas code when running on a worker thread without calling main-thread-only Preferences APIs. Depends on D144185 Differential Revision: https://phabricator.services.mozilla.com/D144186
This commit is contained in:
Родитель
723077462f
Коммит
0cf6fb1bdd
|
@ -3696,7 +3696,7 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor
|
|||
mOp(CanvasRenderingContext2D::TextDrawOperation::FILL),
|
||||
mTextRunFlags(),
|
||||
mDoMeasureBoundingBox(false) {
|
||||
if (Preferences::GetBool(GFX_MISSING_FONTS_NOTIFY_PREF)) {
|
||||
if (StaticPrefs::gfx_missing_fonts_notify()) {
|
||||
mMissingFonts = MakeUnique<gfxMissingFontRecorder>();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -304,7 +304,7 @@ nsPresContext::nsPresContext(dom::Document* aDocument, nsPresContextType aType)
|
|||
mTextPerf = MakeUnique<gfxTextPerfMetrics>();
|
||||
}
|
||||
|
||||
if (Preferences::GetBool(GFX_MISSING_FONTS_NOTIFY_PREF)) {
|
||||
if (StaticPrefs::gfx_missing_fonts_notify()) {
|
||||
mMissingFonts = MakeUnique<gfxMissingFontRecorder>();
|
||||
}
|
||||
|
||||
|
@ -580,7 +580,7 @@ void nsPresContext::PreferenceChanged(const char* aPrefName) {
|
|||
MediaFeatureChangePropagation::JustThisDocument);
|
||||
}
|
||||
if (prefName.EqualsLiteral(GFX_MISSING_FONTS_NOTIFY_PREF)) {
|
||||
if (Preferences::GetBool(GFX_MISSING_FONTS_NOTIFY_PREF)) {
|
||||
if (StaticPrefs::gfx_missing_fonts_notify()) {
|
||||
if (!mMissingFonts) {
|
||||
mMissingFonts = MakeUnique<gfxMissingFontRecorder>();
|
||||
// trigger reflow to detect missing fonts on the current page
|
||||
|
|
|
@ -3696,22 +3696,22 @@
|
|||
mirror: always
|
||||
|
||||
- name: dom.textMetrics.actualBoundingBox.enabled
|
||||
type: bool
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
- name: dom.textMetrics.baselines.enabled
|
||||
type: bool
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: dom.textMetrics.emHeight.enabled
|
||||
type: bool
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: dom.textMetrics.fontBoundingBox.enabled
|
||||
type: bool
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
|
@ -5412,6 +5412,13 @@
|
|||
value: true
|
||||
mirror: once
|
||||
|
||||
# Do we fire a notification about missing fonts, so the front-end can decide
|
||||
# whether to try and do something about it (e.g. download additional fonts)?
|
||||
- name: gfx.missing_fonts.notify
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
- name: gfx.egl.prefer-gles.enabled
|
||||
type: bool
|
||||
|
|
|
@ -592,10 +592,6 @@ pref("gfx.downloadable_fonts.fallback_delay_short", 100);
|
|||
// the uncached load behavior across pages (useful for testing reflow problems)
|
||||
pref("gfx.downloadable_fonts.disable_cache", false);
|
||||
|
||||
// Do we fire a notification about missing fonts, so the front-end can decide
|
||||
// whether to try and do something about it (e.g. download additional fonts)?
|
||||
pref("gfx.missing_fonts.notify", false);
|
||||
|
||||
// whether to always search all font cmaps during system font fallback
|
||||
pref("gfx.font_rendering.fallback.always_use_cmaps", false);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче