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

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

Issue 8586048: base::Bind() conversion for remaining GPU files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.h ('k') | gpu/demos/framework/window.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.cc
diff --git a/gpu/command_buffer/service/gpu_scheduler.cc b/gpu/command_buffer/service/gpu_scheduler.cc
index 653974c5c95172604f85745cd0ba9ec8d7cdda32..f37c1a04249b5ec633af764b6406fe1578e2ff77 100644
--- a/gpu/command_buffer/service/gpu_scheduler.cc
+++ b/gpu/command_buffer/service/gpu_scheduler.cc
@@ -5,7 +5,6 @@
#include "gpu/command_buffer/service/gpu_scheduler.h"
#include "base/bind.h"
-#include "base/callback.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/debug/trace_event.h"
@@ -111,8 +110,8 @@ void GpuScheduler::PutChanged() {
return;
}
- if (command_processed_callback_.get())
- command_processed_callback_->Run();
+ if (!command_processed_callback_.is_null())
+ command_processed_callback_.Run();
if (unscheduled_count_ > 0)
return;
@@ -127,8 +126,8 @@ void GpuScheduler::SetScheduled(bool scheduled) {
--unscheduled_count_;
DCHECK_GE(unscheduled_count_, 0);
- if (unscheduled_count_ == 0 && scheduled_callback_.get())
- scheduled_callback_->Run();
+ if (unscheduled_count_ == 0 && !scheduled_callback_.is_null())
+ scheduled_callback_.Run();
} else {
++unscheduled_count_;
}
@@ -138,8 +137,9 @@ bool GpuScheduler::IsScheduled() {
return unscheduled_count_ == 0;
}
-void GpuScheduler::SetScheduledCallback(Callback0::Type* scheduled_callback) {
- scheduled_callback_.reset(scheduled_callback);
+void GpuScheduler::SetScheduledCallback(
+ const base::Closure& scheduled_callback) {
+ scheduled_callback_ = scheduled_callback;
}
Buffer GpuScheduler::GetSharedMemoryBuffer(int32 shm_id) {
@@ -163,8 +163,8 @@ int32 GpuScheduler::GetGetOffset() {
}
void GpuScheduler::SetCommandProcessedCallback(
- Callback0::Type* callback) {
- command_processed_callback_.reset(callback);
+ const base::Closure& callback) {
+ command_processed_callback_ = callback;
}
void GpuScheduler::DeferToFence(base::Closure task) {
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.h ('k') | gpu/demos/framework/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698