| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // Implementation of a client that produces output in the form of RGBA | 5 // Implementation of a client that produces output in the form of RGBA |
| 6 // buffers when receiving pointer/touch events. RGB contains the lower | 6 // buffers when receiving pointer/touch events. RGB contains the lower |
| 7 // 24 bits of the event timestamp and A is 0xff. | 7 // 24 bits of the event timestamp and A is 0xff. |
| 8 | 8 |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <linux-dmabuf-unstable-v1-client-protocol.h> | 10 #include <linux-dmabuf-unstable-v1-client-protocol.h> |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 (!base::StringToSizeT( | 862 (!base::StringToSizeT( |
| 863 command_line->GetSwitchValueASCII(switches::kBenchmark), | 863 command_line->GetSwitchValueASCII(switches::kBenchmark), |
| 864 &num_benchmark_runs))) { | 864 &num_benchmark_runs))) { |
| 865 LOG(ERROR) << "Invalid value for " << switches::kBenchmark; | 865 LOG(ERROR) << "Invalid value for " << switches::kBenchmark; |
| 866 return 1; | 866 return 1; |
| 867 } | 867 } |
| 868 | 868 |
| 869 size_t benchmark_interval_ms = 5000; // 5 seconds. | 869 size_t benchmark_interval_ms = 5000; // 5 seconds. |
| 870 if (command_line->HasSwitch(switches::kBenchmarkInterval) && | 870 if (command_line->HasSwitch(switches::kBenchmarkInterval) && |
| 871 (!base::StringToSizeT( | 871 (!base::StringToSizeT( |
| 872 command_line->GetSwitchValueASCII(switches::kBenchmark), | 872 command_line->GetSwitchValueASCII(switches::kBenchmarkInterval), |
| 873 &benchmark_interval_ms))) { | 873 &benchmark_interval_ms))) { |
| 874 LOG(ERROR) << "Invalid value for " << switches::kBenchmark; | 874 LOG(ERROR) << "Invalid value for " << switches::kBenchmarkInterval; |
| 875 return 1; | 875 return 1; |
| 876 } | 876 } |
| 877 | 877 |
| 878 std::unique_ptr<std::string> use_drm; | 878 std::unique_ptr<std::string> use_drm; |
| 879 if (command_line->HasSwitch(switches::kUseDrm)) { | 879 if (command_line->HasSwitch(switches::kUseDrm)) { |
| 880 use_drm.reset( | 880 use_drm.reset( |
| 881 new std::string(command_line->GetSwitchValueASCII(switches::kUseDrm))); | 881 new std::string(command_line->GetSwitchValueASCII(switches::kUseDrm))); |
| 882 } | 882 } |
| 883 | 883 |
| 884 exo::wayland::clients::MotionEvents client( | 884 exo::wayland::clients::MotionEvents client( |
| 885 width, height, scale, num_rects, max_frames_pending, | 885 width, height, scale, num_rects, max_frames_pending, |
| 886 command_line->HasSwitch(switches::kFullscreen), | 886 command_line->HasSwitch(switches::kFullscreen), |
| 887 command_line->HasSwitch(switches::kShowFpsCounter), num_benchmark_runs, | 887 command_line->HasSwitch(switches::kShowFpsCounter), num_benchmark_runs, |
| 888 base::TimeDelta::FromMilliseconds(benchmark_interval_ms), use_drm.get()); | 888 base::TimeDelta::FromMilliseconds(benchmark_interval_ms), use_drm.get()); |
| 889 return client.Run(); | 889 return client.Run(); |
| 890 } | 890 } |
| OLD | NEW |