| Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| index 3a385ca6a46dd01f11a5e17b6d92d5f0c9057671..4aa13dc13b243edc37d7b5512e475306de5646cd 100644
|
| --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| @@ -28,6 +28,7 @@
|
| #include "gpu/command_buffer/service/gpu_switches.h"
|
| #include "ipc/ipc_channel_handle.h"
|
| #include "ipc/message_filter.h"
|
| +#include "ui/base/window_resize_helper.h"
|
|
|
| namespace content {
|
|
|
| @@ -344,6 +345,18 @@ CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer(
|
| return request.result;
|
| }
|
|
|
| +scoped_refptr<base::SingleThreadTaskRunner>
|
| +BrowserGpuChannelHostFactory::TaskRunner() {
|
| +#if defined(OS_MACOSX) || defined(OS_WIN)
|
| + // If we're adding a route to the main UI thread, we need to use the
|
| + // WindowResizeHelper's task runner, otherwise Gpu Channel messages will be
|
| + // blocked during a resize and we won't recieve the swap complete signal.
|
| + return ui::WindowResizeHelper::Get()->task_runner();
|
| +#else
|
| + return base::ThreadTaskRunnerHandle::Get();
|
| +#endif
|
| +}
|
| +
|
| // Blocking the UI thread to open a GPU channel is not supported on Android.
|
| // (Opening the initial channel to a child process involves handling a reply
|
| // task on the UI thread first, so we cannot block here.)
|
|
|