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
We can easily populate the mId with the correct layers id, which is the
root layer tree id from the CompositorBridgeParent. This eliminates a
bunch of special-case handling.
MozReview-Commit-ID: FEkboAGEhYO
--HG--
extra : rebase_source : 01e73d516e5742d586cbf6d8b6bc5c9f7d64f141
The change that was made in bug 1374166 was attempting to fix the
problem fixed by the previous patch, but didn't actually succeed (it
just made it less likely to occur). Now that we have the proper fix we
can revert that botched attempt to speed up the test a little bit.
MozReview-Commit-ID: 3hWZ6bFTdxb
--HG--
extra : rebase_source : 15a8c6e183a5d7a09527ac3857b0eefb563c5165
With e10s enabled, we need to make sure that not only has the content
process layer tree reached the compositor, but also that the parent
process layer tree with the correct RefLayer has reached the compositor.
This is important for some APZ tests which proceed on the assumption
that the content process has been composited.
MozReview-Commit-ID: D0peZsJMHNT
--HG--
extra : rebase_source : 487a11a5478416e275013941282ff8f7636fb67c
If we are registering a cleanup function inside a subtest (as we will do
in the next patch) then we need to make sure it gets cleaned up before
the subtest is unloaded. Otherwise the cleanup will be attempted when
the top-level test page is unloaded, at which point the subtest is long
gone, and that results in an error.
MozReview-Commit-ID: 828XddkOUlP
--HG--
extra : rebase_source : a4b64d41c0dfcc27941abbff7ffbde2c69513b58
This is functionally a no-op but it makes code cleaner, particularly
some of the changes in a future patch.
MozReview-Commit-ID: 5UoT3aNJaPz
--HG--
extra : rebase_source : 53dbabc53ce5fbb549fa66976b41799f03be201d
(This is a helper patch -- I'm splitting this into its own patch since it's
changing files in other directories, and also so that the main patches here
can be a bit more direct.)
Without this change, the other patches in this series would cause compile
failures in the headers that I'm fixing up here (because the other patches will
be removing #includes from some headers that these files were inadvertently
depending on).
As of this patch, ComputedTimingFunction.h will now be including:
- nsDebug.h to provide NS_ASSERTION
- nsStringFwd.h to provide a forward-declaration for "nsAString&"
- Assertions.h to provide MOZ_ASSERT
- Maybe.h to provide Maybe<ComputedTimingFunction>
(I think it's been leaning on nsTimingFunction.h's include of nsString.h to
indirectly provide these.)
FrameMetrics.h will now be including:
- PLDHashTable.h to provide PLDHashNumber
(I think it's been leaning on nsStyleCoord.h/nsStyleConsts.h to indirectly
provide this.)
MozReview-Commit-ID: AoFoEe9GisK
--HG--
extra : rebase_source : 63c69343acaf42511ebdeb0238f4385a0c6345a5
So that we don't need to include nsStyleStruct.h in gfx any more.
MozReview-Commit-ID: 6nOaAbssLCz
--HG--
extra : rebase_source : 9c195c90277a4584dc14a6949e9eea53bcd8487c
gcc for arm/aarch64 target doesn't allow -msse2 command line option and it
causes option error, not warning. So it should not add this option for
non-Intel platform.
MozReview-Commit-ID: 9E6SGBMkT94
--HG--
extra : rebase_source : 3bd8d2f11d108c7463134c34f679244e6f4f3531
These were mostly exported because APZCTreeManager included them and now
they don't need to be exported any more.
MozReview-Commit-ID: 8W3vKOvzYW3
--HG--
extra : rebase_source : 8da95a203692ab3a88d37e66071b914682b44f14
This also includes unified build fixes that were needed as a result of
the shuffling around.
MozReview-Commit-ID: 1AGG3DHnN1m
--HG--
extra : rebase_source : 7399cea6dff2bd91ab305dee22d93b32382cc0be
Callers should be using one of the more specific subinterfaces like
IAPZCTreeManager (for controller-API methods) or APZSampler (for
sampler-API methods). There's also a bunch of android-specific
dynamic toolbar code that uses this function - I don't want to
deal with that right now, so instead of removing it entirely we can just
make it Android-only.
MozReview-Commit-ID: I8DYWLYoFgP
--HG--
extra : rebase_source : 75e05825194f9c6843506bb5d82e1a0c6e2b08bb
Although CrossProcessCompositorBridgeParent still needs to create a
dummy APZCTreeManager of its own in place, we can at least stop it from
grabbing the "real" APZCTreeManager from CompositorBridgeParent, which
allows access to methods that might not be properly guarded with respect
to thread safety.
MozReview-Commit-ID: Btvez3OkFPs
--HG--
extra : rebase_source : a4bec1769ff2fb899bb2e65f99f8e715f9a94c44
This fixes PrintTargetWindows::BeginPrinting to detect when the
user cancels and have it return NS_ERROR_ABORT in that case.
The rest of the changes are simply making sure that the various
call points up the call stack don't print a warning message if
NS_ERROR_ABORT is returned up from
PrintTargetWindows::BeginPrinting.
MozReview-Commit-ID: 6xZ5SPje6TT