summaryrefslogtreecommitdiffstats
path: root/gpu/tools
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 21:31:31 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 21:31:31 +0000
commitec014b551605961ae07fb34e5059269b5c30f705 (patch)
treeda8ef27bc6081f287d5700ce3a7386f14cab1021 /gpu/tools
parentcece544af4834283b8f311bdccd7a7cee2d2b71d (diff)
downloadchromium_src-ec014b551605961ae07fb34e5059269b5c30f705.zip
chromium_src-ec014b551605961ae07fb34e5059269b5c30f705.tar.gz
chromium_src-ec014b551605961ae07fb34e5059269b5c30f705.tar.bz2
base::Bind() conversion for compositor_model_bench.
BUG=none TEST=make compositor_model_bench Review URL: http://codereview.chromium.org/8576003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110353 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/tools')
-rw-r--r--gpu/tools/compositor_model_bench/compositor_model_bench.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gpu/tools/compositor_model_bench/compositor_model_bench.cc b/gpu/tools/compositor_model_bench/compositor_model_bench.cc
index 12942b5..0196d9b 100644
--- a/gpu/tools/compositor_model_bench/compositor_model_bench.cc
+++ b/gpu/tools/compositor_model_bench/compositor_model_bench.cc
@@ -23,12 +23,12 @@
#include "base/at_exit.h"
#include "base/basictypes.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "base/task.h"
#include "base/time.h"
#include "gpu/tools/compositor_model_bench/render_model_utils.h"
@@ -65,7 +65,7 @@ class Simulator {
current_sim_(NULL),
output_path_(output_path),
seconds_per_test_(seconds_per_test),
- ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
display_(NULL),
window_(0),
gl_context_(NULL),
@@ -124,7 +124,8 @@ class Simulator {
LOG(INFO) << "Running " << sims_remaining_.size() << " simulations.";
loop.PostTask(FROM_HERE,
- method_factory_.NewRunnableMethod(&Simulator::ProcessEvents));
+ base::Bind(&Simulator::ProcessEvents,
+ weak_factory_.GetWeakPtr()));
loop.Run();
}
@@ -269,7 +270,7 @@ class Simulator {
MessageLoop::current()->PostTask(
FROM_HERE,
- method_factory_.NewRunnableMethod(&Simulator::UpdateLoop));
+ base::Bind(&Simulator::UpdateLoop, weak_factory_.GetWeakPtr()));
}
void DumpOutput() {
@@ -348,7 +349,7 @@ class Simulator {
// Amount of time to run each simulation
int seconds_per_test_;
// GUI data
- ScopedRunnableMethodFactory<Simulator> method_factory_;
+ base::WeakPtrFactory<Simulator> weak_factory_;
Display* display_;
Window window_;
GLXContext gl_context_;
@@ -403,4 +404,3 @@ int main(int argc, char* argv[]) {
return 0;
}
-