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

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: Refactor for glevin@ and load VCGT always Created 5 years, 1 month 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 IPC_MESSAGE_HANDLER(OzoneGpuMsg_DisableNativeDisplay, 44 IPC_MESSAGE_HANDLER(OzoneGpuMsg_DisableNativeDisplay,
45 OnDisableNativeDisplay) 45 OnDisableNativeDisplay)
46 IPC_MESSAGE_HANDLER(OzoneGpuMsg_TakeDisplayControl, OnTakeDisplayControl) 46 IPC_MESSAGE_HANDLER(OzoneGpuMsg_TakeDisplayControl, OnTakeDisplayControl)
47 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RelinquishDisplayControl, 47 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RelinquishDisplayControl,
48 OnRelinquishDisplayControl) 48 OnRelinquishDisplayControl)
49 IPC_MESSAGE_HANDLER(OzoneGpuMsg_AddGraphicsDevice, OnAddGraphicsDevice) 49 IPC_MESSAGE_HANDLER(OzoneGpuMsg_AddGraphicsDevice, OnAddGraphicsDevice)
50 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RemoveGraphicsDevice, 50 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RemoveGraphicsDevice,
51 OnRemoveGraphicsDevice) 51 OnRemoveGraphicsDevice)
52 IPC_MESSAGE_HANDLER(OzoneGpuMsg_GetHDCPState, OnGetHDCPState) 52 IPC_MESSAGE_HANDLER(OzoneGpuMsg_GetHDCPState, OnGetHDCPState)
53 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetHDCPState, OnSetHDCPState) 53 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetHDCPState, OnSetHDCPState)
54 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetGammaRamp, OnSetGammaRamp); 54 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetGammaRamp, OnSetGammaRamp)
55 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetColorCorrection, OnSetColorCorrection)
55 IPC_MESSAGE_HANDLER(OzoneGpuMsg_CheckOverlayCapabilities, 56 IPC_MESSAGE_HANDLER(OzoneGpuMsg_CheckOverlayCapabilities,
56 OnCheckOverlayCapabilities) 57 OnCheckOverlayCapabilities)
57 IPC_MESSAGE_UNHANDLED(handled = false); 58 IPC_MESSAGE_UNHANDLED(handled = false);
58 IPC_END_MESSAGE_MAP() 59 IPC_END_MESSAGE_MAP()
59 60
60 return handled; 61 return handled;
61 } 62 }
62 63
63 void DrmThreadMessageProxy::OnCreateWindow(gfx::AcceleratedWidget widget) { 64 void DrmThreadMessageProxy::OnCreateWindow(gfx::AcceleratedWidget widget) {
64 DCHECK(drm_thread_->IsRunning()); 65 DCHECK(drm_thread_->IsRunning());
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 212
212 void DrmThreadMessageProxy::OnSetGammaRamp( 213 void DrmThreadMessageProxy::OnSetGammaRamp(
213 int64_t id, 214 int64_t id,
214 const std::vector<GammaRampRGBEntry>& lut) { 215 const std::vector<GammaRampRGBEntry>& lut) {
215 DCHECK(drm_thread_->IsRunning()); 216 DCHECK(drm_thread_->IsRunning());
216 drm_thread_->task_runner()->PostTask( 217 drm_thread_->task_runner()->PostTask(
217 FROM_HERE, base::Bind(&DrmThread::SetGammaRamp, 218 FROM_HERE, base::Bind(&DrmThread::SetGammaRamp,
218 base::Unretained(drm_thread_), id, lut)); 219 base::Unretained(drm_thread_), id, lut));
219 } 220 }
220 221
222 void DrmThreadMessageProxy::OnSetColorCorrection(
223 int64_t id,
224 const std::vector<GammaRampRGBEntry>& degamma_lut,
225 const std::vector<GammaRampRGBEntry>& gamma_lut,
226 const std::vector<float>& correction_matrix) {
227 DCHECK(drm_thread_->IsRunning());
228 drm_thread_->task_runner()->PostTask(
229 FROM_HERE,
230 base::Bind(&DrmThread::SetColorCorrection, base::Unretained(drm_thread_),
231 id, degamma_lut, gamma_lut, correction_matrix));
232 }
233
221 void DrmThreadMessageProxy::OnCheckOverlayCapabilitiesCallback( 234 void DrmThreadMessageProxy::OnCheckOverlayCapabilitiesCallback(
222 gfx::AcceleratedWidget widget, 235 gfx::AcceleratedWidget widget,
223 const std::vector<OverlayCheck_Params>& overlays) const { 236 const std::vector<OverlayCheck_Params>& overlays) const {
224 sender_->Send(new OzoneHostMsg_OverlayCapabilitiesReceived(widget, overlays)); 237 sender_->Send(new OzoneHostMsg_OverlayCapabilitiesReceived(widget, overlays));
225 } 238 }
226 239
227 void DrmThreadMessageProxy::OnRefreshNativeDisplaysCallback( 240 void DrmThreadMessageProxy::OnRefreshNativeDisplaysCallback(
228 const std::vector<DisplaySnapshot_Params>& displays) const { 241 const std::vector<DisplaySnapshot_Params>& displays) const {
229 sender_->Send(new OzoneHostMsg_UpdateNativeDisplays(displays)); 242 sender_->Send(new OzoneHostMsg_UpdateNativeDisplays(displays));
230 } 243 }
(...skipping 23 matching lines...) Expand all
254 HDCPState state) const { 267 HDCPState state) const {
255 sender_->Send(new OzoneHostMsg_HDCPStateReceived(display_id, success, state)); 268 sender_->Send(new OzoneHostMsg_HDCPStateReceived(display_id, success, state));
256 } 269 }
257 270
258 void DrmThreadMessageProxy::OnSetHDCPStateCallback(int64_t display_id, 271 void DrmThreadMessageProxy::OnSetHDCPStateCallback(int64_t display_id,
259 bool success) const { 272 bool success) const {
260 sender_->Send(new OzoneHostMsg_HDCPStateUpdated(display_id, success)); 273 sender_->Send(new OzoneHostMsg_HDCPStateUpdated(display_id, success));
261 } 274 }
262 275
263 } // namespace ui 276 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698