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 ba1f79364d98d71b25d40f8a826e330ca26d55a2..e848db606ea5c28ec9da830b4543361634856f56 100644 |
--- a/content/browser/gpu/gpu_process_host.cc |
+++ b/content/browser/gpu/gpu_process_host.cc |
@@ -764,6 +764,17 @@ void GpuProcessHost::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
Send(new GpuMsg_DestroyGpuMemoryBuffer(id, client_id, sync_token)); |
} |
+void GpuProcessHost::CreateArcVideoAcceleratorChannel( |
+ const CreateArcVideoAcceleratorChannelCallback& callback) { |
+ DCHECK(CalledOnValidThread()); |
+ |
+ if (Send(new GpuMsg_CreateArcVideoAcceleratorChannel())) { |
+ create_arc_video_accelerator_channel_requests_.push(callback); |
+ } else { |
+ callback.Run(IPC::ChannelHandle()); |
+ } |
+} |
+ |
void GpuProcessHost::OnInitialized(bool result, const gpu::GPUInfo& gpu_info) { |
UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", result); |
initialized_ = result; |
@@ -831,6 +842,17 @@ void GpuProcessHost::OnGpuMemoryBufferCreated( |
callback.Run(handle); |
} |
+void GpuProcessHost::OnArcVideoAcceleratorChannelCreated( |
+ const IPC::ChannelHandle& handle) { |
+ if (create_arc_video_accelerator_channel_requests_.empty()) |
Owen Lin
2015/12/07 09:05:23
Would you like to log the error situation?
kcwu
2015/12/10 10:17:37
Done.
|
+ return; |
+ |
+ CreateArcVideoAcceleratorChannelCallback callback = |
+ create_arc_video_accelerator_channel_requests_.front(); |
+ create_arc_video_accelerator_channel_requests_.pop(); |
+ callback.Run(handle); |
+} |
+ |
void GpuProcessHost::OnDidCreateOffscreenContext(const GURL& url) { |
urls_with_live_offscreen_contexts_.insert(url); |
} |
@@ -1043,6 +1065,13 @@ void GpuProcessHost::SendOutstandingReplies() { |
create_gpu_memory_buffer_requests_.pop(); |
callback.Run(gfx::GpuMemoryBufferHandle()); |
} |
+ |
+ while (!create_arc_video_accelerator_channel_requests_.empty()) { |
+ CreateArcVideoAcceleratorChannelCallback callback = |
+ create_arc_video_accelerator_channel_requests_.front(); |
+ create_arc_video_accelerator_channel_requests_.pop(); |
+ callback.Run(IPC::ChannelHandle()); |
+ } |
} |
void GpuProcessHost::BlockLiveOffscreenContexts() { |