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

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

Issue 7260008: Implement proper synchronization between HW video decode IPC and CommandBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 6 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/gpu.gyp » ('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 a67fd3a9a6fae603d5a9de7812cb051b951039ad..1ff60d49b305c4a604656a20aed4d2dc7b350642 100644
--- a/gpu/command_buffer/service/gpu_scheduler.cc
+++ b/gpu/command_buffer/service/gpu_scheduler.cc
@@ -273,6 +273,8 @@ Buffer GpuScheduler::GetSharedMemoryBuffer(int32 shm_id) {
void GpuScheduler::set_token(int32 token) {
command_buffer_->SetToken(token);
+ if (!set_token_callback_.is_null())
+ set_token_callback_.Run(token);
}
bool GpuScheduler::SetGetOffset(int32 offset) {
@@ -311,6 +313,12 @@ void GpuScheduler::SetCommandProcessedCallback(
command_processed_callback_.reset(callback);
}
+void GpuScheduler::SetTokenCallback(
+ const base::Callback<void(int32)>& callback) {
+ DCHECK(set_token_callback_.is_null());
+ set_token_callback_ = callback;
+}
+
void GpuScheduler::ScheduleProcessCommands() {
MessageLoop::current()->PostTask(
FROM_HERE,
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.h ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698