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

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: Rebase after quirks changes Created 4 years, 8 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/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
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_->GpuSetColorCorrection(snapshot_->display_id(), degamma_lut,
109 gamma_lut, 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
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_display_host.h ('k') | ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698