| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "gpu/ipc/service/gpu_channel_test_common.h" | 5 #include "gpu/ipc/service/gpu_channel_test_common.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/test/test_simple_task_runner.h" | 8 #include "base/test/test_simple_task_runner.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "gpu/command_buffer/service/sync_point_manager.h" | 10 #include "gpu/command_buffer/service/sync_point_manager.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 base::SingleThreadTaskRunner* io_task_runner, | 51 base::SingleThreadTaskRunner* io_task_runner, |
| 52 SyncPointManager* sync_point_manager, | 52 SyncPointManager* sync_point_manager, |
| 53 GpuMemoryBufferFactory* gpu_memory_buffer_factory) | 53 GpuMemoryBufferFactory* gpu_memory_buffer_factory) |
| 54 : GpuChannelManager(gpu_preferences, | 54 : GpuChannelManager(gpu_preferences, |
| 55 delegate, | 55 delegate, |
| 56 nullptr, | 56 nullptr, |
| 57 task_runner, | 57 task_runner, |
| 58 io_task_runner, | 58 io_task_runner, |
| 59 nullptr, | 59 nullptr, |
| 60 sync_point_manager, | 60 sync_point_manager, |
| 61 gpu_memory_buffer_factory) {} | 61 gpu_memory_buffer_factory, |
| 62 GpuFeatureInfo()) {} |
| 62 | 63 |
| 63 TestGpuChannelManager::~TestGpuChannelManager() { | 64 TestGpuChannelManager::~TestGpuChannelManager() { |
| 64 // Clear gpu channels here so that any IPC messages sent are handled using the | 65 // Clear gpu channels here so that any IPC messages sent are handled using the |
| 65 // overridden Send method. | 66 // overridden Send method. |
| 66 gpu_channels_.clear(); | 67 gpu_channels_.clear(); |
| 67 } | 68 } |
| 68 | 69 |
| 69 std::unique_ptr<GpuChannel> TestGpuChannelManager::CreateGpuChannel( | 70 std::unique_ptr<GpuChannel> TestGpuChannelManager::CreateGpuChannel( |
| 70 int client_id, | 71 int client_id, |
| 71 uint64_t client_tracing_id, | 72 uint64_t client_tracing_id, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 io_task_runner_.get(), sync_point_manager_.get(), nullptr)); | 147 io_task_runner_.get(), sync_point_manager_.get(), nullptr)); |
| 147 } | 148 } |
| 148 | 149 |
| 149 void GpuChannelTestCommon::TearDown() { | 150 void GpuChannelTestCommon::TearDown() { |
| 150 // Destroying channels causes tasks to run on the IO task runner. | 151 // Destroying channels causes tasks to run on the IO task runner. |
| 151 channel_manager_ = nullptr; | 152 channel_manager_ = nullptr; |
| 152 } | 153 } |
| 153 | 154 |
| 154 | 155 |
| 155 } // namespace gpu | 156 } // namespace gpu |
| OLD | NEW |