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

Unified Diff: gpu/tools/compositor_model_bench/compositor_model_bench.cc

Issue 2274213004: Remove calls to deprecated MessageLoop methods from gpu/. (Closed)
Patch Set: manual changes Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/tools/compositor_model_bench/compositor_model_bench.cc
diff --git a/gpu/tools/compositor_model_bench/compositor_model_bench.cc b/gpu/tools/compositor_model_bench/compositor_model_bench.cc
index 4b7042ab27767c2dc84f184ea553758abfe40da4..a90cff6d278b18010e04f266edaa52a392db6337 100644
--- a/gpu/tools/compositor_model_bench/compositor_model_bench.cc
+++ b/gpu/tools/compositor_model_bench/compositor_model_bench.cc
@@ -30,6 +30,7 @@
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
@@ -110,7 +111,6 @@ class Simulator {
}
base::AtExitManager at_exit;
- base::MessageLoop loop;
if (!InitX11() || !InitGLContext()) {
LOG(FATAL) << "Failed to set up GUI.";
}
@@ -119,10 +119,10 @@ class Simulator {
LOG(INFO) << "Running " << sims_remaining_.size() << " simulations.";
- loop.task_runner()->PostTask(
+ message_loop_.task_runner()->PostTask(
FROM_HERE,
base::Bind(&Simulator::ProcessEvents, weak_factory_.GetWeakPtr()));
- loop.Run();
+ run_loop_.Run();
}
void ProcessEvents() {
@@ -316,7 +316,7 @@ class Simulator {
if (sims_remaining_.empty()) {
DumpOutput();
- base::MessageLoop::current()->QuitWhenIdle();
+ run_loop_.QuitWhenIdle();
return false;
}
@@ -330,6 +330,9 @@ class Simulator {
current_sim_->Resize(window_width_, window_height_);
}
+ base::MessageLoop message_loop_;
+ base::RunLoop run_loop_;
+
// Simulation task list for this execution
std::unique_ptr<RenderModelSimulator> current_sim_;
queue<SimulationSpecification> sims_remaining_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698