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

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

Issue 12340118: GPU: Only allow the UI channel to preempt if all stubs are scheduled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 78739dca5fcf9b0899c97e2aeb15b59ec0cdc6bd..03f61a2cf4bae32e72e0886a264cc15f166e2915 100644
--- a/gpu/command_buffer/service/gpu_scheduler.cc
+++ b/gpu/command_buffer/service/gpu_scheduler.cc
@@ -156,8 +156,9 @@ void GpuScheduler::SetScheduled(bool scheduled) {
}
#endif
}
-
++unscheduled_count_;
+ if (!descheduled_callback_.is_null())
piman 2013/02/27 21:54:43 call this only if unscheduled_count_ is 1 (otherwi
jonathan.backer 2013/02/28 21:43:56 Done.
+ descheduled_callback_.Run();
}
}
@@ -175,6 +176,11 @@ void GpuScheduler::SetScheduledCallback(
scheduled_callback_ = scheduled_callback;
}
+void GpuScheduler::SetDescheduledCallback(
+ const base::Closure& descheduled_callback) {
+ descheduled_callback_ = descheduled_callback;
+}
+
Buffer GpuScheduler::GetSharedMemoryBuffer(int32 shm_id) {
return command_buffer_->GetTransferBuffer(shm_id);
}
« content/common/gpu/gpu_command_buffer_stub.cc ('K') | « gpu/command_buffer/service/gpu_scheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698