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

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

Issue 1315713007: gpu: Reduce GL context switches used to check pending queries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('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 b0b26303f716a27eb7837c291a6820897010fe2a..ef5b8e47d7b1b741b686ef7b07b7cf280c2f611f 100644
--- a/gpu/command_buffer/service/gpu_scheduler.h
+++ b/gpu/command_buffer/service/gpu_scheduler.h
@@ -73,8 +73,13 @@ class GPU_EXPORT GpuScheduler
// Returns whether the scheduler is currently able to process more commands.
bool IsScheduled();
- // Returns whether the scheduler needs to be polled again in the future.
- bool HasMoreWork();
+ // Returns whether the scheduler needs to be polled again in the future to
+ // process pending queries.
+ bool HasPendingQueries() const;
+
+ // Process pending queries and return. HasPendingQueries() can be used to
+ // determine if there's more pending queries after this has been called.
+ void ProcessPendingQueries();
typedef base::Callback<void(bool /* scheduled */)> SchedulingChangedCallback;
@@ -91,7 +96,12 @@ class GPU_EXPORT GpuScheduler
void SetCommandProcessedCallback(const base::Closure& callback);
- bool HasMoreIdleWork();
+ // Returns whether the scheduler needs to be polled again in the future to
+ // process idle work.
+ bool HasMoreIdleWork() const;
+
+ // Perform some idle work and return. HasMoreIdleWork() can be used to
+ // determine if there's more idle work do be done after this has been called.
void PerformIdleWork();
CommandParser* parser() const {
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698