mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Merge mozilla-central to autoland. a=merge CLOSED TREE
This commit is contained in:
commit
7cd3732360
@ -187,9 +187,7 @@ nsresult AudioSink::InitializeAudioStream(const PlaybackParams& aParams) {
|
||||
|
||||
// Set playback params before calling Start() so they can take effect
|
||||
// as soon as the 1st DataCallback of the AudioStream fires.
|
||||
if (aParams.mVolume) {
|
||||
mAudioStream->SetVolume(*aParams.mVolume);
|
||||
}
|
||||
mAudioStream->SetVolume(aParams.mVolume);
|
||||
mAudioStream->SetPlaybackRate(aParams.mPlaybackRate);
|
||||
mAudioStream->SetPreservesPitch(aParams.mPreservesPitch);
|
||||
return mAudioStream->Start();
|
||||
|
@ -29,9 +29,7 @@ const MediaSink::PlaybackParams& AudioSinkWrapper::GetPlaybackParams() const {
|
||||
void AudioSinkWrapper::SetPlaybackParams(const PlaybackParams& aParams) {
|
||||
AssertOwnerThread();
|
||||
if (mAudioSink) {
|
||||
if (aParams.mVolume) {
|
||||
mAudioSink->SetVolume(*aParams.mVolume);
|
||||
}
|
||||
mAudioSink->SetVolume(aParams.mVolume);
|
||||
mAudioSink->SetPlaybackRate(aParams.mPlaybackRate);
|
||||
mAudioSink->SetPreservesPitch(aParams.mPreservesPitch);
|
||||
}
|
||||
@ -98,7 +96,7 @@ bool AudioSinkWrapper::HasUnplayedFrames(TrackType aType) const {
|
||||
|
||||
void AudioSinkWrapper::SetVolume(double aVolume) {
|
||||
AssertOwnerThread();
|
||||
mParams.mVolume = Some(aVolume);
|
||||
mParams.mVolume = aVolume;
|
||||
if (mAudioSink) {
|
||||
mAudioSink->SetVolume(aVolume);
|
||||
}
|
||||
@ -198,10 +196,6 @@ void AudioSinkWrapper::Stop() {
|
||||
|
||||
if (mAudioSink) {
|
||||
mAudioSinkEndedPromise.DisconnectIfExists();
|
||||
// Reset volume to signal that it should
|
||||
// not be updated, in case the volume
|
||||
// has been changed outside MediaElement.
|
||||
mParams.mVolume.reset();
|
||||
mAudioSink->Shutdown();
|
||||
mAudioSink = nullptr;
|
||||
mEndedPromise = nullptr;
|
||||
|
@ -479,7 +479,7 @@ void DecodedStream::SetPlaying(bool aPlaying) {
|
||||
|
||||
void DecodedStream::SetVolume(double aVolume) {
|
||||
AssertOwnerThread();
|
||||
mParams.mVolume = Some(aVolume);
|
||||
mParams.mVolume = aVolume;
|
||||
}
|
||||
|
||||
void DecodedStream::SetPlaybackRate(double aPlaybackRate) {
|
||||
@ -730,8 +730,7 @@ void DecodedStream::SendData() {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mParams.mVolume.isSome(), "Volume should exist at that point");
|
||||
SendAudio(mParams.mVolume.value(), mSameOrigin, mPrincipalHandle);
|
||||
SendAudio(mParams.mVolume, mSameOrigin, mPrincipalHandle);
|
||||
SendVideo(mSameOrigin, mPrincipalHandle);
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,8 @@ class MediaSink {
|
||||
|
||||
struct PlaybackParams {
|
||||
PlaybackParams()
|
||||
: mVolume(Some(1.0)), mPlaybackRate(1.0), mPreservesPitch(true) {}
|
||||
Maybe<double> mVolume;
|
||||
: mVolume(1.0), mPlaybackRate(1.0), mPreservesPitch(true) {}
|
||||
double mVolume;
|
||||
double mPlaybackRate;
|
||||
bool mPreservesPitch;
|
||||
RefPtr<AudioDeviceInfo> mSink;
|
||||
|
@ -1574,7 +1574,7 @@ function TypedArrayToStringTag() {
|
||||
var O = this;
|
||||
|
||||
// Steps 2-3.
|
||||
if (!IsObject(O) || !IsTypedArray(O))
|
||||
if (!IsObject(O) || !IsPossiblyWrappedTypedArray(O))
|
||||
return undefined;
|
||||
|
||||
// Steps 4-6.
|
||||
|
@ -0,0 +1,12 @@
|
||||
const TypedArrayPrototype = Object.getPrototypeOf(Int8Array.prototype);
|
||||
const {get: toStringTag} = Object.getOwnPropertyDescriptor(TypedArrayPrototype, Symbol.toStringTag);
|
||||
|
||||
const otherGlobal = newGlobal();
|
||||
|
||||
for (let constructor of anyTypedArrayConstructors) {
|
||||
let ta = new otherGlobal[constructor.name](0);
|
||||
assertEq(toStringTag.call(ta), constructor.name);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
@ -2140,8 +2140,10 @@ static bool intrinsic_NameForTypedArray(JSContext* cx, unsigned argc,
|
||||
MOZ_ASSERT(args.length() == 1);
|
||||
MOZ_ASSERT(args[0].isObject());
|
||||
|
||||
RootedObject object(cx, &args[0].toObject());
|
||||
MOZ_ASSERT(object->is<TypedArrayObject>());
|
||||
auto* object = UnwrapAndDowncastValue<TypedArrayObject>(cx, args[0]);
|
||||
if (!object) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JSProtoKey protoKey = StandardProtoKeyOrNull(object);
|
||||
MOZ_ASSERT(protoKey);
|
||||
|
@ -14202,22 +14202,22 @@
|
||||
"GFX_OMTP_PAINT_TIME": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["gfx-telemetry-alerts@mozilla.com", "rhunt@mozilla.com"],
|
||||
"expires_in_version": "70",
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": 10000,
|
||||
"n_buckets": 50,
|
||||
"description": "Amount of time in tenths of a millisecond from the beginning of the first async paint until all async paints are finished.",
|
||||
"bug_numbers": [1483245]
|
||||
"bug_numbers": [1483245, 1518669]
|
||||
},
|
||||
"GFX_OMTP_PAINT_WAIT_TIME": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["gfx-telemetry-alerts@mozilla.com", "rhunt@mozilla.com"],
|
||||
"expires_in_version": "66",
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": 200,
|
||||
"n_buckets": 50,
|
||||
"description": "Amount of time in milliseconds the main thread spends waiting for the paint thread to complete, if the time was greater than 200us.",
|
||||
"bug_numbers": [1386968]
|
||||
"bug_numbers": [1386968, 1518669]
|
||||
},
|
||||
"GFX_OMTP_PAINT_TASK_COUNT": {
|
||||
"record_in_processes": ["content"],
|
||||
|
@ -1833,12 +1833,13 @@ gfx.omtp:
|
||||
paint_wait_ratio:
|
||||
bug_numbers:
|
||||
- 1386968
|
||||
- 1518669
|
||||
description: >
|
||||
Ratio (in units of 1/100th of a percent) of how many times OMTP waited
|
||||
for a paint for more than 200us, versus the total number of paints.
|
||||
keyed: false
|
||||
kind: uint
|
||||
expires: "66"
|
||||
expires: "never"
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- rhunt@mozilla.com
|
||||
|
Loading…
Reference in New Issue
Block a user