OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/service/gpu_video_encode_accelerator.h" | 5 #include "media/gpu/ipc/service/gpu_video_encode_accelerator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
14 #include "base/numerics/safe_math.h" | 14 #include "base/numerics/safe_math.h" |
15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
| 16 #include "base/threading/thread_task_runner_handle.h" |
16 #include "build/build_config.h" | 17 #include "build/build_config.h" |
17 #include "gpu/ipc/service/gpu_channel.h" | 18 #include "gpu/ipc/service/gpu_channel.h" |
18 #include "gpu/ipc/service/gpu_channel_manager.h" | 19 #include "gpu/ipc/service/gpu_channel_manager.h" |
19 #include "ipc/ipc_message_macros.h" | 20 #include "ipc/ipc_message_macros.h" |
20 #include "media/base/bind_to_current_loop.h" | 21 #include "media/base/bind_to_current_loop.h" |
21 #include "media/base/limits.h" | 22 #include "media/base/limits.h" |
22 #include "media/base/video_frame.h" | 23 #include "media/base/video_frame.h" |
23 #include "media/gpu/gpu_video_accelerator_util.h" | 24 #include "media/gpu/gpu_video_accelerator_util.h" |
24 #include "media/gpu/ipc/common/media_messages.h" | 25 #include "media/gpu/ipc/common/media_messages.h" |
25 #include "media/media_features.h" | 26 #include "media/media_features.h" |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 DLOG(ERROR) << __func__ << " failed."; | 536 DLOG(ERROR) << __func__ << " failed."; |
536 } | 537 } |
537 } | 538 } |
538 | 539 |
539 bool GpuVideoEncodeAccelerator::CheckIfCalledOnCorrectThread() { | 540 bool GpuVideoEncodeAccelerator::CheckIfCalledOnCorrectThread() { |
540 return (filter_ && io_task_runner_->BelongsToCurrentThread()) || | 541 return (filter_ && io_task_runner_->BelongsToCurrentThread()) || |
541 (!filter_ && main_task_runner_->BelongsToCurrentThread()); | 542 (!filter_ && main_task_runner_->BelongsToCurrentThread()); |
542 } | 543 } |
543 | 544 |
544 } // namespace media | 545 } // namespace media |
OLD | NEW |