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

Side by Side Diff: components/exo/wayland/clients/motion_events.cc

Issue 2512033004: exo: Fix benchmark-interval flag in motion events client. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« 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