Chromium Code Reviews| Index: content/browser/gpu/gpu_process_host.cc |
| diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc |
| index 7749da464a4d2790cbd2bc3fd6cb9055163779f8..d91fccf757da49c284a59d947d3513ab24d4e1c3 100644 |
| --- a/content/browser/gpu/gpu_process_host.cc |
| +++ b/content/browser/gpu/gpu_process_host.cc |
| @@ -717,6 +717,18 @@ void GpuProcessHost::CreateGpuMemoryBuffer( |
| weak_ptr_factory_.GetWeakPtr())); |
| } |
| +void GpuProcessHost::GetGpuMemoryBufferAttribs( |
| + const GetGpuMemoryBufferAttribsCallback& callback) { |
| + TRACE_EVENT0("gpu", "GpuProcessHost::GetGpuMemoryBufferAttribs"); |
| + |
| + DCHECK(CalledOnValidThread()); |
| + |
| + get_supported_gpu_memory_buffer_attribs_requests_.push(callback); |
| + gpu_service_ptr_->GetGpuMemoryBufferAttribs( |
|
sadrul
2017/04/19 21:45:46
Maybe not make another request when a request is a
varad
2017/04/21 13:03:59
Done.
|
| + base::Bind(&GpuProcessHost::OnGpuMemoryBufferAttribsReceived, |
| + weak_ptr_factory_.GetWeakPtr())); |
| +} |
| + |
| void GpuProcessHost::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
| int client_id, |
| const gpu::SyncToken& sync_token) { |
| @@ -780,6 +792,15 @@ void GpuProcessHost::OnDestroyingVideoSurfaceAck() { |
| } |
| #endif |
| +void GpuProcessHost::OnGpuMemoryBufferAttribsReceived( |
| + const gfx::GpuMemoryBufferAttribVector& supported_attribs) { |
| + TRACE_EVENT0("gpu", "GpuProcessHost::OnGpuMemoryBufferAttribsReceived"); |
| + DCHECK(!get_supported_gpu_memory_buffer_attribs_requests_.empty()); |
| + auto callback = get_supported_gpu_memory_buffer_attribs_requests_.front(); |
| + get_supported_gpu_memory_buffer_attribs_requests_.pop(); |
|
sadrul
2017/04/19 21:45:46
With the change suggested above, this would need t
varad
2017/04/21 13:03:59
Done.
|
| + callback.Run(supported_attribs); |
| +} |
| + |
| void GpuProcessHost::OnProcessLaunched() { |
| UMA_HISTOGRAM_TIMES("GPU.GPUProcessLaunchTime", |
| base::TimeTicks::Now() - init_start_time_); |