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

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

Issue 1348363003: content/gpu: Simplify stub scheduling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu_channel_stream
Patch Set: fix android compile error sigh Created 5 years, 3 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 | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 c8d382644554fb3a693e7906028efc3445b9feb9..11a6d31f941a39912a78432fa566233ea0d7dc7a 100644
--- a/gpu/command_buffer/service/gpu_scheduler.h
+++ b/gpu/command_buffer/service/gpu_scheduler.h
@@ -65,13 +65,10 @@ class GPU_EXPORT GpuScheduler
}
// Sets whether commands should be processed by this scheduler. Setting to
- // false unschedules. Setting to true reschedules. Whether or not the
- // scheduler is currently scheduled is "reference counted". Every call with
- // false must eventually be paired by a call with true.
- void SetScheduled(bool is_scheduled);
+ // false unschedules. Setting to true reschedules.
+ void SetScheduled(bool scheduled);
- // Returns whether the scheduler is currently able to process more commands.
- bool IsScheduled();
+ bool scheduled() const { return scheduled_; }
// Returns whether the scheduler needs to be polled again in the future to
// process pending queries.
@@ -109,10 +106,6 @@ class GPU_EXPORT GpuScheduler
}
private:
- // Artificially reschedule if the scheduler is still unscheduled after a
- // timeout.
- void RescheduleTimeOut();
-
bool IsPreempted();
// The GpuScheduler holds a weak reference to the CommandBuffer. The
@@ -133,12 +126,8 @@ class GPU_EXPORT GpuScheduler
// This should be an argument to the constructor.
scoped_ptr<CommandParser> parser_;
- // 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_;
+ // Whether the scheduler is currently able to process more commands.
+ bool scheduled_;
SchedulingChangedCallback scheduling_changed_callback_;
base::Closure descheduled_callback_;
@@ -148,10 +137,6 @@ class GPU_EXPORT GpuScheduler
scoped_refptr<PreemptionFlag> preemption_flag_;
bool was_preempted_;
- // A factory for outstanding rescheduling tasks that is invalidated whenever
- // the scheduler is rescheduled.
- base::WeakPtrFactory<GpuScheduler> reschedule_task_factory_;
-
DISALLOW_COPY_AND_ASSIGN(GpuScheduler);
};
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698