| 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/thread_task_runner_handle.h" | 9 #include "base/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" |
| 11 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" | 11 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" |
| 12 #include "ipc/ipc_test_sink.h" | 12 #include "ipc/ipc_test_sink.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace gpu { | 15 namespace gpu { |
| 16 | 16 |
| 17 TestGpuChannelManagerDelegate::TestGpuChannelManagerDelegate() {} | 17 TestGpuChannelManagerDelegate::TestGpuChannelManagerDelegate() {} |
| 18 | 18 |
| 19 TestGpuChannelManagerDelegate::~TestGpuChannelManagerDelegate() {} | 19 TestGpuChannelManagerDelegate::~TestGpuChannelManagerDelegate() {} |
| 20 | 20 |
| 21 void TestGpuChannelManagerDelegate::SetActiveURL(const GURL& url) {} | 21 void TestGpuChannelManagerDelegate::SetActiveURL(const GURL& url) {} |
| 22 | 22 |
| 23 void TestGpuChannelManagerDelegate::AddSubscription(int32_t client_id, | |
| 24 unsigned int target) {} | |
| 25 | |
| 26 void TestGpuChannelManagerDelegate::DidCreateOffscreenContext( | 23 void TestGpuChannelManagerDelegate::DidCreateOffscreenContext( |
| 27 const GURL& active_url) {} | 24 const GURL& active_url) {} |
| 28 | 25 |
| 29 void TestGpuChannelManagerDelegate::DidDestroyChannel(int client_id) {} | 26 void TestGpuChannelManagerDelegate::DidDestroyChannel(int client_id) {} |
| 30 | 27 |
| 31 void TestGpuChannelManagerDelegate::DidDestroyOffscreenContext( | 28 void TestGpuChannelManagerDelegate::DidDestroyOffscreenContext( |
| 32 const GURL& active_url) {} | 29 const GURL& active_url) {} |
| 33 | 30 |
| 34 void TestGpuChannelManagerDelegate::DidLoseContext( | 31 void TestGpuChannelManagerDelegate::DidLoseContext( |
| 35 bool offscreen, | 32 bool offscreen, |
| 36 error::ContextLostReason reason, | 33 error::ContextLostReason reason, |
| 37 const GURL& active_url) {} | 34 const GURL& active_url) {} |
| 38 | 35 |
| 39 void TestGpuChannelManagerDelegate::GpuMemoryUmaStats( | 36 void TestGpuChannelManagerDelegate::GpuMemoryUmaStats( |
| 40 const GPUMemoryUmaStats& params) {} | 37 const GPUMemoryUmaStats& params) {} |
| 41 | 38 |
| 42 void TestGpuChannelManagerDelegate::RemoveSubscription(int32_t client_id, | |
| 43 unsigned int target) {} | |
| 44 | |
| 45 void TestGpuChannelManagerDelegate::StoreShaderToDisk( | 39 void TestGpuChannelManagerDelegate::StoreShaderToDisk( |
| 46 int32_t client_id, | 40 int32_t client_id, |
| 47 const std::string& key, | 41 const std::string& key, |
| 48 const std::string& shader) {} | 42 const std::string& shader) {} |
| 49 | 43 |
| 50 #if defined(OS_MACOSX) | 44 #if defined(OS_MACOSX) |
| 51 void TestGpuChannelManagerDelegate::SendAcceleratedSurfaceBuffersSwapped( | 45 void TestGpuChannelManagerDelegate::SendAcceleratedSurfaceBuffersSwapped( |
| 52 int32_t surface_id, | 46 int32_t surface_id, |
| 53 CAContextID ca_context_id, | 47 CAContextID ca_context_id, |
| 54 const gfx::ScopedRefCountedIOSurfaceMachPort& io_surface, | 48 const gfx::ScopedRefCountedIOSurfaceMachPort& io_surface, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 155 |
| 162 GpuChannelTestCommon::~GpuChannelTestCommon() { | 156 GpuChannelTestCommon::~GpuChannelTestCommon() { |
| 163 // Destroying channels causes tasks to run on the IO task runner. | 157 // Destroying channels causes tasks to run on the IO task runner. |
| 164 channel_manager_ = nullptr; | 158 channel_manager_ = nullptr; |
| 165 // Clear pending tasks to avoid refptr cycles that get flagged by ASAN. | 159 // Clear pending tasks to avoid refptr cycles that get flagged by ASAN. |
| 166 task_runner_->ClearPendingTasks(); | 160 task_runner_->ClearPendingTasks(); |
| 167 io_task_runner_->ClearPendingTasks(); | 161 io_task_runner_->ClearPendingTasks(); |
| 168 } | 162 } |
| 169 | 163 |
| 170 } // namespace gpu | 164 } // namespace gpu |
| OLD | NEW |