| 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/ozone/platform/drm/host/drm_native_display_delegate.h" | 5 #include "ui/ozone/platform/drm/host/drm_native_display_delegate.h" |
| 6 | 6 |
| 7 #include "ui/display/types/display_snapshot.h" | 7 #include "ui/display/types/display_snapshot.h" |
| 8 #include "ui/display/types/native_display_observer.h" | 8 #include "ui/display/types/native_display_observer.h" |
| 9 #include "ui/ozone/platform/drm/host/drm_display_host.h" | 9 #include "ui/ozone/platform/drm/host/drm_display_host.h" |
| 10 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h" | 10 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 bool DrmNativeDisplayDelegate::SetGammaRamp( | 105 bool DrmNativeDisplayDelegate::SetGammaRamp( |
| 106 const ui::DisplaySnapshot& output, | 106 const ui::DisplaySnapshot& output, |
| 107 const std::vector<GammaRampRGBEntry>& lut) { | 107 const std::vector<GammaRampRGBEntry>& lut) { |
| 108 DrmDisplayHost* display = display_manager_->GetDisplay(output.display_id()); | 108 DrmDisplayHost* display = display_manager_->GetDisplay(output.display_id()); |
| 109 display->SetGammaRamp(lut); | 109 display->SetGammaRamp(lut); |
| 110 return true; | 110 return true; |
| 111 } | 111 } |
| 112 | 112 |
| 113 bool DrmNativeDisplayDelegate::SetColorCorrection( |
| 114 const ui::DisplaySnapshot& output, |
| 115 const std::vector<GammaRampRGBEntry>& degamma_lut, |
| 116 const std::vector<GammaRampRGBEntry>& gamma_lut, |
| 117 const float correction_matrix[9]) { |
| 118 DrmDisplayHost* display = display_manager_->GetDisplay(output.display_id()); |
| 119 display->SetColorCorrection(degamma_lut, gamma_lut, correction_matrix); |
| 120 return true; |
| 121 } |
| 122 |
| 113 void DrmNativeDisplayDelegate::AddObserver(NativeDisplayObserver* observer) { | 123 void DrmNativeDisplayDelegate::AddObserver(NativeDisplayObserver* observer) { |
| 114 observers_.AddObserver(observer); | 124 observers_.AddObserver(observer); |
| 115 } | 125 } |
| 116 | 126 |
| 117 void DrmNativeDisplayDelegate::RemoveObserver(NativeDisplayObserver* observer) { | 127 void DrmNativeDisplayDelegate::RemoveObserver(NativeDisplayObserver* observer) { |
| 118 observers_.RemoveObserver(observer); | 128 observers_.RemoveObserver(observer); |
| 119 } | 129 } |
| 120 | 130 |
| 121 } // namespace ui | 131 } // namespace ui |
| OLD | NEW |