| 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..526580aeffdf97954235dac11088e8a1e7439703 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,23 @@ 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_EQ(r.size(), g.size());
|
| + DCHECK_EQ(g.size(), b.size());
|
| +
|
| + std::string table;
|
| + for (size_t i = 0; i < r.size(); ++i) {
|
| + table += base::StringPrintf(",rgb[%" PRIuS "]=%04x%04x%04x", i, r[i], g[i],
|
| + b[i]);
|
| + }
|
| +
|
| + return base::StringPrintf("set_gamma_ramp(id=%" PRId64 "%s)",
|
| + output.display_id(), table.c_str());
|
| +}
|
| +
|
| std::string JoinActions(const char* action, ...) {
|
| std::string actions;
|
|
|
|
|