mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1429847 - Promote the GraphRunner thread. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D32499 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
6af26dcc3d
commit
356d945008
@ -13,6 +13,7 @@
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "prthread.h"
|
||||
#include "Tracing.h"
|
||||
#include "audio_thread_priority.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -91,6 +92,10 @@ bool GraphRunner::OneIteration(GraphTime aStateEnd) {
|
||||
|
||||
void GraphRunner::Run() {
|
||||
PR_SetCurrentThreadName("GraphRunner");
|
||||
|
||||
atp_handle* handle =
|
||||
atp_promote_current_thread_to_real_time(0, mGraph->GraphRate());
|
||||
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
while (true) {
|
||||
while (mThreadState == ThreadState::Wait) {
|
||||
@ -106,6 +111,10 @@ void GraphRunner::Run() {
|
||||
mMonitor.Notify();
|
||||
}
|
||||
|
||||
if (handle) {
|
||||
atp_demote_current_thread_from_real_time(handle);
|
||||
}
|
||||
|
||||
dom::WorkletThread::DeleteCycleCollectedJSContext();
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,7 @@ XPIDL_SOURCES += [
|
||||
XPIDL_MODULE = 'dom_media'
|
||||
|
||||
EXPORTS += [
|
||||
'../../third_party/rust/audio_thread_priority/audio_thread_priority.h',
|
||||
'ADTSDecoder.h',
|
||||
'ADTSDemuxer.h',
|
||||
'AsyncLogger.h',
|
||||
|
Loading…
Reference in New Issue
Block a user