mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 980027: Part 2: Set compositor thread priority to platform-based value. r=benwa
This commit is contained in:
parent
d5eb9aeb05
commit
411269dfa3
@ -51,6 +51,8 @@
|
||||
#endif
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/ipc/ProtocolTypes.h"
|
||||
#include "mozilla/Hal.h"
|
||||
#include "mozilla/HalTypes.h"
|
||||
|
||||
using namespace base;
|
||||
using namespace mozilla;
|
||||
@ -109,6 +111,11 @@ static void ReleaseCompositorThread()
|
||||
}
|
||||
}
|
||||
|
||||
static void SetThreadPriority()
|
||||
{
|
||||
hal::SetCurrentThreadPriority(hal::THREAD_PRIORITY_COMPOSITOR);
|
||||
}
|
||||
|
||||
void
|
||||
CompositorParent::StartUpWithExistingThread(MessageLoop* aMsgLoop,
|
||||
PlatformThreadId aThreadID)
|
||||
@ -162,6 +169,7 @@ bool CompositorParent::CreateThread()
|
||||
sCompositorThread = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -200,6 +208,8 @@ CompositorParent::CompositorParent(nsIWidget* aWidget,
|
||||
CompositorLoop()->PostTask(FROM_HERE, NewRunnableFunction(&AddCompositor,
|
||||
this, &mCompositorID));
|
||||
|
||||
CompositorLoop()->PostTask(FROM_HERE, NewRunnableFunction(SetThreadPriority));
|
||||
|
||||
mRootLayerTreeID = AllocateLayerTreeId();
|
||||
sIndirectLayerTrees[mRootLayerTreeID].mParent = this;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user