gecko-dev/gfx
Cameron McCormack 756d5f5a9a Bug 1356103 - Part 9: Use a PostTraversalTask to deal with downloadable fonts in gfxUserFontSet. r=bholley,jfkthame
Here we add a new UserFontLoadState value, STATUS_LOAD_PENDING, which
represents the state just after a gfxUserFontEntry's url()-valued source
would being loading, except that we can't start the load due to being
on a Servo style worker thread.  In that case, we defer the work of
initiating the load until just after the Servo traversal is finished.

URLs that can normally be loaded synchronously, such as data: URLs
and script-implemented protocols marked as synchronous, must be
handled asynchronously when encountered during Servo traversal, since
various main-thread only work (in FontFaceSet::SyncLoadFontData) must
happen.  This is a user visible change from stock Gecko, but should
only happen when font metrics for a data: URL font are requested
due to ch/ex unit resolution when layout hasn't previously requested
the font load.  Hopefully nobody relies on synchronous resolution of
ch/ex units with data: URLs.

We unfortunately also can't pick gfxUserFontEntry objects out of the
UserFontCache during Servo traversal, since validating the cache
entry involves doing content policy checking, which is not thread-safe
(due in part to taking strong references to nsIPrincipals).

Platform fonts and ArrayBuffer-backed DOM FontFace objects continue
to be handled synchronously.

The PostTraversalTask does not take a strong reference to the
gfxUserFontEntry object, since it is held on to by the DOM FontFace
object, which itself won't go away before the PostTraversalTask
is run.

MozReview-Commit-ID: J9ODLsusrNV

--HG--
extra : rebase_source : d3e3d1dc187cb252750b57bcecd0b1ed77a15a7c
2017-04-30 14:57:25 +08:00
..
2d Bug 1356103 - Part 5: Allow access to WeakPtr<UnscaledFont> when the Servo font metrics mutex is locked. r=lsalzman 2017-04-30 14:47:22 +08:00
angle Bug 1355321 - Part1: Revert "Bug 1347866 - Part2: Revert "translator: remove code related to for-loop unrolling""; r=jgilbert 2017-04-13 18:11:44 +08:00
cairo Bug 1345243. Remove support for building without DirectWrite. r=bas 2017-03-17 15:39:14 -04:00
config Backed out changeset 1ad211b75475 (bug 1337062) for timeouts and shutdown crashes in e10s, primarily Win8 PGO b-c and dt 2017-04-28 21:50:06 -07:00
doc Bug 1358156 - Update webrender to 1437cc124696ecc95b726dffa17f918bb6ea5af1. r=jrmuizel 2017-04-26 10:33:14 -04:00
docs
gl Bug 1356540 - Remove unused TextureGarbageBin. - r=daoshengmu 2017-04-19 17:03:03 -07:00
graphite2 Bug 1345461 - Adjust vector allocation. r=jrmuizel 2017-03-09 21:07:05 +00:00
harfbuzz Bug 1344578 - Update harfbuzz to version 1.4.5. r=jfkthame 2017-03-15 17:12:44 -04:00
ipc Pre-initialize DeviceAttachmentsD3D11 on the compositor thread, immediately after the GPU process initializes. (bug 1360766 part 3, r=bas) 2017-04-30 11:38:59 -07:00
layers Bug 1361632 - Adjust reftest expectation for -moz-appearance. r=bholley. a=merge 2017-05-04 06:39:30 +09:00
ots Bug 1353990 - Stop exporting woff2 headers. r=gps 2017-04-06 13:42:27 +09:00
qcms
sfntly Bug 1330495 - Unbreak FreeBSD build after bug 1324739. r=jfkthame 2017-01-12 03:19:33 +00:00
skia Bug 1358776 - fix building of SkBitmapProcState on ARM NEON. r=jrmuizel 2017-05-01 13:36:19 -04:00
src Bug 1356218 - Fix nsDeviceContext::GetDepth to use the information from the correct monitor. r=jfkthame 2017-04-14 20:50:13 +09:00
tests Bug 1361632 - Adjust reftest expectation for -moz-appearance. r=bholley. a=merge 2017-05-04 06:39:30 +09:00
thebes Bug 1356103 - Part 9: Use a PostTraversalTask to deal with downloadable fonts in gfxUserFontSet. r=bholley,jfkthame 2017-04-30 14:57:25 +08:00
vr Bug 1321275 - Confirm VRLayerChild is not destroyed before sending destroy message to the parent side; r=kip 2017-05-03 18:43:39 +08:00
webrender Bug 1358156 - Update webrender to 1437cc124696ecc95b726dffa17f918bb6ea5af1. r=jrmuizel 2017-04-26 10:33:14 -04:00
webrender_bindings Bug 1359738 - Add push_yuv_image() in WR binding. 2017-04-27 15:08:20 +08:00
webrender_traits Bug 1358156 - Update webrender to 1437cc124696ecc95b726dffa17f918bb6ea5af1. r=jrmuizel 2017-04-26 10:33:14 -04:00
ycbcr Bug 1341543: don't use internal-only I4xxToARGBMatrix() functions from libyuv r=sotaro 2017-02-24 14:01:56 -05:00
moz.build Merge m-c to graphics 2017-01-25 08:52:04 -05:00