- Aug 04, 2022
-
-
André Bargull authored
Differential Revision: https://phabricator.services.mozilla.com/D153263
-
André Bargull authored
Differential Revision: https://phabricator.services.mozilla.com/D153614
-
Lee Salzman authored
This patch uses a single FT_Library for all font threads (even across separate windows) within WebRender. It maintains a mapping from FontTemplate to a cached FT_Face that will be traded to any font thread that requests it on a first-come-first-serve basis. This FT_Face is guarded by a mutex to ensure that no other worker thread can use it while it is in-use by the first requesting thread. In general it is safe to use different FT_Faces on different threads so long as they are distinct. However, the snag in this is that FT_LcdFilter state is stored globally in the FT_Library, even while it is supplied per-FontInstance. To workaround this, we need to keep track of how many threads are currently rasterizing glyphs with the FT_LcdFilter state and wait for them to all finish before we can change the FT_LcdFilter to what the next group of incoming jobs expects. FontContext::begin_rasterize/end_rasterize hooks were added to support this. While there seems to be some support in newer FreeType versions for per-FT_Face LcdFilter settings, it doesn't allow disabling the LcdFilter or using legacy settings, so we are still suck using the global setting instead. To further reduce memory usage, this patch also no longer allocates a separate FT_Face for FontVariations. Instead, since the FT_Face must be locked to a single thread anyway, it now just uses FT_Set_Var_Design_Coordinates on the single FT_Face for the font before loading the batch of glyphs associated with the FontVariations. So regardless of how many different variations are used for a font, it will only allocate a single FT_Face. Normally, rayon's par_iter is used to scatter glyphs from a single font request onto multiple threads which works against the one-font-per-thread model needed here. This adds a FontContext::distribute_across_threads hook to control whether or not par_iter should be used so that we can disable that behavior for this case, where instead we just want to process each glyph serially within the scope of a single worker for a given font request. Differential Revision: https://phabricator.services.mozilla.com/D153715
-
Lee Salzman authored
Differential Revision: https://phabricator.services.mozilla.com/D153503
-
Johan Lorenzo authored
Differential Revision: https://phabricator.services.mozilla.com/D153734
-
Iulian Moraru authored
Backed out changeset 7c176468fe45 (bug 1783115) Backed out changeset 01f50cfcc9b1 (bug 1782795)
-
André Bargull authored
Differential Revision: https://phabricator.services.mozilla.com/D153262
-
André Bargull authored
Depends on D153260 Differential Revision: https://phabricator.services.mozilla.com/D153261
-
André Bargull authored
Depends on D153259 Differential Revision: https://phabricator.services.mozilla.com/D153260
-
André Bargull authored
Depends on D153258 Differential Revision: https://phabricator.services.mozilla.com/D153259
-
André Bargull authored
Depends on D153257 Differential Revision: https://phabricator.services.mozilla.com/D153258
-
André Bargull authored
Depends on D153256 Differential Revision: https://phabricator.services.mozilla.com/D153257
-
André Bargull authored
Depends on D153255 Differential Revision: https://phabricator.services.mozilla.com/D153256
-
André Bargull authored
Depends on D153254 Differential Revision: https://phabricator.services.mozilla.com/D153255
-
André Bargull authored
Depends on D153253 Differential Revision: https://phabricator.services.mozilla.com/D153254
-
André Bargull authored
Depends on D153252 Differential Revision: https://phabricator.services.mozilla.com/D153253
-
André Bargull authored
Depends on D153251 Differential Revision: https://phabricator.services.mozilla.com/D153252
-
André Bargull authored
Depends on D153250 Differential Revision: https://phabricator.services.mozilla.com/D153251
-
André Bargull authored
Depends on D153249 Differential Revision: https://phabricator.services.mozilla.com/D153250
-
André Bargull authored
Depends on D153248 Differential Revision: https://phabricator.services.mozilla.com/D153249
-
André Bargull authored
Bug 1782273 - Part 14: Apply two space indent for js/src/builtin/{Set,Sorting,Tuple,Utilities,WeakMap,WeakSet}.js. r=tcampbell Depends on D153247 Differential Revision: https://phabricator.services.mozilla.com/D153248
-
André Bargull authored
Depends on D153246 Differential Revision: https://phabricator.services.mozilla.com/D153247
-
André Bargull authored
Depends on D153245 Differential Revision: https://phabricator.services.mozilla.com/D153246
-
André Bargull authored
Depends on D153244 Differential Revision: https://phabricator.services.mozilla.com/D153245
-
André Bargull authored
Bug 1782273 - Part 10: Remaining prettier errors in js/src/builtin/{Map,Object,Promise,Reflect}.js. r=tcampbell Depends on D153243 Differential Revision: https://phabricator.services.mozilla.com/D153244
-
André Bargull authored
Bug 1782273 - Part 9: Rewrap lines in js/src/builtin/{Function,Iterator,Map,Object,Promise,Reflect}.js. r=tcampbell Depends on D153242 Differential Revision: https://phabricator.services.mozilla.com/D153243
-
André Bargull authored
Bug 1782273 - Part 8: Apply two space indent for js/src/builtin/{Function,Generator,Iterator,Map,Number,Object,Promise,Reflect}.js. r=tcampbell Depends on D153241 Differential Revision: https://phabricator.services.mozilla.com/D153242
-
André Bargull authored
Bug 1782273 - Part 7: Remaining prettier errors in js/src/builtin/{AsyncIteration,Date,Error}.js. r=tcampbell Depends on D153240 Differential Revision: https://phabricator.services.mozilla.com/D153241
-
André Bargull authored
Bug 1782273 - Part 6: Rewrap lines in js/src/builtin/{AsyncFunction,AsyncIteration,Date,Error}.js. r=tcampbell Depends on D153239 Differential Revision: https://phabricator.services.mozilla.com/D153240
-
André Bargull authored
Bug 1782273 - Part 5: Apply two space indent for js/src/builtin/{AsyncFunction,AsyncIteration,BigInt,Date}.js. r=tcampbell Depends on D153238 Differential Revision: https://phabricator.services.mozilla.com/D153239
-
André Bargull authored
Depends on D153237 Differential Revision: https://phabricator.services.mozilla.com/D153238
-
André Bargull authored
Depends on D153236 Differential Revision: https://phabricator.services.mozilla.com/D153237
-
André Bargull authored
Depends on D153235 Differential Revision: https://phabricator.services.mozilla.com/D153236
-
André Bargull authored
Differential Revision: https://phabricator.services.mozilla.com/D153235
-
Lee Salzman authored
This patch uses a single FT_Library for all font threads (even across separate windows) within WebRender. It maintains a mapping from FontTemplate to a cached FT_Face that will be traded to any font thread that requests it on a first-come-first-serve basis. This FT_Face is guarded by a mutex to ensure that no other worker thread can use it while it is in-use by the first requesting thread. In general it is safe to use different FT_Faces on different threads so long as they are distinct. However, the snag in this is that FT_LcdFilter state is stored globally in the FT_Library, even while it is supplied per-FontInstance. To workaround this, we need to keep track of how many threads are currently rasterizing glyphs with the FT_LcdFilter state and wait for them to all finish before we can change the FT_LcdFilter to what the next group of incoming jobs expects. FontContext::begin_rasterize/end_rasterize hooks were added to support this. While there seems to be some support in newer FreeType versions for per-FT_Face LcdFilter settings, it doesn't allow disabling the LcdFilter or using legacy settings, so we are still suck using the global setting instead. To further reduce memory usage, this patch also no longer allocates a separate FT_Face for FontVariations. Instead, since the FT_Face must be locked to a single thread anyway, it now just uses FT_Set_Var_Design_Coordinates on the single FT_Face for the font before loading the batch of glyphs associated with the FontVariations. So regardless of how many different variations are used for a font, it will only allocate a single FT_Face. Normally, rayon's par_iter is used to scatter glyphs from a single font request onto multiple threads which works against the one-font-per-thread model needed here. This adds a FontContext::distribute_across_threads hook to control whether or not par_iter should be used so that we can disable that behavior for this case, where instead we just want to process each glyph serially within the scope of a single worker for a given font request. Differential Revision: https://phabricator.services.mozilla.com/D153715
-
Lee Salzman authored
Differential Revision: https://phabricator.services.mozilla.com/D153503
-
Bryan Thrall authored
In CacheFileIOManager::GetEntryInfo(), there is only a problem if the Alt Data element is present but we can't parse a reasonable value out of it (a value smaller than the metadata offset). Differential Revision: https://phabricator.services.mozilla.com/D146467
-
Bryan Thrall authored
The value is stored as uint32_t, and there doesn't seem to be a need to convert it to int. Differential Revision: https://phabricator.services.mozilla.com/D147888
-
Iulian Moraru authored
Backed out changeset 0d0c8aa6e1d0 (bug 1746601) for causing wpt failures on iframe-chains.html. CLOSED TREE
-
Luca Greco authored
Bug 1728482 - Add to browser_newwindow.js an explicit await on BTU.openNewForegroundTab returned promise. r=mixedpuppy Unfortunately I was not able to trigger locally the same unhandled rejection (`tabbrowser.ownerGlobal.windowGlobalChild is null` triggered by BTU.openNewForegroundTab from BrowserTestUtils.jsm line 279), but looking to the test case it seems not unlikely that the test case may be getting to the call to `BTU.closeWindow` (nearby the end of `finish_test` test helper function) while the promise returned from BTU.openNewForegroundTab was not resolved yet and that the call to BTU.openNewForegroundTab is then trying to access tabbrowser.ownerGlobal.windowGlobalChild well the tab and the window where it was open are already gone. This patch adds an explicit await on the promise returned by BTU.openNewForegroundTab right before calling BTU.closeWindow to make sure that the browser window containing that tab isn't closed until BTU.openNewForegroundTab promise is resolved. Differential Revision: https://phabricator.services.mozilla.com/D153375
-