| Index: services/ui/public/cpp/gpu_service.h
|
| diff --git a/services/ui/public/cpp/gpu_service.h b/services/ui/public/cpp/gpu_service.h
|
| index a1155ae0bdc3745714270da2455db5d2c75720fc..f6d0104fd0df8afd639204e2e33393b246d93a0b 100644
|
| --- a/services/ui/public/cpp/gpu_service.h
|
| +++ b/services/ui/public/cpp/gpu_service.h
|
| @@ -35,8 +35,13 @@ class GpuService : public gpu::GpuChannelHostFactory,
|
| }
|
|
|
| // The GpuService has to be initialized in the main thread before establishing
|
| - // the gpu channel.
|
| - static std::unique_ptr<GpuService> Initialize(shell::Connector* connector);
|
| + // the gpu channel. The IO thread task-runner needed for the gpu channel can
|
| + // be set using SetIOTaskRunner(). If no task-runner is set, then a new thread
|
| + // is created for IO instead.
|
| + static std::unique_ptr<GpuService> Create(shell::Connector* connector);
|
| +
|
| + void SetIOThreadTaskRunner(
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner);
|
|
|
| // gpu::GpuChannelEstablishFactory:
|
| void EstablishGpuChannel(
|
| @@ -65,9 +70,10 @@ class GpuService : public gpu::GpuChannelHostFactory,
|
| size_t size) override;
|
|
|
| scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
|
| + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
|
| shell::Connector* connector_;
|
| base::WaitableEvent shutdown_event_;
|
| - base::Thread io_thread_;
|
| + std::unique_ptr<base::Thread> io_thread_;
|
| std::unique_ptr<MojoGpuMemoryBufferManager> gpu_memory_buffer_manager_;
|
|
|
| // Lock for |gpu_channel_|, |establish_callbacks_| & |is_establishing_|.
|
|
|