Skip to content

Commit

Permalink
Bug 1688721 uninline AudioEventTimeline::CleanupEventsOlderThan() r=p…
Browse files Browse the repository at this point in the history
…adenot

Differential Revision: https://phabricator.services.mozilla.com/D188573

UltraBlame original commit: 7c6496f92bb0572d56513d645f3d6201f77a5653
  • Loading branch information
marco-c committed Sep 21, 2023
1 parent b1e8912 commit 0e34f56
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 109 deletions.
144 changes: 144 additions & 0 deletions dom/media/webaudio/AudioEventTimeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,150 @@ mCurve
;
}
}
template
void
AudioEventTimeline
:
:
CleanupEventsOlderThan
(
double
)
;
template
void
AudioEventTimeline
:
:
CleanupEventsOlderThan
(
int64_t
)
;
template
<
class
TimeType
>
void
AudioEventTimeline
:
:
CleanupEventsOlderThan
(
TimeType
aTime
)
{
while
(
mEvents
.
Length
(
)
>
1
&
&
aTime
>
mEvents
[
1
]
.
Time
<
TimeType
>
(
)
)
{
if
(
mEvents
[
1
]
.
mType
=
=
AudioTimelineEvent
:
:
SetTarget
)
{
mSetTargetStartValue
=
GetValuesAtTimeHelperInternal
(
mEvents
[
1
]
.
Time
<
TimeType
>
(
)
&
mEvents
[
0
]
nullptr
)
;
}
MOZ_ASSERT
(
!
mEvents
[
0
]
.
mTrack
"
AudioParam
tracks
should
never
be
destroyed
on
the
real
-
time
"
"
thread
.
"
)
;
JS
:
:
AutoSuppressGCAnalysis
suppress
;
mEvents
.
RemoveElementAt
(
0
)
;
}
}
/
/
This
Expand Down
109 changes: 0 additions & 109 deletions dom/media/webaudio/AudioEventTimeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -2136,116 +2136,7 @@ CleanupEventsOlderThan
TimeType
aTime
)
{
while
(
mEvents
.
Length
(
)
>
1
&
&
aTime
>
mEvents
[
1
]
.
Time
<
TimeType
>
(
)
)
{
if
(
mEvents
[
1
]
.
mType
=
=
AudioTimelineEvent
:
:
SetTarget
)
{
mSetTargetStartValue
=
GetValuesAtTimeHelperInternal
(
mEvents
[
1
]
.
Time
<
TimeType
>
(
)
&
mEvents
[
0
]
nullptr
)
;
}
MOZ_ASSERT
(
!
mEvents
[
0
]
.
mTrack
"
AudioParam
tracks
should
never
be
destroyed
on
the
real
-
time
"
"
thread
.
"
)
;
JS
:
:
AutoSuppressGCAnalysis
suppress
;
mEvents
.
RemoveElementAt
(
0
)
;
}
}
private
:
template
Expand Down

0 comments on commit 0e34f56

Please sign in to comment.