GPU: Only allow the UI channel to preempt if all stubs are scheduled.

Necessary for uber-comp with --ui-prioritize-in-gpu-process. Currently will not affect preemption.

BUG=173650


Review URL: https://chromiumcodereview.appspot.com/12340118

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185445 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 550c174..7e53996 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -265,13 +265,6 @@
   Send(new IPC::Message(message));
 }
 
-void GpuCommandBufferStub::OnReschedule() {
-  if (!IsScheduled())
-    return;
-
-  channel_->OnScheduled();
-}
-
 bool GpuCommandBufferStub::MakeCurrent() {
   if (decoder_->MakeCurrent())
     return true;
@@ -485,8 +478,9 @@
                  base::Unretained(scheduler_.get())));
   command_buffer_->SetParseErrorCallback(
       base::Bind(&GpuCommandBufferStub::OnParseError, base::Unretained(this)));
-  scheduler_->SetScheduledCallback(
-      base::Bind(&GpuCommandBufferStub::OnReschedule, base::Unretained(this)));
+  scheduler_->SetSchedulingChangedCallback(
+      base::Bind(&GpuChannel::StubSchedulingChanged,
+                 base::Unretained(channel_)));
 
   if (watchdog_) {
     scheduler_->SetCommandProcessedCallback(