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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_display.cc

Issue 1945353004: Revert of ash: reset color management when new screens are hotplugged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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 "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/display/types/gamma_ramp_rgb_entry.h" 10 #include "ui/display/types/gamma_ramp_rgb_entry.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 return drm_->SetProperty( 168 return drm_->SetProperty(
169 connector_, hdcp_property->prop_id, 169 connector_, hdcp_property->prop_id,
170 GetContentProtectionValue(hdcp_property.get(), state)); 170 GetContentProtectionValue(hdcp_property.get(), state));
171 } 171 }
172 172
173 void DrmDisplay::SetColorCorrection( 173 void DrmDisplay::SetColorCorrection(
174 const std::vector<GammaRampRGBEntry>& degamma_lut, 174 const std::vector<GammaRampRGBEntry>& degamma_lut,
175 const std::vector<GammaRampRGBEntry>& gamma_lut, 175 const std::vector<GammaRampRGBEntry>& gamma_lut,
176 const std::vector<float>& correction_matrix) { 176 const std::vector<float>& correction_matrix) {
177 if (!drm_->SetColorCorrection(crtc_, degamma_lut, gamma_lut, 177 if (degamma_lut.empty()) {
178 correction_matrix)) { 178 if (!drm_->SetGammaRamp(crtc_, gamma_lut)) {
179 LOG(ERROR) << "Failed to set color correction for display: crtc_id = " 179 LOG(ERROR) << "Failed to set gamma ramp for display: crtc_id = " << crtc_
180 << crtc_; 180 << " size = " << gamma_lut.size();
181 }
182 } else {
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 }
181 } 188 }
182 } 189 }
183 190
184 } // namespace ui 191 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.cc ('k') | ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698