OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/display/chromeos/display_configurator.h" | 5 #include "ui/display/chromeos/display_configurator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 if (display->display_id() == display_id && | 816 if (display->display_id() == display_id && |
817 IsPhysicalDisplayType(display->type())) { | 817 IsPhysicalDisplayType(display->type())) { |
818 return native_display_delegate_->SetColorCalibrationProfile(*display, | 818 return native_display_delegate_->SetColorCalibrationProfile(*display, |
819 new_profile); | 819 new_profile); |
820 } | 820 } |
821 } | 821 } |
822 | 822 |
823 return false; | 823 return false; |
824 } | 824 } |
825 | 825 |
826 bool DisplayConfigurator::SetGammaRamp( | 826 bool DisplayConfigurator::SetColorCorrection( |
827 int64_t display_id, | 827 int64_t display_id, |
828 const std::vector<GammaRampRGBEntry>& lut) { | 828 const std::vector<GammaRampRGBEntry>& degamma_lut, |
| 829 const std::vector<GammaRampRGBEntry>& gamma_lut, |
| 830 const std::vector<float>& correction_matrix) { |
829 for (const DisplaySnapshot* display : cached_displays_) { | 831 for (const DisplaySnapshot* display : cached_displays_) { |
830 if (display->display_id() == display_id) | 832 if (display->display_id() == display_id) |
831 return native_display_delegate_->SetGammaRamp(*display, lut); | 833 return native_display_delegate_->SetColorCorrection( |
| 834 *display, degamma_lut, gamma_lut, correction_matrix); |
832 } | 835 } |
833 | 836 |
834 return false; | 837 return false; |
835 } | 838 } |
836 | 839 |
837 void DisplayConfigurator::PrepareForExit() { | 840 void DisplayConfigurator::PrepareForExit() { |
838 configure_display_ = false; | 841 configure_display_ = false; |
839 } | 842 } |
840 | 843 |
841 void DisplayConfigurator::SetDisplayPower( | 844 void DisplayConfigurator::SetDisplayPower( |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 last_virtual_display_id_ = max_display_id & 0xff; | 1151 last_virtual_display_id_ = max_display_id & 0xff; |
1149 | 1152 |
1150 return true; | 1153 return true; |
1151 } | 1154 } |
1152 | 1155 |
1153 bool DisplayConfigurator::IsDisplayOn() const { | 1156 bool DisplayConfigurator::IsDisplayOn() const { |
1154 return current_power_state_ != chromeos::DISPLAY_POWER_ALL_OFF; | 1157 return current_power_state_ != chromeos::DISPLAY_POWER_ALL_OFF; |
1155 } | 1158 } |
1156 | 1159 |
1157 } // namespace ui | 1160 } // namespace ui |
OLD | NEW |