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 "media/gpu/ipc/client/gpu_video_decode_accelerator_host.h" | 5 #include "media/gpu/ipc/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" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "base/thread_task_runner_handle.h" | |
12 #include "build/build_config.h" | 11 #include "build/build_config.h" |
13 #include "gpu/ipc/client/gpu_channel_host.h" | 12 #include "gpu/ipc/client/gpu_channel_host.h" |
14 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
15 #include "ipc/ipc_message_utils.h" | 14 #include "ipc/ipc_message_utils.h" |
16 #include "media/gpu/ipc/common/media_messages.h" | 15 #include "media/gpu/ipc/common/media_messages.h" |
17 | 16 |
18 namespace media { | 17 namespace media { |
19 | 18 |
20 GpuVideoDecodeAcceleratorHost::GpuVideoDecodeAcceleratorHost( | 19 GpuVideoDecodeAcceleratorHost::GpuVideoDecodeAcceleratorHost( |
21 gpu::CommandBufferProxyImpl* impl) | 20 gpu::CommandBufferProxyImpl* impl) |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 weak_this_factory_.InvalidateWeakPtrs(); | 277 weak_this_factory_.InvalidateWeakPtrs(); |
279 | 278 |
280 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the | 279 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the |
281 // last thing done on this stack! | 280 // last thing done on this stack! |
282 VideoDecodeAccelerator::Client* client = NULL; | 281 VideoDecodeAccelerator::Client* client = NULL; |
283 std::swap(client, client_); | 282 std::swap(client, client_); |
284 client->NotifyError(static_cast<VideoDecodeAccelerator::Error>(error)); | 283 client->NotifyError(static_cast<VideoDecodeAccelerator::Error>(error)); |
285 } | 284 } |
286 | 285 |
287 } // namespace media | 286 } // namespace media |
OLD | NEW |