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

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

Issue 9814032: Revert 127855 - Revert 127835 - Make sure to add rescheduled message when we have unprocessed comma… (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 | « content/common/gpu/gpu_channel.cc ('k') | no next file » | 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(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return; 153 return;
154 } 154 }
155 } 155 }
156 if (scheduler_.get()) 156 if (scheduler_.get())
157 scheduler_->PollUnscheduleFences(); 157 scheduler_->PollUnscheduleFences();
158 } 158 }
159 159
160 bool GpuCommandBufferStub::HasUnprocessedCommands() { 160 bool GpuCommandBufferStub::HasUnprocessedCommands() {
161 if (command_buffer_.get()) { 161 if (command_buffer_.get()) {
162 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 162 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
163 return state.put_offset != state.get_offset; 163 return state.put_offset != state.get_offset &&
164 !gpu::error::IsError(state.error);
164 } 165 }
165 return false; 166 return false;
166 } 167 }
167 168
168 void GpuCommandBufferStub::OnEcho(const IPC::Message& message) { 169 void GpuCommandBufferStub::OnEcho(const IPC::Message& message) {
169 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEcho"); 170 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEcho");
170 Send(new IPC::Message(message)); 171 Send(new IPC::Message(message));
171 } 172 }
172 173
173 void GpuCommandBufferStub::DelayEcho(IPC::Message* message) { 174 void GpuCommandBufferStub::DelayEcho(IPC::Message* message) {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 gfx::GLSurface::BUFFER_ALLOCATION_FRONT_AND_BACK); 631 gfx::GLSurface::BUFFER_ALLOCATION_FRONT_AND_BACK);
631 else if (allocation.suggest_have_frontbuffer) 632 else if (allocation.suggest_have_frontbuffer)
632 surface_->SetBufferAllocation( 633 surface_->SetBufferAllocation(
633 gfx::GLSurface::BUFFER_ALLOCATION_FRONT_ONLY); 634 gfx::GLSurface::BUFFER_ALLOCATION_FRONT_ONLY);
634 else 635 else
635 surface_->SetBufferAllocation( 636 surface_->SetBufferAllocation(
636 gfx::GLSurface::BUFFER_ALLOCATION_NONE); 637 gfx::GLSurface::BUFFER_ALLOCATION_NONE);
637 } 638 }
638 639
639 #endif // defined(ENABLE_GPU) 640 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698