DCSurfaceVideo::mSwapChainSurfaceHandle is not initialized. It causes invalid handle close in DCSurfaceVideo::ReleaseDecodeSwapChainResources().
Differential Revision: https://phabricator.services.mozilla.com/D143966
TestWRScrollData::Create() and its callers now use the
strongly-typed LayerIntRegion instead of the untyped nsIntRegion.
Differential Revision: https://phabricator.services.mozilla.com/D143933
This derives sane values for color primaries and transfer functions from
the colorspace value. A better solution would be to extract those values
from the video itself, but these are good enough for common encodings and
match the behavior for hardware-decoded video in AppleVTDecoder.
Depends on D143436
Differential Revision: https://phabricator.services.mozilla.com/D143542
This decodes 10-bit AV1 into the P010 surface format. Because of the
needed bit shifting to move the 10-bits to the MSB positions, it can't use
a straight memcpy for the Y values.
Differential Revision: https://phabricator.services.mozilla.com/D143436
Currently, fetchEngineConfiguration assigns the value of engine.webExtension.locale to one of three
matches, but it's entirely possible for webExtensionLocale to contain data that should persist.
Differential Revision: https://phabricator.services.mozilla.com/D142747
Aside from adding ScrollTo to the Windows PDocAccessible IPDL, This mostly just moves methods into base classes and adapts platform code to use the unified Accessible::ScrollTo.
Differential Revision: https://phabricator.services.mozilla.com/D143655
Allows encrypted video to initialize a decoder upon receiving a sample if it cannot be instantiated during initial decoder creation.
Differential Revision: https://phabricator.services.mozilla.com/D143862
Fixes an issue where in-band changes in VP9 and AV1 would not switch to the hardware decoder if it supports the new config, since agnostic decoders would always support the decoded format.
Differential Revision: https://phabricator.services.mozilla.com/D143560
Clipboard operations, cursor navigation and input mode changes should not hide the cursor. This mimics behavior in other Windows apps (e.g. WordPad).
Differential Revision: https://phabricator.services.mozilla.com/D143849
This should prevent VoiceOver from getting "stuck" between the address bar and the fake search bar in Private Browsing Mode. I'm not sure why PBM is different to the behaviour on the newtab page (the newtab page doesn't have the aria-hidden property and the HTML is essentially the same) but adding "aria-hidden" in this case doesn't seem to break anything.
Differential Revision: https://phabricator.services.mozilla.com/D143784
With this new approach, Shmem instances will now have their handles
transferred inline within messages as attachments, rather than being
associated with their actors and sent in separate messages.
This has a few advantages:
* The implementation is much simpler
* Releasing all references to a Shmem will automatically destroy it by
RAII, rather than leaking the shared memory region until the toplevel
actor is destroyed, removing the need for types like RaiiShmem.
* This allows re-transmitting Shmem instances to another process, as we
don't close the shared memory region handle upon receiving it.
But also has a disadvantage that because we keep alive the shared memory
region's handle until the shmem is destroyed, so that it can be
re-transmitted, we may end up using more FDs or HANDLEs while running.
This patch intentionally doesn't change or simplify callsites, removing
APIs like RaiiShmem, in order to make it easier to revert if this causes
issues on platforms like Linux due to FD exhaustion. If we don't run
into increased resource exhaustion problems, we can make these changes
in a follow-up.
Differential Revision: https://phabricator.services.mozilla.com/D140211
The mInputDeviceID can be removed now since we can get the input-device
id via the DeviceInputTrackManager on the graph-thread side now.
Depends on D139444
Differential Revision: https://phabricator.services.mozilla.com/D139445
This patch creates a class to manage all DeviceInputTracks in one place,
which simplify the code in the MediaTrackGraph.
Depends on D138726
Differential Revision: https://phabricator.services.mozilla.com/D139444
This patch implements all the functionalities allowing us to use a
AudioInputSource to generate audio in NonNativeInputTrack.
Depends on D137911
Differential Revision: https://phabricator.services.mozilla.com/D138189
This patch creates an class managing an input-only audio stream within a
task thread. This class will be used as a source generating the audio
data to a NonNativeInputTrack in the following patch.
Depends on D116535
Differential Revision: https://phabricator.services.mozilla.com/D137911
To add a non-native input source in the MediaTrackGraph, we need a
input-only cubeb stream. This patch implements a light-weight wrapper to
operate the C style Cubeb APIs in a C++-friendly way.
Depends on D143101
Differential Revision: https://phabricator.services.mozilla.com/D116535
Add a waitable event that will be fired when the state is changed, so
the user can wait for certain state of the cubeb stream.
Depends on D143100
Differential Revision: https://phabricator.services.mozilla.com/D143101
Create a class named NonNativeInputTrack, inheriting from
DeviceInputTrack, to store the audio data from non-native input device.
Depends on D137782
Differential Revision: https://phabricator.services.mozilla.com/D130233
Separate common interfaces that will be used for NonNativeInputTrack
class, from NativeInputTrack, into a base class: DeviceInputTrack, where
the NonNativeInputTrack will be implemented in the next patch.
Differential Revision: https://phabricator.services.mozilla.com/D137782
In bug 1762025 we found ourselves in a situation where we are unable
to ever create an EGLSurface, meaning we were continually attempting
to initialize a compositor, encountering a NEW_SURFACE webrender
error, causing us to tear down the compositor and create a new one,
repeating the cycle indefinitely.
This leaves the user with an unusable browser. We'd be better off
simply crashing. This patch adds a flag to FallbackFromAcceleration(),
which forces a crash if we have already exhausted all of the fallback
options. When calling FallbackFromAcceleration due to a NEW_SURFACE
error we set the flag to true. It may also be worthwhile setting this
flag for more errors in the future.
Differential Revision: https://phabricator.services.mozilla.com/D143486
This adds new version of the GeckoView API
GeckoDisplay.surfaceChanged(), which takes a single argument of a new
type GeckoDisplay.SurfaceInfo. As well as containing fields for each
the the existing surfaceChanged() arguments, this has an additional
SurfaceControl field. This must be provided when rendering in to a
SurfaceView on SDK level 29 or greater. On earlier SDK levels, or when
rendering in to a TextureView or SurfaceTexture, this can be
null. SurfaceViewWrapper and GeckoView classes are updated to handle
this correctly. The old surfaceChanged() methods have been deprecated,
and tests have been updated to use the new version.
When provided, the SurfaceControl is passed along with the Surface
through to the widget and, when enabled, over to the GPU process. The
compositor widget then creates a child Surface from that
SurfaceControl, and renders in to that child Surface rather than the
parent one.
This works around a bug on Android 12 where following the GPU process
dying the Surface was left in an unusable state, meaning subsequent
attempts to initialize a compositor would fail. Because the Surface is
now created by the GPU process it gets destroyed when the process
dies, therefore a new Surface can successfully be created when we
reinitialize the compositor.
Differential Revision: https://phabricator.services.mozilla.com/D143485
And android.view.SurfaceControl$Transaction.
In order to generate these bindings we must increase the maximum SDK
version argument we pass to SDKProcessor to 29. However, doing so
means that we now attempt to generate bindings for both Surface's
Surface(SurfaceTexture) and Surface(SurfaceControl)
constructors. These both translate in to C++ functions with identical
signatures - Surface::New(jni::Object::Param) - causing a compilation
failure.
This patch therefore also allows the stubName property to override
constructor names, and overrides the latter to
Surface::FromSurfaceControl(), thereby avoiding the conflict.
Differential Revision: https://phabricator.services.mozilla.com/D143484