зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1864817 - initialize STYLE_THREAD_POOL in Sevo_initialize. r=emilio,jesup
Differential Revision: https://phabricator.services.mozilla.com/D201022
This commit is contained in:
Родитель
41e04657c2
Коммит
022e5ba65d
|
@ -2094,6 +2094,7 @@ dependencies = [
|
|||
"cstr",
|
||||
"dom",
|
||||
"gecko-profiler",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"malloc_size_of",
|
||||
|
|
|
@ -755,7 +755,7 @@ bool gfxPlatformFontList::InitOtherFamilyNames(
|
|||
// (This is used so we can reliably run reftests that depend on localized
|
||||
// font-family names being available.)
|
||||
if (aDeferOtherFamilyNamesLoading &&
|
||||
StaticPrefs::gfx_font_loader_delay_AtStartup() > 0) {
|
||||
StaticPrefs::gfx_font_loader_delay() > 0) {
|
||||
if (!mPendingOtherFamilyNameTask) {
|
||||
RefPtr<mozilla::CancelableRunnable> task =
|
||||
new InitOtherFamilyNamesRunnable();
|
||||
|
@ -2648,7 +2648,7 @@ bool gfxPlatformFontList::LoadFontInfo() {
|
|||
// Limit the time spent reading fonts in one pass, unless the font-loader
|
||||
// delay was set to zero, in which case we run to completion even if it
|
||||
// causes some jank.
|
||||
if (StaticPrefs::gfx_font_loader_delay_AtStartup() > 0) {
|
||||
if (StaticPrefs::gfx_font_loader_delay() > 0) {
|
||||
TimeDuration elapsed = TimeStamp::Now() - start;
|
||||
if (elapsed.ToMilliseconds() > FONT_LOADER_MAX_TIMESLICE &&
|
||||
i + 1 != endIndex) {
|
||||
|
@ -2751,7 +2751,7 @@ void gfxPlatformFontList::GetPrefsAndStartLoader() {
|
|||
if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownConfirmed)) {
|
||||
return;
|
||||
}
|
||||
uint32_t delay = std::max(1u, StaticPrefs::gfx_font_loader_delay_AtStartup());
|
||||
uint32_t delay = std::max(1u, StaticPrefs::gfx_font_loader_delay());
|
||||
if (NS_IsMainThread()) {
|
||||
StartLoader(delay);
|
||||
} else {
|
||||
|
|
|
@ -6063,13 +6063,13 @@
|
|||
mirror: once
|
||||
|
||||
- name: gfx.font_loader.delay
|
||||
type: uint32_t
|
||||
type: RelaxedAtomicUint32
|
||||
#if defined(XP_WIN)
|
||||
value: 60000
|
||||
#else
|
||||
value: 8000
|
||||
#endif
|
||||
mirror: once
|
||||
mirror: always
|
||||
|
||||
# Disable antialiasing of Ahem, for use in tests.
|
||||
- name: gfx.font_rendering.ahem_antialias_none
|
||||
|
@ -8781,9 +8781,9 @@
|
|||
# numbers override as specified.
|
||||
# Note that 1 still creates a thread-pool of one thread!
|
||||
- name: layout.css.stylo-threads
|
||||
type: int32_t
|
||||
type: RelaxedAtomicInt32
|
||||
value: -1
|
||||
mirror: once
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Stylo work unit size. This is the amount of nodes we'll process in a single
|
||||
|
|
|
@ -31,3 +31,4 @@ style = {path = "../../components/style", features = ["gecko"]}
|
|||
style_traits = {path = "../../components/style_traits"}
|
||||
thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
|
||||
to_shmem = {path = "../../components/to_shmem"}
|
||||
lazy_static = "1.0"
|
||||
|
|
|
@ -204,6 +204,9 @@ pub unsafe extern "C" fn Servo_Initialize(
|
|||
// Pretend that we're a Servo Layout thread, to make some assertions happy.
|
||||
thread_state::initialize(thread_state::ThreadState::LAYOUT);
|
||||
|
||||
debug_assert!(is_main_thread());
|
||||
lazy_static::initialize(&STYLE_THREAD_POOL);
|
||||
|
||||
// Perform some debug-only runtime assertions.
|
||||
origin_flags::assert_flags_match();
|
||||
traversal_flags::assert_traversal_flags_match();
|
||||
|
|
|
@ -23,6 +23,7 @@ extern crate style;
|
|||
extern crate style_traits;
|
||||
extern crate thin_vec;
|
||||
extern crate to_shmem;
|
||||
extern crate lazy_static;
|
||||
|
||||
mod error_reporter;
|
||||
#[allow(non_snake_case)]
|
||||
|
|
Загрузка…
Ссылка в новой задаче