| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |