summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gpu_scheduler.h
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-27 22:41:25 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-27 22:41:25 +0000
commit9d2942dce0c0f28570714665d7bc714a20712582 (patch)
treecc75f89c82bc3fc9b7deb88b01c917031538904d /gpu/command_buffer/service/gpu_scheduler.h
parentaeff803571b1bed52b2f5edcb033e56dfdb3b464 (diff)
downloadchromium_src-9d2942dce0c0f28570714665d7bc714a20712582.zip
chromium_src-9d2942dce0c0f28570714665d7bc714a20712582.tar.gz
chromium_src-9d2942dce0c0f28570714665d7bc714a20712582.tar.bz2
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
Diffstat (limited to 'gpu/command_buffer/service/gpu_scheduler.h')
-rw-r--r--gpu/command_buffer/service/gpu_scheduler.h12
1 files changed, 12 insertions, 0 deletions
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<GpuScheduler> 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 {