| 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 370da1225e7660333dc77d94e23660f21fc4b435..0226d6187afe82891bff59951e354d54e521d541 100644
|
| --- a/content/browser/gpu/gpu_process_host.cc
|
| +++ b/content/browser/gpu/gpu_process_host.cc
|
| @@ -618,6 +618,8 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
|
| OnGpuMemoryBufferCreated)
|
| IPC_MESSAGE_HANDLER(GpuHostMsg_DidCreateOffscreenContext,
|
| OnDidCreateOffscreenContext)
|
| + IPC_MESSAGE_HANDLER(GpuHostMsg_ArcVideoAcceleratorChannelCreated,
|
| + OnArcVideoAcceleratorChannelCreated)
|
| IPC_MESSAGE_HANDLER(GpuHostMsg_DidLoseContext, OnDidLoseContext)
|
| IPC_MESSAGE_HANDLER(GpuHostMsg_DidDestroyOffscreenContext,
|
| OnDidDestroyOffscreenContext)
|
| @@ -767,6 +769,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;
|
| @@ -834,6 +847,21 @@ void GpuProcessHost::OnGpuMemoryBufferCreated(
|
| callback.Run(handle);
|
| }
|
|
|
| +void GpuProcessHost::OnArcVideoAcceleratorChannelCreated(
|
| + const IPC::ChannelHandle& handle) {
|
| + if (create_arc_video_accelerator_channel_requests_.empty())
|
| + RouteOnUIThread(
|
| + GpuHostMsg_OnLogMessage(logging::LOG_WARNING, "WARNING",
|
| + "Received a ArcVideoAcceleratorChannelCreated "
|
| + "message but no requests in queue."));
|
| + 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);
|
| }
|
| @@ -1046,6 +1074,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() {
|
|
|