| 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "content/common/gpu/gpu_channel.h" | 6 #include "content/common/gpu/gpu_channel.h" |
| 7 #include "content/common/gpu/gpu_channel_manager.h" | 7 #include "content/common/gpu/gpu_channel_manager.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 base::SingleThreadTaskRunner* io_task_runner, | 26 base::SingleThreadTaskRunner* io_task_runner, |
| 27 gpu::SyncPointManager* sync_point_manager, | 27 gpu::SyncPointManager* sync_point_manager, |
| 28 GpuMemoryBufferFactory* gpu_memory_buffer_factory); | 28 GpuMemoryBufferFactory* gpu_memory_buffer_factory); |
| 29 ~TestGpuChannelManager() override; | 29 ~TestGpuChannelManager() override; |
| 30 | 30 |
| 31 // IPC::Sender implementation. | 31 // IPC::Sender implementation. |
| 32 bool Send(IPC::Message* msg) override; | 32 bool Send(IPC::Message* msg) override; |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 scoped_ptr<GpuChannel> CreateGpuChannel( | 35 scoped_ptr<GpuChannel> CreateGpuChannel( |
| 36 gfx::GLShareGroup* share_group, | |
| 37 gpu::gles2::MailboxManager* mailbox_manager, | |
| 38 int client_id, | 36 int client_id, |
| 39 uint64_t client_tracing_id, | 37 uint64_t client_tracing_id, |
| 38 bool preempts, |
| 40 bool allow_future_sync_points, | 39 bool allow_future_sync_points, |
| 41 bool allow_real_time_streams) override; | 40 bool allow_real_time_streams) override; |
| 42 | 41 |
| 43 private: | 42 private: |
| 44 IPC::TestSink* const sink_; | 43 IPC::TestSink* const sink_; |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 class TestGpuChannel : public GpuChannel { | 46 class TestGpuChannel : public GpuChannel { |
| 48 public: | 47 public: |
| 49 TestGpuChannel(IPC::TestSink* sink, | 48 TestGpuChannel(IPC::TestSink* sink, |
| 50 GpuChannelManager* gpu_channel_manager, | 49 GpuChannelManager* gpu_channel_manager, |
| 51 gfx::GLShareGroup* share_group, | 50 gfx::GLShareGroup* share_group, |
| 52 gpu::gles2::MailboxManager* mailbox_manager, | 51 gpu::gles2::MailboxManager* mailbox_manager, |
| 52 gpu::PreemptionFlag* preempting_flag, |
| 53 base::SingleThreadTaskRunner* task_runner, | 53 base::SingleThreadTaskRunner* task_runner, |
| 54 base::SingleThreadTaskRunner* io_task_runner, | 54 base::SingleThreadTaskRunner* io_task_runner, |
| 55 int client_id, | 55 int client_id, |
| 56 uint64_t client_tracing_id, | 56 uint64_t client_tracing_id, |
| 57 bool allow_future_sync_points, | 57 bool allow_future_sync_points, |
| 58 bool allow_real_time_streams); | 58 bool allow_real_time_streams); |
| 59 ~TestGpuChannel() override; | 59 ~TestGpuChannel() override; |
| 60 | 60 |
| 61 base::ProcessId GetClientPID() const override; | 61 base::ProcessId GetClientPID() const override; |
| 62 | 62 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 scoped_ptr<IPC::TestSink> sink_; | 83 scoped_ptr<IPC::TestSink> sink_; |
| 84 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; | 84 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; |
| 85 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_; | 85 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_; |
| 86 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; | 86 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; |
| 87 scoped_ptr<GpuChannelManager> channel_manager_; | 87 scoped_ptr<GpuChannelManager> channel_manager_; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace content | 90 } // namespace content |
| OLD | NEW |