| 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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 if (display->display_id() == display_id && | 815 if (display->display_id() == display_id && |
| 816 IsPhysicalDisplayType(display->type())) { | 816 IsPhysicalDisplayType(display->type())) { |
| 817 return native_display_delegate_->SetColorCalibrationProfile(*display, | 817 return native_display_delegate_->SetColorCalibrationProfile(*display, |
| 818 new_profile); | 818 new_profile); |
| 819 } | 819 } |
| 820 } | 820 } |
| 821 | 821 |
| 822 return false; | 822 return false; |
| 823 } | 823 } |
| 824 | 824 |
| 825 bool DisplayConfigurator::SetGammaRamp( | 825 bool DisplayConfigurator::SetColorCorrection( |
| 826 int64_t display_id, | 826 int64_t display_id, |
| 827 const std::vector<GammaRampRGBEntry>& lut) { | 827 const std::vector<GammaRampRGBEntry>& degamma_lut, |
| 828 const std::vector<GammaRampRGBEntry>& gamma_lut, |
| 829 const std::vector<float>& correction_matrix) { |
| 828 for (const DisplaySnapshot* display : cached_displays_) { | 830 for (const DisplaySnapshot* display : cached_displays_) { |
| 829 if (display->display_id() == display_id) | 831 if (display->display_id() == display_id) |
| 830 return native_display_delegate_->SetGammaRamp(*display, lut); | 832 return native_display_delegate_->SetColorCorrection( |
| 833 *display, degamma_lut, gamma_lut, correction_matrix); |
| 831 } | 834 } |
| 832 | 835 |
| 833 return false; | 836 return false; |
| 834 } | 837 } |
| 835 | 838 |
| 836 void DisplayConfigurator::PrepareForExit() { | 839 void DisplayConfigurator::PrepareForExit() { |
| 837 configure_display_ = false; | 840 configure_display_ = false; |
| 838 } | 841 } |
| 839 | 842 |
| 840 void DisplayConfigurator::SetDisplayPower( | 843 void DisplayConfigurator::SetDisplayPower( |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 | 1137 |
| 1135 int64_t max_display_id = 0; | 1138 int64_t max_display_id = 0; |
| 1136 for (const auto& display : virtual_display_snapshots_) | 1139 for (const auto& display : virtual_display_snapshots_) |
| 1137 max_display_id = std::max(max_display_id, display->display_id()); | 1140 max_display_id = std::max(max_display_id, display->display_id()); |
| 1138 last_virtual_display_id_ = max_display_id & 0xff; | 1141 last_virtual_display_id_ = max_display_id & 0xff; |
| 1139 | 1142 |
| 1140 return true; | 1143 return true; |
| 1141 } | 1144 } |
| 1142 | 1145 |
| 1143 } // namespace ui | 1146 } // namespace ui |
| OLD | NEW |