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