Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 9768008: Revert 127835 - Make sure to add rescheduled message when we have unprocessed commands and there's … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698