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

Side by Side Diff: ui/ozone/platform/drm/mus_thread_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
« no previous file with comments | « ui/ozone/platform/drm/mus_thread_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus_thread_proxy.h" 5 #include "ui/ozone/platform/drm/mus_thread_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/task_runner.h" 9 #include "base/task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 DCHECK(drm_thread_->IsRunning()); 267 DCHECK(drm_thread_->IsRunning());
268 auto callback = base::Bind(&MusThreadProxy::GpuSetHDCPStateCallback, 268 auto callback = base::Bind(&MusThreadProxy::GpuSetHDCPStateCallback,
269 weak_ptr_factory_.GetWeakPtr()); 269 weak_ptr_factory_.GetWeakPtr());
270 drm_thread_->task_runner()->PostTask( 270 drm_thread_->task_runner()->PostTask(
271 FROM_HERE, 271 FROM_HERE,
272 base::Bind(&DrmThread::SetHDCPState, base::Unretained(drm_thread_), 272 base::Bind(&DrmThread::SetHDCPState, base::Unretained(drm_thread_),
273 display_id, state, CreateSafeCallback(callback))); 273 display_id, state, CreateSafeCallback(callback)));
274 return true; 274 return true;
275 } 275 }
276 276
277 bool MusThreadProxy::GpuSetGammaRamp( 277 bool MusThreadProxy::GpuSetColorCorrection(
278 int64_t id, 278 int64_t id,
279 const std::vector<GammaRampRGBEntry>& lut) { 279 const std::vector<GammaRampRGBEntry>& degamma_lut,
280 const std::vector<GammaRampRGBEntry>& gamma_lut,
281 const std::vector<float>& correction_matrix) {
280 DCHECK(drm_thread_->IsRunning()); 282 DCHECK(drm_thread_->IsRunning());
281 DCHECK(on_window_server_thread_.CalledOnValidThread()); 283 DCHECK(on_window_server_thread_.CalledOnValidThread());
282 drm_thread_->task_runner()->PostTask( 284 drm_thread_->task_runner()->PostTask(
283 FROM_HERE, base::Bind(&DrmThread::SetGammaRamp, 285 FROM_HERE,
284 base::Unretained(drm_thread_), id, lut)); 286 base::Bind(&DrmThread::SetColorCorrection, base::Unretained(drm_thread_),
287 id, degamma_lut, gamma_lut, correction_matrix));
285 return true; 288 return true;
286 } 289 }
287 290
288 void MusThreadProxy::GpuCheckOverlayCapabilitiesCallback( 291 void MusThreadProxy::GpuCheckOverlayCapabilitiesCallback(
289 gfx::AcceleratedWidget widget, 292 gfx::AcceleratedWidget widget,
290 const std::vector<OverlayCheck_Params>& overlays) const { 293 const std::vector<OverlayCheck_Params>& overlays) const {
291 DCHECK(on_window_server_thread_.CalledOnValidThread()); 294 DCHECK(on_window_server_thread_.CalledOnValidThread());
292 overlay_manager_->GpuSentOverlayResult(widget, overlays); 295 overlay_manager_->GpuSentOverlayResult(widget, overlays);
293 } 296 }
294 297
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 display_manager_->GpuReceivedHDCPState(display_id, success, state); 330 display_manager_->GpuReceivedHDCPState(display_id, success, state);
328 } 331 }
329 332
330 void MusThreadProxy::GpuSetHDCPStateCallback(int64_t display_id, 333 void MusThreadProxy::GpuSetHDCPStateCallback(int64_t display_id,
331 bool success) const { 334 bool success) const {
332 DCHECK(on_window_server_thread_.CalledOnValidThread()); 335 DCHECK(on_window_server_thread_.CalledOnValidThread());
333 display_manager_->GpuUpdatedHDCPState(display_id, success); 336 display_manager_->GpuUpdatedHDCPState(display_id, success);
334 } 337 }
335 338
336 } // namespace ui 339 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/mus_thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698