| Index: content/gpu/gpu_child_thread.cc
|
| diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
|
| index 3a4216bebf246b2c096234e9d7e2e8584a87e938..7d7ffe8f0aca8ebac8189825b8d55b2b02a6943e 100644
|
| --- a/content/gpu/gpu_child_thread.cc
|
| +++ b/content/gpu/gpu_child_thread.cc
|
| @@ -130,13 +130,17 @@
|
| g_thread_safe_sender.Get() = thread_safe_sender();
|
| }
|
|
|
| -GpuChildThread::GpuChildThread(const InProcessChildThreadParams& params)
|
| +GpuChildThread::GpuChildThread(
|
| + const InProcessChildThreadParams& params,
|
| + GpuMemoryBufferFactory* gpu_memory_buffer_factory)
|
| : ChildThreadImpl(ChildThreadImpl::Options::Builder()
|
| .InBrowserProcess(params)
|
| + .AddStartupFilter(new GpuMemoryBufferMessageFilter(
|
| + gpu_memory_buffer_factory))
|
| .Build()),
|
| dead_on_arrival_(false),
|
| in_browser_process_(true),
|
| - gpu_memory_buffer_factory_(nullptr) {
|
| + gpu_memory_buffer_factory_(gpu_memory_buffer_factory) {
|
| #if defined(OS_WIN)
|
| target_services_ = NULL;
|
| #endif
|
| @@ -152,6 +156,15 @@
|
| }
|
|
|
| GpuChildThread::~GpuChildThread() {
|
| +}
|
| +
|
| +// static
|
| +gfx::GpuMemoryBufferType GpuChildThread::GetGpuMemoryBufferFactoryType() {
|
| + std::vector<gfx::GpuMemoryBufferType> supported_types;
|
| + GpuMemoryBufferFactory::GetSupportedTypes(&supported_types);
|
| + DCHECK(!supported_types.empty());
|
| + // Note: We always use the preferred type.
|
| + return supported_types[0];
|
| }
|
|
|
| void GpuChildThread::Shutdown() {
|
|
|