| OLD | NEW |
| 1 | 1 |
| 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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
| 6 #include <windows.h> | 6 #include <windows.h> |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 *route_id, | 185 *route_id, |
| 186 renderer_id_, | 186 renderer_id_, |
| 187 render_view_id, | 187 render_view_id, |
| 188 watchdog_, | 188 watchdog_, |
| 189 software_)); | 189 software_)); |
| 190 router_.AddRoute(*route_id, stub.get()); | 190 router_.AddRoute(*route_id, stub.get()); |
| 191 stubs_.AddWithID(stub.release(), *route_id); | 191 stubs_.AddWithID(stub.release(), *route_id); |
| 192 #endif // ENABLE_GPU | 192 #endif // ENABLE_GPU |
| 193 } | 193 } |
| 194 | 194 |
| 195 void GpuChannel::ViewResized(int32 command_buffer_route_id) { | |
| 196 GpuCommandBufferStub* stub = stubs_.Lookup(command_buffer_route_id); | |
| 197 if (stub == NULL) | |
| 198 return; | |
| 199 | |
| 200 stub->ViewResized(); | |
| 201 } | |
| 202 | |
| 203 GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) { | 195 GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) { |
| 204 return stubs_.Lookup(route_id); | 196 return stubs_.Lookup(route_id); |
| 205 } | 197 } |
| 206 | 198 |
| 207 bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { | 199 bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { |
| 208 // Always use IPC_MESSAGE_HANDLER_DELAY_REPLY for synchronous message handlers | 200 // Always use IPC_MESSAGE_HANDLER_DELAY_REPLY for synchronous message handlers |
| 209 // here. This is so the reply can be delayed if the scheduler is unscheduled. | 201 // here. This is so the reply can be delayed if the scheduler is unscheduled. |
| 210 bool handled = true; | 202 bool handled = true; |
| 211 IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg) | 203 IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg) |
| 212 IPC_MESSAGE_HANDLER(GpuChannelMsg_Initialize, OnInitialize) | 204 IPC_MESSAGE_HANDLER(GpuChannelMsg_Initialize, OnInitialize) |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 431 |
| 440 #if defined(OS_POSIX) | 432 #if defined(OS_POSIX) |
| 441 int GpuChannel::TakeRendererFileDescriptor() { | 433 int GpuChannel::TakeRendererFileDescriptor() { |
| 442 if (!channel_.get()) { | 434 if (!channel_.get()) { |
| 443 NOTREACHED(); | 435 NOTREACHED(); |
| 444 return -1; | 436 return -1; |
| 445 } | 437 } |
| 446 return channel_->TakeClientFileDescriptor(); | 438 return channel_->TakeClientFileDescriptor(); |
| 447 } | 439 } |
| 448 #endif // defined(OS_POSIX) | 440 #endif // defined(OS_POSIX) |
| OLD | NEW |