| 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/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/test/test_simple_task_runner.h" | 9 #include "base/test/test_simple_task_runner.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 DISALLOW_COPY_AND_ASSIGN(TestSinkFilteredSender); | 70 DISALLOW_COPY_AND_ASSIGN(TestSinkFilteredSender); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 GpuChannelTestCommon::GpuChannelTestCommon() | 73 GpuChannelTestCommon::GpuChannelTestCommon() |
| 74 : task_runner_(new base::TestSimpleTaskRunner), | 74 : task_runner_(new base::TestSimpleTaskRunner), |
| 75 io_task_runner_(new base::TestSimpleTaskRunner), | 75 io_task_runner_(new base::TestSimpleTaskRunner), |
| 76 sync_point_manager_(new SyncPointManager()), | 76 sync_point_manager_(new SyncPointManager()), |
| 77 channel_manager_delegate_(new TestGpuChannelManagerDelegate()), | 77 channel_manager_delegate_(new TestGpuChannelManagerDelegate()), |
| 78 channel_manager_( | 78 channel_manager_( |
| 79 new GpuChannelManager(GpuPreferences(), | 79 new GpuChannelManager(GpuPreferences(), |
| 80 GpuDriverBugWorkarounds(), |
| 80 channel_manager_delegate_.get(), | 81 channel_manager_delegate_.get(), |
| 81 nullptr /* watchdog */, | 82 nullptr /* watchdog */, |
| 82 task_runner_.get(), | 83 task_runner_.get(), |
| 83 io_task_runner_.get(), | 84 io_task_runner_.get(), |
| 84 sync_point_manager_.get(), | 85 sync_point_manager_.get(), |
| 85 nullptr /* gpu_memory_buffer_factory */, | 86 nullptr /* gpu_memory_buffer_factory */, |
| 86 GpuFeatureInfo(), | 87 GpuFeatureInfo(), |
| 87 GpuProcessActivityFlags())) { | 88 GpuProcessActivityFlags())) { |
| 88 // We need GL bindings to actually initialize command buffers. | 89 // We need GL bindings to actually initialize command buffers. |
| 89 gl::GLSurfaceTestSupport::InitializeOneOffWithStubBindings(); | 90 gl::GLSurfaceTestSupport::InitializeOneOffWithStubBindings(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 155 |
| 155 base::SharedMemoryHandle GpuChannelTestCommon::GetSharedHandle() { | 156 base::SharedMemoryHandle GpuChannelTestCommon::GetSharedHandle() { |
| 156 base::SharedMemory shared_memory; | 157 base::SharedMemory shared_memory; |
| 157 shared_memory.CreateAnonymous(10); | 158 shared_memory.CreateAnonymous(10); |
| 158 base::SharedMemoryHandle shmem_handle; | 159 base::SharedMemoryHandle shmem_handle; |
| 159 shared_memory.ShareToProcess(base::GetCurrentProcessHandle(), &shmem_handle); | 160 shared_memory.ShareToProcess(base::GetCurrentProcessHandle(), &shmem_handle); |
| 160 return shmem_handle; | 161 return shmem_handle; |
| 161 } | 162 } |
| 162 | 163 |
| 163 } // namespace gpu | 164 } // namespace gpu |
| OLD | NEW |