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

Side by Side Diff: gpu/command_buffer/service/gpu_scheduler.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gpu_scheduler.h" 5 #include "gpu/command_buffer/service/gpu_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 } 164 }
165 } 165 }
166 166
167 bool GpuScheduler::IsScheduled() { 167 bool GpuScheduler::IsScheduled() {
168 return unscheduled_count_ == 0; 168 return unscheduled_count_ == 0;
169 } 169 }
170 170
171 bool GpuScheduler::HasMoreWork() { 171 bool GpuScheduler::HasMoreWork() {
172 return !unschedule_fences_.empty() || 172 return !unschedule_fences_.empty() ||
173 (decoder_ && decoder_->ProcessPendingQueries()) || 173 (decoder_ && decoder_->ProcessPendingQueries(false)) ||
174 HasMoreIdleWork(); 174 HasMoreIdleWork();
175 } 175 }
176 176
177 void GpuScheduler::SetSchedulingChangedCallback( 177 void GpuScheduler::SetSchedulingChangedCallback(
178 const SchedulingChangedCallback& callback) { 178 const SchedulingChangedCallback& callback) {
179 scheduling_changed_callback_ = callback; 179 scheduling_changed_callback_ = callback;
180 } 180 }
181 181
182 scoped_refptr<Buffer> GpuScheduler::GetSharedMemoryBuffer(int32 shm_id) { 182 scoped_refptr<Buffer> GpuScheduler::GetSharedMemoryBuffer(int32 shm_id) {
183 return command_buffer_->GetTransferBuffer(shm_id); 183 return command_buffer_->GetTransferBuffer(shm_id);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 base::Closure task_) 301 base::Closure task_)
302 : fence(fence_), 302 : fence(fence_),
303 issue_time(base::Time::Now()), 303 issue_time(base::Time::Now()),
304 task(task_) { 304 task(task_) {
305 } 305 }
306 306
307 GpuScheduler::UnscheduleFence::~UnscheduleFence() { 307 GpuScheduler::UnscheduleFence::~UnscheduleFence() {
308 } 308 }
309 309
310 } // namespace gpu 310 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698