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

Unified Diff: ui/ozone/platform/drm/gpu/drm_gpu_display_manager.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: Refactor for glevin@ and load VCGT always Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
index 4a678d9a33bac99cfb9b7ae6b42641ccf42e7b05..cf00cbc08ed737a9e9d32b23587f364fe8a9cd82 100644
--- a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
+++ b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
@@ -192,6 +192,20 @@ void DrmGpuDisplayManager::SetGammaRamp(
display->SetGammaRamp(lut);
}
+void DrmGpuDisplayManager::SetColorCorrection(
+ int64_t display_id,
+ const std::vector<GammaRampRGBEntry>& degamma_lut,
+ const std::vector<GammaRampRGBEntry>& gamma_lut,
+ const float correction_matrix[9]) {
+ DrmDisplay* display = FindDisplay(display_id);
+ if (!display) {
+ LOG(ERROR) << "There is no display with ID " << display_id;
+ return;
+ }
+
+ display->SetColorCorrection(degamma_lut, gamma_lut, correction_matrix);
+}
+
DrmDisplay* DrmGpuDisplayManager::FindDisplay(int64_t display_id) {
for (DrmDisplay* display : displays_)
if (display->display_id() == display_id)

Powered by Google App Engine
This is Rietveld 408576698