From 9d2942dce0c0f28570714665d7bc714a20712582 Mon Sep 17 00:00:00 2001 From: "apatrick@chromium.org" Date: Fri, 27 Jan 2012 22:41:25 +0000 Subject: Force the GPU process to reschedule itself after a timeout so it responds to IPCs. BUG=111514 Review URL: https://chromiumcodereview.appspot.com/9295021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119504 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/command_buffer/service/gpu_scheduler.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gpu/command_buffer/service/gpu_scheduler.h') diff --git a/gpu/command_buffer/service/gpu_scheduler.h b/gpu/command_buffer/service/gpu_scheduler.h index 46afc60..7a7bdff 100644 --- a/gpu/command_buffer/service/gpu_scheduler.h +++ b/gpu/command_buffer/service/gpu_scheduler.h @@ -75,6 +75,10 @@ class GpuScheduler // by them and returns whether all fences were complete. bool PollUnscheduleFences(); + // Artificially reschedule if the scheduler is still unscheduled after a + // timeout. + void RescheduleTimeOut(); + // The GpuScheduler holds a weak reference to the CommandBuffer. The // CommandBuffer owns the GpuScheduler and holds a strong reference to it // through the ProcessCommands callback. @@ -96,6 +100,14 @@ class GpuScheduler // Greater than zero if this is waiting to be rescheduled before continuing. int unscheduled_count_; + // The number of times this scheduler has been artificially rescheduled on + // account of a timeout. + int rescheduled_count_; + + // A factory for outstanding rescheduling tasks that is invalidated whenever + // the scheduler is rescheduled. + base::WeakPtrFactory reschedule_task_factory_; + // The GpuScheduler will unschedule itself in the event that further GL calls // are issued to it before all these fences have been crossed by the GPU. struct UnscheduleFence { -- cgit v1.1