gecko-dev/gfx/tests
Ryan Hunt 084c9b6f4c Allocate TextureReadLock at TextureClient creation and drop file handles immediately after. (bug 1416726, r=aosmond)
This changes the lifecycle and API for TextureReadLock to fix file descriptor exhaustion
crashes. These changes are partially superficial and mostly align the API of TextureReadLocks
with their actual usage.

The changes are:

1. Create the TextureReadLock in the TextureClient constructor so it's available before IPC creation
    a. This is superficial as EnableReadLock was always called before IPC creation
2. Send the ReadLockDescriptor in the PTextureConstructor message and close the file handle
3. Receive the ReadLockDescriptor in TextureHost and close the file handle
4. Send a boolean flag in layer transactions if the texture is read locked instead of a descriptor
5. Use a boolean flag in TextureHost to determine if the ReadLock must be unlocked instead of a nullptr

I believe that we can remove the InitReadLocks code from LayerTransaction as that was added to
prevent file descriptor limits in IPDL messages and is no longer needed with this change. But
that is a non-essential change and this patch is already big enough.

MozReview-Commit-ID: DzHujrOQejH

--HG--
extra : rebase_source : 3bdd7c9bc8edfdc386faad8a9e59ad7dc18ed91d
2018-03-12 08:10:13 -05:00
..
browser Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian 2018-01-29 15:20:18 -08:00
chrome Bug 1389000 - Skip a mochitest that fails with layers-free enabled. r=jrmuizel 2017-09-26 14:49:20 -04:00
crashtests Bug 1362115 - turn on blob-images by default with webrender. r=kats 2018-02-01 14:00:26 -05:00
gtest Allocate TextureReadLock at TextureClient creation and drop file handles immediately after. (bug 1416726, r=aosmond) 2018-03-12 08:10:13 -05:00
mochitest Bug 1427419 - Part 22: Move inIDOMUtils.getUsedFontFaces to InspectorUtils. r=bz 2018-01-11 12:38:01 +08:00
reftest Bug 1435143 - Properly unwrap Maybe<WrScrollId> for the root scroll frame. r=kats 2018-02-07 10:01:56 +01:00
unit Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
moz.build Bug 1274663 - Add mochitest. r=dvander 2017-06-15 14:35:00 -04:00