| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 *route_id, | 202 *route_id, |
| 203 renderer_id_, | 203 renderer_id_, |
| 204 render_view_id, | 204 render_view_id, |
| 205 watchdog_, | 205 watchdog_, |
| 206 software_)); | 206 software_)); |
| 207 router_.AddRoute(*route_id, stub.get()); | 207 router_.AddRoute(*route_id, stub.get()); |
| 208 stubs_.AddWithID(stub.release(), *route_id); | 208 stubs_.AddWithID(stub.release(), *route_id); |
| 209 #endif // ENABLE_GPU | 209 #endif // ENABLE_GPU |
| 210 } | 210 } |
| 211 | 211 |
| 212 void GpuChannel::ViewResized(int32 command_buffer_route_id) { | |
| 213 GpuCommandBufferStub* stub = stubs_.Lookup(command_buffer_route_id); | |
| 214 if (stub == NULL) | |
| 215 return; | |
| 216 | |
| 217 stub->ViewResized(); | |
| 218 } | |
| 219 | |
| 220 GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) { | 212 GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) { |
| 221 return stubs_.Lookup(route_id); | 213 return stubs_.Lookup(route_id); |
| 222 } | 214 } |
| 223 | 215 |
| 224 bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { | 216 bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { |
| 225 // Always use IPC_MESSAGE_HANDLER_DELAY_REPLY for synchronous message handlers | 217 // Always use IPC_MESSAGE_HANDLER_DELAY_REPLY for synchronous message handlers |
| 226 // here. This is so the reply can be delayed if the scheduler is unscheduled. | 218 // here. This is so the reply can be delayed if the scheduler is unscheduled. |
| 227 bool handled = true; | 219 bool handled = true; |
| 228 IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg) | 220 IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg) |
| 229 IPC_MESSAGE_HANDLER(GpuChannelMsg_Initialize, OnInitialize) | 221 IPC_MESSAGE_HANDLER(GpuChannelMsg_Initialize, OnInitialize) |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 450 |
| 459 #if defined(OS_POSIX) | 451 #if defined(OS_POSIX) |
| 460 int GpuChannel::TakeRendererFileDescriptor() { | 452 int GpuChannel::TakeRendererFileDescriptor() { |
| 461 if (!channel_.get()) { | 453 if (!channel_.get()) { |
| 462 NOTREACHED(); | 454 NOTREACHED(); |
| 463 return -1; | 455 return -1; |
| 464 } | 456 } |
| 465 return channel_->TakeClientFileDescriptor(); | 457 return channel_->TakeClientFileDescriptor(); |
| 466 } | 458 } |
| 467 #endif // defined(OS_POSIX) | 459 #endif // defined(OS_POSIX) |
| OLD | NEW |