| Index: content/common/gpu/gpu_channel.cc
|
| diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
|
| index c12c762c6004f725973182513535274cc6ac2cc7..f431bc2c63c6e8724f3082cce8e1853706b1ebd5 100644
|
| --- a/content/common/gpu/gpu_channel.cc
|
| +++ b/content/common/gpu/gpu_channel.cc
|
| @@ -13,6 +13,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| +#include "base/macros.h"
|
| #include "base/message_loop/message_loop_proxy.h"
|
| #include "base/stl_util.h"
|
| #include "base/strings/string_util.h"
|
| @@ -21,6 +22,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_jpeg_decode_accelerator.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "gpu/command_buffer/common/mailbox.h"
|
| #include "gpu/command_buffer/common/value_state.h"
|
| @@ -667,11 +669,14 @@ void GpuChannel::OnDestroy() {
|
|
|
| bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) {
|
| bool handled = true;
|
| + LOG(ERROR) << __func__ << ", type=" << msg.type();
|
| +
|
| IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg)
|
| IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateOffscreenCommandBuffer,
|
| OnCreateOffscreenCommandBuffer)
|
| IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroyCommandBuffer,
|
| OnDestroyCommandBuffer)
|
| + IPC_MESSAGE_HANDLER(GpuMsg_CreateJpegDecoder, OnCreateJpegDecoder)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| DCHECK(handled) << msg.type();
|
| @@ -793,6 +798,20 @@ void GpuChannel::OnDestroyCommandBuffer(int32 route_id) {
|
| }
|
| }
|
|
|
| +void GpuChannel::OnCreateJpegDecoder(int32 route_id, bool* succeeded) {
|
| + LOG(ERROR) << "GpuChannel::OnCreateJpegDecoder";
|
| + GpuJpegDecodeAccelerator* decoder = new GpuJpegDecodeAccelerator(
|
| + this,
|
| + route_id, io_message_loop_);
|
| + jpeg_decoder_.reset(decoder);
|
| +
|
| + *succeeded = decoder->Initialize();
|
| +}
|
| +
|
| +void GpuChannel::ReleaseJpegDecoder() {
|
| + ignore_result(jpeg_decoder_.release());
|
| +}
|
| +
|
| void GpuChannel::MessageProcessed() {
|
| messages_processed_++;
|
| if (preempting_flag_.get()) {
|
|
|