| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/run_loop.h" | 5 #include "base/run_loop.h" |
| 6 #include "base/synchronization/waitable_event.h" | 6 #include "base/synchronization/waitable_event.h" |
| 7 #include "base/test/test_simple_task_runner.h" | 7 #include "base/test/test_simple_task_runner.h" |
| 8 #include "content/common/gpu/gpu_channel.h" | 8 #include "content/common/gpu/gpu_channel.h" |
| 9 #include "content/common/gpu/gpu_channel_manager.h" | 9 #include "content/common/gpu/gpu_channel_manager.h" |
| 10 #include "content/common/gpu/gpu_messages.h" | 10 #include "content/common/gpu/gpu_messages.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 public: | 105 public: |
| 106 SimpleGpuClient() | 106 SimpleGpuClient() |
| 107 : IPC::SimpleWorker(IPC::Channel::MODE_CLIENT, "simple_client"), | 107 : IPC::SimpleWorker(IPC::Channel::MODE_CLIENT, "simple_client"), |
| 108 router_(this) { | 108 router_(this) { |
| 109 } | 109 } |
| 110 | 110 |
| 111 void Start() override { | 111 void Start() override { |
| 112 IPC::SimpleWorker::Start(); | 112 IPC::SimpleWorker::Start(); |
| 113 gpu_channel_manager_.reset( | 113 gpu_channel_manager_.reset( |
| 114 new GpuChannelManager(&router_, NULL, ipc_thread().task_runner().get(), | 114 new GpuChannelManager(&router_, NULL, ipc_thread().task_runner().get(), |
| 115 shutdown_event(), channel(), nullptr)); | 115 shutdown_event(), channel(), nullptr, nullptr)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void Shutdown() override { | 118 void Shutdown() override { |
| 119 gpu_channel_manager_.reset(); | 119 gpu_channel_manager_.reset(); |
| 120 IPC::SimpleWorker::Shutdown(); | 120 IPC::SimpleWorker::Shutdown(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 GpuChannelManager* gpu_channel_manager() { | 123 GpuChannelManager* gpu_channel_manager() { |
| 124 return gpu_channel_manager_.get(); | 124 return gpu_channel_manager_.get(); |
| 125 } | 125 } |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 const ValueState* state2 = | 214 const ValueState* state2 = |
| 215 pending_value_buffer_state2->GetState(GL_MOUSE_POSITION_CHROMIUM); | 215 pending_value_buffer_state2->GetState(GL_MOUSE_POSITION_CHROMIUM); |
| 216 ASSERT_NE(state1, state2); | 216 ASSERT_NE(state1, state2); |
| 217 | 217 |
| 218 ASSERT_EQ(state1->int_value[0], value_state1.int_value[0]); | 218 ASSERT_EQ(state1->int_value[0], value_state1.int_value[0]); |
| 219 ASSERT_EQ(state2->int_value[0], value_state2.int_value[0]); | 219 ASSERT_EQ(state2->int_value[0], value_state2.int_value[0]); |
| 220 ASSERT_NE(state1->int_value[0], state2->int_value[0]); | 220 ASSERT_NE(state1->int_value[0], state2->int_value[0]); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace content | 223 } // namespace content |
| OLD | NEW |