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

Side by Side Diff: gpu/tools/compositor_model_bench/compositor_model_bench.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 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 // This tool is used to benchmark the render model used by the compositor 5 // This tool is used to benchmark the render model used by the compositor
6 6
7 // Most of this file is derived from the source of the tile_render_bench tool, 7 // Most of this file is derived from the source of the tile_render_bench tool,
8 // and has been changed to support running a sequence of independent 8 // and has been changed to support running a sequence of independent
9 // simulations for our different render models and test cases. 9 // simulations for our different render models and test cases.
10 10
(...skipping 12 matching lines...) Expand all
23 #include <vector> 23 #include <vector>
24 24
25 #include "base/at_exit.h" 25 #include "base/at_exit.h"
26 #include "base/bind.h" 26 #include "base/bind.h"
27 #include "base/command_line.h" 27 #include "base/command_line.h"
28 #include "base/files/file_enumerator.h" 28 #include "base/files/file_enumerator.h"
29 #include "base/files/file_path.h" 29 #include "base/files/file_path.h"
30 #include "base/files/file_util.h" 30 #include "base/files/file_util.h"
31 #include "base/location.h" 31 #include "base/location.h"
32 #include "base/message_loop/message_loop.h" 32 #include "base/message_loop/message_loop.h"
33 #include "base/run_loop.h"
33 #include "base/single_thread_task_runner.h" 34 #include "base/single_thread_task_runner.h"
34 #include "base/threading/thread_task_runner_handle.h" 35 #include "base/threading/thread_task_runner_handle.h"
35 #include "base/time/time.h" 36 #include "base/time/time.h"
36 #include "gpu/tools/compositor_model_bench/render_model_utils.h" 37 #include "gpu/tools/compositor_model_bench/render_model_utils.h"
37 #include "gpu/tools/compositor_model_bench/render_models.h" 38 #include "gpu/tools/compositor_model_bench/render_models.h"
38 #include "gpu/tools/compositor_model_bench/render_tree.h" 39 #include "gpu/tools/compositor_model_bench/render_tree.h"
39 #include "ui/gl/init/gl_factory.h" 40 #include "ui/gl/init/gl_factory.h"
40 41
41 using base::TimeTicks; 42 using base::TimeTicks;
42 using base::DirectoryExists; 43 using base::DirectoryExists;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 LOG(FATAL) << "Failed to set up GUI."; 116 LOG(FATAL) << "Failed to set up GUI.";
116 } 117 }
117 118
118 InitBuffers(); 119 InitBuffers();
119 120
120 LOG(INFO) << "Running " << sims_remaining_.size() << " simulations."; 121 LOG(INFO) << "Running " << sims_remaining_.size() << " simulations.";
121 122
122 loop.task_runner()->PostTask( 123 loop.task_runner()->PostTask(
123 FROM_HERE, 124 FROM_HERE,
124 base::Bind(&Simulator::ProcessEvents, weak_factory_.GetWeakPtr())); 125 base::Bind(&Simulator::ProcessEvents, weak_factory_.GetWeakPtr()));
125 loop.Run(); 126 base::RunLoop().Run();
126 } 127 }
127 128
128 void ProcessEvents() { 129 void ProcessEvents() {
129 // Consume all the X events. 130 // Consume all the X events.
130 while (XPending(display_)) { 131 while (XPending(display_)) {
131 XEvent e; 132 XEvent e;
132 XNextEvent(display_, &e); 133 XNextEvent(display_, &e);
133 switch (e.type) { 134 switch (e.type) {
134 case Expose: 135 case Expose:
135 UpdateLoop(); 136 UpdateLoop();
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 387 }
387 } else { 388 } else {
388 LOG(INFO) << "(input path is a file)"; 389 LOG(INFO) << "(input path is a file)";
389 sim.QueueTest(inPath); 390 sim.QueueTest(inPath);
390 } 391 }
391 392
392 sim.Run(); 393 sim.Run();
393 394
394 return 0; 395 return 0;
395 } 396 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698