| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h" | 5 #include "content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/shared_memory_handle.h" | 12 #include "base/memory/shared_memory_handle.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "content/common/gpu/client/gpu_channel_host.h" | 16 #include "content/common/gpu/client/gpu_channel_host.h" |
| 17 #include "content/common/gpu/media/media_messages.h" | 17 #include "content/common/gpu/gpu_messages.h" |
| 18 #include "content/common/gpu/media_messages.h" |
| 18 #include "ipc/ipc_listener.h" | 19 #include "ipc/ipc_listener.h" |
| 19 #include "ipc/ipc_message_macros.h" | 20 #include "ipc/ipc_message_macros.h" |
| 20 #include "ipc/ipc_message_utils.h" | 21 #include "ipc/ipc_message_utils.h" |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 | 24 |
| 24 // Class to receive AcceleratedJpegDecoderHostMsg_DecodeAck IPC message on IO | 25 // Class to receive AcceleratedJpegDecoderHostMsg_DecodeAck IPC message on IO |
| 25 // thread. This does very similar what MessageFilter usually does. It is not | 26 // thread. This does very similar what MessageFilter usually does. It is not |
| 26 // MessageFilter because GpuChannelHost doesn't support AddFilter. | 27 // MessageFilter because GpuChannelHost doesn't support AddFilter. |
| 27 class GpuJpegDecodeAcceleratorHost::Receiver : public IPC::Listener, | 28 class GpuJpegDecodeAcceleratorHost::Receiver : public IPC::Listener, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 if (!channel_->Send(message)) { | 195 if (!channel_->Send(message)) { |
| 195 DLOG(ERROR) << "Send(" << message->type() << ") failed"; | 196 DLOG(ERROR) << "Send(" << message->type() << ") failed"; |
| 196 } | 197 } |
| 197 } | 198 } |
| 198 | 199 |
| 199 base::WeakPtr<IPC::Listener> GpuJpegDecodeAcceleratorHost::GetReceiver() { | 200 base::WeakPtr<IPC::Listener> GpuJpegDecodeAcceleratorHost::GetReceiver() { |
| 200 return receiver_->AsWeakPtrForIO(); | 201 return receiver_->AsWeakPtrForIO(); |
| 201 } | 202 } |
| 202 | 203 |
| 203 } // namespace content | 204 } // namespace content |
| OLD | NEW |