Chromium Code Reviews| Index: ui/display/chromeos/test/action_logger_util.cc |
| diff --git a/ui/display/chromeos/test/action_logger_util.cc b/ui/display/chromeos/test/action_logger_util.cc |
| index c798b48c06c468d051c42353bcd1389375188796..63128d7816c30cc9679914d44ae9cc548ad43c22 100644 |
| --- a/ui/display/chromeos/test/action_logger_util.cc |
| +++ b/ui/display/chromeos/test/action_logger_util.cc |
| @@ -5,6 +5,7 @@ |
| #include "ui/display/chromeos/test/action_logger_util.h" |
| #include "base/format_macros.h" |
| +#include "base/logging.h" |
| #include "base/strings/stringprintf.h" |
| #include "ui/display/types/display_mode.h" |
| #include "ui/display/types/display_snapshot.h" |
| @@ -52,6 +53,20 @@ std::string GetSetHDCPStateAction(const DisplaySnapshot& output, |
| output.display_id(), state); |
| } |
| +std::string SetGammaRampAction(const ui::DisplaySnapshot& output, |
| + const std::vector<uint16_t>& r, |
| + const std::vector<uint16_t>& g, |
| + const std::vector<uint16_t>& b) { |
| + DCHECK((r.size() == g.size()) && (g.size() == b.size())); |
|
oshima
2015/04/15 23:56:13
DCHECK_EQ(r.size(), g.size());
DCHECK_EQ(g.size(),
robert.bradford
2015/04/17 16:42:46
Done.
|
| + |
| + std::string table; |
| + for (unsigned int i = 0; i < r.size(); ++i) { |
|
oshima
2015/04/15 23:56:13
size_t
robert.bradford
2015/04/17 16:42:46
Done.
|
| + table += base::StringPrintf(",rgb[%d]=%04x%04x%04x", i, r[i], g[i], b[i]); |
| + } |
|
oshima
2015/04/15 23:56:13
ditto
robert.bradford
2015/04/17 16:42:46
Done.
|
| + return base::StringPrintf("set_gamma_ramp(id=%" PRId64 "%s)", |
| + output.display_id(), table.c_str()); |
| +} |
| + |
| std::string JoinActions(const char* action, ...) { |
| std::string actions; |