Commit 7947dcea authored by Allan Sandfeld Jensen's avatar Allan Sandfeld Jensen
Browse files

Set correct priorities on tasks and threads


Change-Id: I1dc8b466d0b45f9e1d6c973f1ad3c62033bf4409
Reviewed-by: default avatarJüri Valdmann <juri.valdmann@qt.io>
Showing with 3 additions and 3 deletions
......@@ -56,7 +56,7 @@ Compositor::Compositor(content::RenderWidgetHost *host)
{
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
m_taskRunner = base::CreateSingleThreadTaskRunnerWithTraits({content::BrowserThread::UI});
m_taskRunner = base::CreateSingleThreadTaskRunnerWithTraits({content::BrowserThread::UI, base::TaskPriority::USER_VISIBLE});
m_beginFrameSource =
std::make_unique<viz::DelayBasedBeginFrameSource>(
std::make_unique<viz::DelayBasedTimeSource>(m_taskRunner.get()),
......
......@@ -244,7 +244,7 @@ void CompositorResourceTracker::updateMailboxes(std::vector<CompositorResource *
void CompositorResourceTracker::scheduleRunSubmitCallback()
{
base::PostTaskWithTraits(
FROM_HERE, { content::BrowserThread::UI },
FROM_HERE, { content::BrowserThread::UI, base::TaskPriority::USER_VISIBLE },
base::BindOnce(&CompositorResourceTracker::runSubmitCallback,
m_weakPtrFactory.GetWeakPtr()));
}
......
......@@ -82,7 +82,7 @@ struct GpuThreadControllerQt : content::GpuThreadController
if (s_gpuProcessDestroyed)
return;
s_gpuProcess = std::make_unique<content::GpuProcess>(base::ThreadPriority::NORMAL);
s_gpuProcess = std::make_unique<content::GpuProcess>(base::ThreadPriority::DISPLAY);
auto gpuInit = std::make_unique<gpu::GpuInit>();
gpuInit->InitializeInProcess(base::CommandLine::ForCurrentProcess(), gpuPreferences);
auto childThread = new content::GpuChildThread(params, std::move(gpuInit));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment