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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_thread_message_proxy.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/gpu/drm_thread_message_proxy.h" 5 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "ipc/ipc_message.h" 8 #include "ipc/ipc_message.h"
9 #include "ipc/ipc_sender.h" 9 #include "ipc/ipc_sender.h"
10 #include "ui/ozone/common/gpu/ozone_gpu_messages.h" 10 #include "ui/ozone/common/gpu/ozone_gpu_messages.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 IPC_MESSAGE_HANDLER(OzoneGpuMsg_DisableNativeDisplay, 47 IPC_MESSAGE_HANDLER(OzoneGpuMsg_DisableNativeDisplay,
48 OnDisableNativeDisplay) 48 OnDisableNativeDisplay)
49 IPC_MESSAGE_HANDLER(OzoneGpuMsg_TakeDisplayControl, OnTakeDisplayControl) 49 IPC_MESSAGE_HANDLER(OzoneGpuMsg_TakeDisplayControl, OnTakeDisplayControl)
50 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RelinquishDisplayControl, 50 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RelinquishDisplayControl,
51 OnRelinquishDisplayControl) 51 OnRelinquishDisplayControl)
52 IPC_MESSAGE_HANDLER(OzoneGpuMsg_AddGraphicsDevice, OnAddGraphicsDevice) 52 IPC_MESSAGE_HANDLER(OzoneGpuMsg_AddGraphicsDevice, OnAddGraphicsDevice)
53 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RemoveGraphicsDevice, 53 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RemoveGraphicsDevice,
54 OnRemoveGraphicsDevice) 54 OnRemoveGraphicsDevice)
55 IPC_MESSAGE_HANDLER(OzoneGpuMsg_GetHDCPState, OnGetHDCPState) 55 IPC_MESSAGE_HANDLER(OzoneGpuMsg_GetHDCPState, OnGetHDCPState)
56 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetHDCPState, OnSetHDCPState) 56 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetHDCPState, OnSetHDCPState)
57 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetGammaRamp, OnSetGammaRamp) 57 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetColorCorrection, OnSetColorCorrection)
58 IPC_MESSAGE_HANDLER(OzoneGpuMsg_CheckOverlayCapabilities, 58 IPC_MESSAGE_HANDLER(OzoneGpuMsg_CheckOverlayCapabilities,
59 OnCheckOverlayCapabilities) 59 OnCheckOverlayCapabilities)
60 IPC_MESSAGE_UNHANDLED(handled = false) 60 IPC_MESSAGE_UNHANDLED(handled = false)
61 IPC_END_MESSAGE_MAP() 61 IPC_END_MESSAGE_MAP()
62 62
63 return handled; 63 return handled;
64 } 64 }
65 65
66 void DrmThreadMessageProxy::OnCreateWindow(gfx::AcceleratedWidget widget) { 66 void DrmThreadMessageProxy::OnCreateWindow(gfx::AcceleratedWidget widget) {
67 DCHECK(drm_thread_->IsRunning()); 67 DCHECK(drm_thread_->IsRunning());
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 HDCPState state) { 205 HDCPState state) {
206 DCHECK(drm_thread_->IsRunning()); 206 DCHECK(drm_thread_->IsRunning());
207 auto callback = base::Bind(&DrmThreadMessageProxy::OnSetHDCPStateCallback, 207 auto callback = base::Bind(&DrmThreadMessageProxy::OnSetHDCPStateCallback,
208 weak_ptr_factory_.GetWeakPtr()); 208 weak_ptr_factory_.GetWeakPtr());
209 drm_thread_->task_runner()->PostTask( 209 drm_thread_->task_runner()->PostTask(
210 FROM_HERE, 210 FROM_HERE,
211 base::Bind(&DrmThread::SetHDCPState, base::Unretained(drm_thread_), 211 base::Bind(&DrmThread::SetHDCPState, base::Unretained(drm_thread_),
212 display_id, state, CreateSafeCallback(callback))); 212 display_id, state, CreateSafeCallback(callback)));
213 } 213 }
214 214
215 void DrmThreadMessageProxy::OnSetGammaRamp( 215 void DrmThreadMessageProxy::OnSetColorCorrection(
216 int64_t id, 216 int64_t id,
217 const std::vector<GammaRampRGBEntry>& lut) { 217 const std::vector<GammaRampRGBEntry>& degamma_lut,
218 const std::vector<GammaRampRGBEntry>& gamma_lut,
219 const std::vector<float>& correction_matrix) {
218 DCHECK(drm_thread_->IsRunning()); 220 DCHECK(drm_thread_->IsRunning());
219 drm_thread_->task_runner()->PostTask( 221 drm_thread_->task_runner()->PostTask(
220 FROM_HERE, base::Bind(&DrmThread::SetGammaRamp, 222 FROM_HERE,
221 base::Unretained(drm_thread_), id, lut)); 223 base::Bind(&DrmThread::SetColorCorrection, base::Unretained(drm_thread_),
224 id, degamma_lut, gamma_lut, correction_matrix));
222 } 225 }
223 226
224 void DrmThreadMessageProxy::OnCheckOverlayCapabilitiesCallback( 227 void DrmThreadMessageProxy::OnCheckOverlayCapabilitiesCallback(
225 gfx::AcceleratedWidget widget, 228 gfx::AcceleratedWidget widget,
226 const std::vector<OverlayCheck_Params>& overlays) const { 229 const std::vector<OverlayCheck_Params>& overlays) const {
227 sender_->Send(new OzoneHostMsg_OverlayCapabilitiesReceived(widget, overlays)); 230 sender_->Send(new OzoneHostMsg_OverlayCapabilitiesReceived(widget, overlays));
228 } 231 }
229 232
230 void DrmThreadMessageProxy::OnRefreshNativeDisplaysCallback( 233 void DrmThreadMessageProxy::OnRefreshNativeDisplaysCallback(
231 const std::vector<DisplaySnapshot_Params>& displays) const { 234 const std::vector<DisplaySnapshot_Params>& displays) const {
(...skipping 25 matching lines...) Expand all
257 HDCPState state) const { 260 HDCPState state) const {
258 sender_->Send(new OzoneHostMsg_HDCPStateReceived(display_id, success, state)); 261 sender_->Send(new OzoneHostMsg_HDCPStateReceived(display_id, success, state));
259 } 262 }
260 263
261 void DrmThreadMessageProxy::OnSetHDCPStateCallback(int64_t display_id, 264 void DrmThreadMessageProxy::OnSetHDCPStateCallback(int64_t display_id,
262 bool success) const { 265 bool success) const {
263 sender_->Send(new OzoneHostMsg_HDCPStateUpdated(display_id, success)); 266 sender_->Send(new OzoneHostMsg_HDCPStateUpdated(display_id, success));
264 } 267 }
265 268
266 } // namespace ui 269 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h ('k') | ui/ozone/platform/drm/gpu/mock_drm_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698