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

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

Issue 1182063002: Add support for more advanced color correction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@qcms-fixed-point-gamma
Patch Set: Rebase after quirks changes Created 4 years, 9 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
« no previous file with comments | « ui/display/chromeos/test/action_logger_util.h ('k') | ui/display/chromeos/test/test_display_snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e3e9385a33e547dc098bf36ee5be0e3442bf380..ebd9ef84d09618da2a821603a103b45fd33c98fb 100644
--- a/ui/display/chromeos/test/action_logger_util.cc
+++ b/ui/display/chromeos/test/action_logger_util.cc
@@ -57,16 +57,32 @@ std::string GetSetHDCPStateAction(const DisplaySnapshot& output,
output.display_id(), state);
}
-std::string SetGammaRampAction(const ui::DisplaySnapshot& output,
- const std::vector<GammaRampRGBEntry>& lut) {
- std::string table;
- for (size_t i = 0; i < lut.size(); ++i) {
- table += base::StringPrintf(",rgb[%" PRIuS "]=%04x%04x%04x", i, lut[i].r,
- lut[i].g, lut[i].b);
+std::string SetColorCorrectionAction(
+ const ui::DisplaySnapshot& output,
+ const std::vector<GammaRampRGBEntry>& degamma_lut,
+ const std::vector<GammaRampRGBEntry>& gamma_lut,
+ const std::vector<float>& correction_matrix) {
+ std::string degamma_table;
+ for (size_t i = 0; i < degamma_lut.size(); ++i) {
+ degamma_table += base::StringPrintf(",degamma[%" PRIuS "]=%04x%04x%04x", i,
+ degamma_lut[i].r, degamma_lut[i].g,
+ degamma_lut[i].b);
+ }
+ std::string gamma_table;
+ for (size_t i = 0; i < gamma_lut.size(); ++i) {
+ gamma_table +=
+ base::StringPrintf(",gamma[%" PRIuS "]=%04x%04x%04x", i, gamma_lut[i].r,
+ gamma_lut[i].g, gamma_lut[i].b);
+ }
+
+ std::string ctm;
+ for (size_t i = 0; i < correction_matrix.size(); ++i) {
+ ctm += base::StringPrintf(",ctm[%" PRIuS "]=%f", i, correction_matrix[i]);
}
- return base::StringPrintf("set_gamma_ramp(id=%" PRId64 "%s)",
- output.display_id(), table.c_str());
+ return base::StringPrintf("set_color_correction(id=%" PRId64 "%s%s%s)",
+ output.display_id(), degamma_table.c_str(),
+ gamma_table.c_str(), ctm.c_str());
}
std::string JoinActions(const char* action, ...) {
« no previous file with comments | « ui/display/chromeos/test/action_logger_util.h ('k') | ui/display/chromeos/test/test_display_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698