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