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

Side by Side Diff: ui/ozone/platform/drm/host/drm_display_host.cc

Issue 1182063002: Add support for more advanced color correction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@qcms-fixed-point-gamma
Patch Set: Port to new kernel API, integrate review feedback. Created 4 years, 10 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/host/drm_display_host.h" 5 #include "ui/ozone/platform/drm/host/drm_display_host.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "ui/ozone/common/display_snapshot_proxy.h" 8 #include "ui/ozone/common/display_snapshot_proxy.h"
9 #include "ui/ozone/common/display_util.h" 9 #include "ui/ozone/common/display_util.h"
10 #include "ui/ozone/common/gpu/ozone_gpu_messages.h" 10 #include "ui/ozone/common/gpu/ozone_gpu_messages.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 base::ThreadTaskRunnerHandle::Get()->PostTask( 96 base::ThreadTaskRunnerHandle::Get()->PostTask(
97 FROM_HERE, base::Bind(set_hdcp_callback_, status)); 97 FROM_HERE, base::Bind(set_hdcp_callback_, status));
98 } else { 98 } else {
99 LOG(ERROR) << "Got unexpected event for display " 99 LOG(ERROR) << "Got unexpected event for display "
100 << snapshot_->display_id(); 100 << snapshot_->display_id();
101 } 101 }
102 102
103 set_hdcp_callback_.Reset(); 103 set_hdcp_callback_.Reset();
104 } 104 }
105 105
106 void DrmDisplayHost::SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut) { 106 void DrmDisplayHost::SetColorCorrection(
107 sender_->Send(new OzoneGpuMsg_SetGammaRamp(snapshot_->display_id(), lut)); 107 const std::vector<GammaRampRGBEntry>& degamma_lut,
108 const std::vector<GammaRampRGBEntry>& gamma_lut,
109 const std::vector<float>& correction_matrix) {
110 sender_->Send(new OzoneGpuMsg_SetColorCorrection(
111 snapshot_->display_id(), degamma_lut, gamma_lut, correction_matrix));
108 } 112 }
109 113
110 void DrmDisplayHost::OnGpuThreadReady() { 114 void DrmDisplayHost::OnGpuThreadReady() {
111 is_dummy_ = false; 115 is_dummy_ = false;
112 116
113 // Note: These responses are done here since the OnChannelDestroyed() is 117 // Note: These responses are done here since the OnChannelDestroyed() is
114 // called after OnChannelEstablished(). 118 // called after OnChannelEstablished().
115 ClearCallbacks(); 119 ClearCallbacks();
116 } 120 }
117 121
118 void DrmDisplayHost::OnGpuThreadRetired() {} 122 void DrmDisplayHost::OnGpuThreadRetired() {}
119 123
120 void DrmDisplayHost::ClearCallbacks() { 124 void DrmDisplayHost::ClearCallbacks() {
121 if (!configure_callback_.is_null()) 125 if (!configure_callback_.is_null())
122 OnDisplayConfigured(false); 126 OnDisplayConfigured(false);
123 if (!get_hdcp_callback_.is_null()) 127 if (!get_hdcp_callback_.is_null())
124 OnHDCPStateReceived(false, HDCP_STATE_UNDESIRED); 128 OnHDCPStateReceived(false, HDCP_STATE_UNDESIRED);
125 if (!set_hdcp_callback_.is_null()) 129 if (!set_hdcp_callback_.is_null())
126 OnHDCPStateUpdated(false); 130 OnHDCPStateUpdated(false);
127 } 131 }
128 132
129 } // namespace ui 133 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698