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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 9583021: Only add rescheduled message when there are commands to reschedule. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 9222a69b2f4188cc5972081678370b6cd405b526..9861a651d344697cc89c3beac56b582c7dcc28da 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -142,6 +142,14 @@ bool GpuCommandBufferStub::HasMoreWork() {
return scheduler_.get() && scheduler_->HasMoreWork();
}
+bool GpuCommandBufferStub::HasUnprocessedCommands() {
+ if (command_buffer_.get()) {
+ gpu::CommandBuffer::State state = command_buffer_->GetLastState();
+ return state.put_offset != state.get_offset;
+ }
+ return false;
+}
+
void GpuCommandBufferStub::OnEcho(const IPC::Message& message) {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnEcho");
Send(new IPC::Message(message));
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698