OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 if (message->is_sync()) { | 252 if (message->is_sync()) { |
253 IPC::Message* reply = IPC::SyncMessage::GenerateReply(&*message); | 253 IPC::Message* reply = IPC::SyncMessage::GenerateReply(&*message); |
254 reply->set_reply_error(); | 254 reply->set_reply_error(); |
255 Send(reply); | 255 Send(reply); |
256 } | 256 } |
257 } else { | 257 } else { |
258 // If the command buffer becomes unscheduled as a result of handling the | 258 // If the command buffer becomes unscheduled as a result of handling the |
259 // message but still has more commands to process, synthesize an IPC | 259 // message but still has more commands to process, synthesize an IPC |
260 // message to flush that command buffer. | 260 // message to flush that command buffer. |
261 if (stub) { | 261 if (stub) { |
262 if (!stub->IsScheduled() && stub->HasUnprocessedCommands()) { | 262 if (stub->HasUnprocessedCommands()) { |
263 deferred_messages_.push_front(new GpuCommandBufferMsg_Rescheduled( | 263 deferred_messages_.push_front(new GpuCommandBufferMsg_Rescheduled( |
264 stub->route_id())); | 264 stub->route_id())); |
265 } | 265 } |
266 | 266 |
267 ScheduleDelayedWork(stub, kHandleMoreWorkPeriodMs); | 267 ScheduleDelayedWork(stub, kHandleMoreWorkPeriodMs); |
268 } | 268 } |
269 } | 269 } |
270 } | 270 } |
271 | 271 |
272 if (!deferred_messages_.empty()) { | 272 if (!deferred_messages_.empty()) { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 441 |
442 #if defined(OS_POSIX) | 442 #if defined(OS_POSIX) |
443 int GpuChannel::TakeRendererFileDescriptor() { | 443 int GpuChannel::TakeRendererFileDescriptor() { |
444 if (!channel_.get()) { | 444 if (!channel_.get()) { |
445 NOTREACHED(); | 445 NOTREACHED(); |
446 return -1; | 446 return -1; |
447 } | 447 } |
448 return channel_->TakeClientFileDescriptor(); | 448 return channel_->TakeClientFileDescriptor(); |
449 } | 449 } |
450 #endif // defined(OS_POSIX) | 450 #endif // defined(OS_POSIX) |
OLD | NEW |