Commit 1732f2b0 authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Use a NSRunLoop instead of a CFRunLoop in GpuMain

Under heavy CPU load, the GPU main thread was starving out messages
required by CoreAnimation.

Bug: 783298
Change-Id: If3604b47e479e93b6351b816c17c7f570589ac22
Reviewed-on: https://chromium-review.googlesource.com/775621Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517365}
parent 024f8e19
...@@ -255,9 +255,10 @@ int GpuMain(const MainFunctionParams& parameters) { ...@@ -255,9 +255,10 @@ int GpuMain(const MainFunctionParams& parameters) {
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
#error "Unsupported Linux platform." #error "Unsupported Linux platform."
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
// This is necessary for CoreAnimation layers hosted in the GPU process to // Cross-process CoreAnimation requires a CFRunLoop to function at all, and
// be drawn. See http://crbug.com/312462. // requires a NSRunLoop to not starve under heavy load. See:
std::unique_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop()); // https://crbug.com/312462#c51 and https://crbug.com/783298
std::unique_ptr<base::MessagePump> pump(new base::MessagePumpNSRunLoop());
main_message_loop.reset(new base::MessageLoop(std::move(pump))); main_message_loop.reset(new base::MessageLoop(std::move(pump)));
#else #else
main_message_loop.reset( main_message_loop.reset(
......
Markdown is supported
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