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

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

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/gpu_scheduler.h ('k') | gpu/command_buffer/service/in_process_command_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_scheduler.cc
diff --git a/gpu/command_buffer/service/gpu_scheduler.cc b/gpu/command_buffer/service/gpu_scheduler.cc
index 2a15dc76f9c06d14914f5b2470a5c758f8eeeb4e..a8596195cdf5a8fa09965cd40a1fac4baaa6f644 100644
--- a/gpu/command_buffer/service/gpu_scheduler.cc
+++ b/gpu/command_buffer/service/gpu_scheduler.cc
@@ -161,9 +161,14 @@ bool GpuScheduler::IsScheduled() {
return unscheduled_count_ == 0;
}
-bool GpuScheduler::HasMoreWork() {
- return (decoder_ && decoder_->ProcessPendingQueries(false)) ||
- HasMoreIdleWork();
+bool GpuScheduler::HasPendingQueries() const {
+ return (decoder_ && decoder_->HasPendingQueries());
+}
+
+void GpuScheduler::ProcessPendingQueries() {
+ if (!decoder_)
+ return;
+ decoder_->ProcessPendingQueries(false);
}
void GpuScheduler::SetSchedulingChangedCallback(
@@ -229,7 +234,7 @@ bool GpuScheduler::IsPreempted() {
return preemption_flag_->IsSet();
}
-bool GpuScheduler::HasMoreIdleWork() {
+bool GpuScheduler::HasMoreIdleWork() const {
return (decoder_ && decoder_->HasMoreIdleWork());
}
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.h ('k') | gpu/command_buffer/service/in_process_command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698