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->HasUnprocessedCommands()) { | 262 if (!stub->IsScheduled() && 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 444 |
445 #if defined(OS_POSIX) | 445 #if defined(OS_POSIX) |
446 int GpuChannel::TakeRendererFileDescriptor() { | 446 int GpuChannel::TakeRendererFileDescriptor() { |
447 if (!channel_.get()) { | 447 if (!channel_.get()) { |
448 NOTREACHED(); | 448 NOTREACHED(); |
449 return -1; | 449 return -1; |
450 } | 450 } |
451 return channel_->TakeClientFileDescriptor(); | 451 return channel_->TakeClientFileDescriptor(); |
452 } | 452 } |
453 #endif // defined(OS_POSIX) | 453 #endif // defined(OS_POSIX) |
OLD | NEW |