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

Unified Diff: gpu/command_buffer/service/gpu_scheduler.cc

Issue 6883179: Rework FlushSync to return early if commands have been processed since the last update (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 9 years, 8 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 | « gpu/command_buffer/service/gpu_scheduler.h ('k') | gpu/command_buffer/service/gpu_scheduler_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_scheduler.cc
diff --git a/gpu/command_buffer/service/gpu_scheduler.cc b/gpu/command_buffer/service/gpu_scheduler.cc
index be47663512c2c7d79af0f2980cb89def1911fccc..c1b7aaa30d45b03eb5db7c72c24fd3631191dba9 100644
--- a/gpu/command_buffer/service/gpu_scheduler.cc
+++ b/gpu/command_buffer/service/gpu_scheduler.cc
@@ -117,6 +117,16 @@ const unsigned int kMaxOutstandingSwapBuffersCallsPerOnscreenContext = 1;
}
#endif
+void GpuScheduler::PutChanged(bool sync) {
+ CommandBuffer::State state = command_buffer_->GetState();
+ parser_->set_put(state.put_offset);
+
+ if (sync)
+ ProcessCommands();
+ else
+ ScheduleProcessCommands();
+}
+
void GpuScheduler::ProcessCommands() {
GPU_TRACE_EVENT0("gpu", "GpuScheduler:ProcessCommands");
CommandBuffer::State state = command_buffer_->GetState();
@@ -134,8 +144,6 @@ void GpuScheduler::ProcessCommands() {
}
}
- parser_->set_put(state.put_offset);
-
#if defined(OS_MACOSX)
bool do_rate_limiting = surface_.get() != NULL;
// Don't swamp the browser process with SwapBuffers calls it can't handle.
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.h ('k') | gpu/command_buffer/service/gpu_scheduler_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698