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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_display.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/drm/gpu/drm_display.h" 5 #include "ui/ozone/platform/drm/gpu/drm_display.h"
6 6
7 #include <xf86drmMode.h> 7 #include <xf86drmMode.h>
8 8
9 #include "ui/display/types/gamma_ramp_rgb_entry.h" 9 #include "ui/display/types/gamma_ramp_rgb_entry.h"
10 #include "ui/ozone/platform/drm/common/drm_util.h" 10 #include "ui/ozone/platform/drm/common/drm_util.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 GetContentProtectionValue(hdcp_property.get(), state)); 169 GetContentProtectionValue(hdcp_property.get(), state));
170 } 170 }
171 171
172 void DrmDisplay::SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut) { 172 void DrmDisplay::SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut) {
173 if (!drm_->SetGammaRamp(crtc_, lut)) { 173 if (!drm_->SetGammaRamp(crtc_, lut)) {
174 LOG(ERROR) << "Failed to set gamma ramp for display: crtc_id = " << crtc_ 174 LOG(ERROR) << "Failed to set gamma ramp for display: crtc_id = " << crtc_
175 << " size = " << lut.size(); 175 << " size = " << lut.size();
176 } 176 }
177 } 177 }
178 178
179 void DrmDisplay::SetColorCorrection(
180 const std::vector<GammaRampRGBEntry>& degamma_lut,
181 const std::vector<GammaRampRGBEntry>& gamma_lut,
182 const float correction_matrix[9]) {
183 if (!drm_->SetColorCorrection(crtc_, degamma_lut, gamma_lut,
184 correction_matrix)) {
185 LOG(ERROR) << "Failed to set color correction for display: crtc_id = "
186 << crtc_;
187 }
188 }
189
179 } // namespace ui 190 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698