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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.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 | « 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);
165 } 164 }
166 return false; 165 return false;
167 } 166 }
168 167
169 void GpuCommandBufferStub::OnEcho(const IPC::Message& message) { 168 void GpuCommandBufferStub::OnEcho(const IPC::Message& message) {
170 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEcho"); 169 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEcho");
171 Send(new IPC::Message(message)); 170 Send(new IPC::Message(message));
172 } 171 }
173 172
174 void GpuCommandBufferStub::DelayEcho(IPC::Message* message) { 173 void GpuCommandBufferStub::DelayEcho(IPC::Message* message) {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 gfx::GLSurface::BUFFER_ALLOCATION_FRONT_AND_BACK); 630 gfx::GLSurface::BUFFER_ALLOCATION_FRONT_AND_BACK);
632 else if (allocation.suggest_have_frontbuffer) 631 else if (allocation.suggest_have_frontbuffer)
633 surface_->SetBufferAllocation( 632 surface_->SetBufferAllocation(
634 gfx::GLSurface::BUFFER_ALLOCATION_FRONT_ONLY); 633 gfx::GLSurface::BUFFER_ALLOCATION_FRONT_ONLY);
635 else 634 else
636 surface_->SetBufferAllocation( 635 surface_->SetBufferAllocation(
637 gfx::GLSurface::BUFFER_ALLOCATION_NONE); 636 gfx::GLSurface::BUFFER_ALLOCATION_NONE);
638 } 637 }
639 638
640 #endif // defined(ENABLE_GPU) 639 #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