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/host/drm_display_host.h" | 5 #include "ui/ozone/platform/drm/host/drm_display_host.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "ui/ozone/common/display_snapshot_proxy.h" | 9 #include "ui/ozone/common/display_snapshot_proxy.h" |
10 #include "ui/ozone/common/display_util.h" | 10 #include "ui/ozone/common/display_util.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 base::ThreadTaskRunnerHandle::Get()->PostTask( | 94 base::ThreadTaskRunnerHandle::Get()->PostTask( |
95 FROM_HERE, base::Bind(set_hdcp_callback_, status)); | 95 FROM_HERE, base::Bind(set_hdcp_callback_, status)); |
96 } else { | 96 } else { |
97 LOG(ERROR) << "Got unexpected event for display " | 97 LOG(ERROR) << "Got unexpected event for display " |
98 << snapshot_->display_id(); | 98 << snapshot_->display_id(); |
99 } | 99 } |
100 | 100 |
101 set_hdcp_callback_.Reset(); | 101 set_hdcp_callback_.Reset(); |
102 } | 102 } |
103 | 103 |
104 void DrmDisplayHost::SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut) { | 104 void DrmDisplayHost::SetColorCorrection( |
105 sender_->GpuSetGammaRamp(snapshot_->display_id(), lut); | 105 const std::vector<GammaRampRGBEntry>& degamma_lut, |
| 106 const std::vector<GammaRampRGBEntry>& gamma_lut, |
| 107 const std::vector<float>& correction_matrix) { |
| 108 sender_->SetColorCorrection(snapshot_->display_id(), degamma_lut, gamma_lut, |
| 109 correction_matrix); |
106 } | 110 } |
107 | 111 |
108 void DrmDisplayHost::OnGpuThreadReady() { | 112 void DrmDisplayHost::OnGpuThreadReady() { |
109 is_dummy_ = false; | 113 is_dummy_ = false; |
110 | 114 |
111 // Note: These responses are done here since the OnChannelDestroyed() is | 115 // Note: These responses are done here since the OnChannelDestroyed() is |
112 // called after OnChannelEstablished(). | 116 // called after OnChannelEstablished(). |
113 ClearCallbacks(); | 117 ClearCallbacks(); |
114 } | 118 } |
115 | 119 |
116 void DrmDisplayHost::OnGpuThreadRetired() {} | 120 void DrmDisplayHost::OnGpuThreadRetired() {} |
117 | 121 |
118 void DrmDisplayHost::ClearCallbacks() { | 122 void DrmDisplayHost::ClearCallbacks() { |
119 if (!configure_callback_.is_null()) | 123 if (!configure_callback_.is_null()) |
120 OnDisplayConfigured(false); | 124 OnDisplayConfigured(false); |
121 if (!get_hdcp_callback_.is_null()) | 125 if (!get_hdcp_callback_.is_null()) |
122 OnHDCPStateReceived(false, HDCP_STATE_UNDESIRED); | 126 OnHDCPStateReceived(false, HDCP_STATE_UNDESIRED); |
123 if (!set_hdcp_callback_.is_null()) | 127 if (!set_hdcp_callback_.is_null()) |
124 OnHDCPStateUpdated(false); | 128 OnHDCPStateUpdated(false); |
125 } | 129 } |
126 | 130 |
127 } // namespace ui | 131 } // namespace ui |
OLD | NEW |