| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_video_decode_accelerator_host.h" | 5 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/thread_task_runner_handle.h" | |
| 11 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 12 #include "base/thread_task_runner_handle.h" | 11 #include "base/thread_task_runner_handle.h" |
| 13 #include "content/common/gpu/client/gpu_channel_host.h" | 12 #include "content/common/gpu/client/gpu_channel_host.h" |
| 14 #include "content/common/gpu/media/media_messages.h" | 13 #include "content/common/gpu/media_messages.h" |
| 15 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
| 16 #include "ipc/ipc_message_utils.h" | 15 #include "ipc/ipc_message_utils.h" |
| 17 | 16 |
| 18 using media::VideoDecodeAccelerator; | 17 using media::VideoDecodeAccelerator; |
| 19 namespace content { | 18 namespace content { |
| 20 | 19 |
| 21 GpuVideoDecodeAcceleratorHost::GpuVideoDecodeAcceleratorHost( | 20 GpuVideoDecodeAcceleratorHost::GpuVideoDecodeAcceleratorHost( |
| 22 GpuChannelHost* channel, | 21 GpuChannelHost* channel, |
| 23 CommandBufferProxyImpl* impl) | 22 CommandBufferProxyImpl* impl) |
| 24 : channel_(channel), | 23 : channel_(channel), |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 weak_this_factory_.InvalidateWeakPtrs(); | 271 weak_this_factory_.InvalidateWeakPtrs(); |
| 273 | 272 |
| 274 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the | 273 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the |
| 275 // last thing done on this stack! | 274 // last thing done on this stack! |
| 276 media::VideoDecodeAccelerator::Client* client = NULL; | 275 media::VideoDecodeAccelerator::Client* client = NULL; |
| 277 std::swap(client, client_); | 276 std::swap(client, client_); |
| 278 client->NotifyError(static_cast<media::VideoDecodeAccelerator::Error>(error)); | 277 client->NotifyError(static_cast<media::VideoDecodeAccelerator::Error>(error)); |
| 279 } | 278 } |
| 280 | 279 |
| 281 } // namespace content | 280 } // namespace content |
| OLD | NEW |