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

Unified Diff: ui/display/chromeos/test/action_logger_util.cc

Issue 1028563003: Load and apply a vcgt table from an ICC file to the internal display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix oshima@ feedback Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
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..7a4af91d91ca04dc9df7329b7e836901dc18efa7 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,21 @@ 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)
oshima 2015/04/21 19:49:44 nit: you need {} this case.
robert.bradford 2015/04/27 13:49:33 Done.
+ 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;

Powered by Google App Engine
This is Rietveld 408576698