Index: content/common/gpu/gpu_channel.cc |
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc |
index f8559b9ff9e716dfbb419155b549a7662f076dec..69a8dfa385afb051d208ee5e674ce0dc19645e1e 100644 |
--- a/content/common/gpu/gpu_channel.cc |
+++ b/content/common/gpu/gpu_channel.cc |
@@ -30,6 +30,7 @@ |
#include "content/common/gpu/gpu_channel_manager.h" |
#include "content/common/gpu/gpu_memory_buffer_factory.h" |
#include "content/common/gpu/gpu_messages.h" |
+#include "content/common/gpu/media/gpu_arc_accelerator.h" |
#include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h" |
#include "content/public/common/content_switches.h" |
#include "gpu/command_buffer/common/mailbox.h" |
@@ -618,6 +619,10 @@ IPC::ChannelHandle GpuChannel::Init(base::WaitableEvent* shutdown_event) { |
channel_->AddFilter(filter_.get()); |
+ arc_accelerator_.reset( |
+ new GpuArcAccelerator(this, shutdown_event, io_task_runner_)); |
+ arc_accelerator_->Initialize(); |
+ |
return channel_handle; |
} |
@@ -789,6 +794,9 @@ bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { |
OnDestroyCommandBuffer) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuMsg_CreateJpegDecoder, |
OnCreateJpegDecoder) |
+ IPC_MESSAGE_HANDLER(GpuMsg_CreateArcAccelerator, OnCreateArcAccelerator) |
+ IPC_MESSAGE_HANDLER(GpuMsg_ShutdownArcAccelerators, |
+ OnShutdownArcAccelerators) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
DCHECK(handled) << msg.type(); |
@@ -1000,6 +1008,15 @@ void GpuChannel::OnCreateJpegDecoder(int32 route_id, IPC::Message* reply_msg) { |
jpeg_decoder_->AddClient(route_id, reply_msg); |
} |
+void GpuChannel::OnCreateArcAccelerator(uint32_t device_type) { |
+ DCHECK(arc_accelerator_); |
+ arc_accelerator_->CreateClient(device_type); |
+} |
+ |
+void GpuChannel::OnShutdownArcAccelerators() { |
+ arc_accelerator_.reset(); |
+} |
+ |
void GpuChannel::CacheShader(const std::string& key, |
const std::string& shader) { |
gpu_channel_manager_->Send( |