Dear all.
/TLDR; Wherever you used to use gfxPrefs, soon you will have to use
StaticPrefs./
In a couple of days, once /Bug 1550422
<https://bugzilla.mozilla.org/show_bug.cgi?id=1550422>//lands I will be
retiring gfxPrefs. All features originally found in gfxPrefs are now
available in StaticPrefs with some extra bonuses./
//For the background, StaticPrefs gives you the ability to access a
preference via a thread-safe accessor.
//
/StaticPrefs and Preferences will now be available on all processes (not
just main and content, this includes GPU, VR and RDD process)/
//
/3 levels of update policies: Skip, Once and Live:/
/* Skip policy will ignore all user overrides.
* Once will read the preference once and will never be updated again
* Live is the original behaviour, the values will be updated across all
processes whenever the preference change.
/
/Possibility to dynamically set a StaticPref on any threads (however,
the changes aren't propagated to other processes; doing otherwise is
certainly doable, I'm not convinced of the use case however)./
/There are few more options, to know more I invite you to read the
StaticPrefList.h file
/
/The desire to gfxPrefs came from yet another misuse of StaticPrefs in
the GPU process. In addition gfxPrefs turned out to not be thread-safe./
/It became rather tiring to always juggle between gfxPrefs and
StaticPrefs depending on which process the code could run./
/And as Mr MacLeod used to say: There can be only one/
/Jean-Yves
/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform