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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_device.cc

Issue 1028563003: Load and apply a vcgt table from an ICC file to the internal display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a vectore of tuples of RGB components for IPC Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_device.h" 5 #include "ui/ozone/platform/drm/gpu/drm_device.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/mman.h> 8 #include <sys/mman.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 #include <xf86drm.h> 10 #include <xf86drm.h>
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 bool DrmDevice::SetMaster() { 497 bool DrmDevice::SetMaster() {
498 DCHECK(file_.IsValid()); 498 DCHECK(file_.IsValid());
499 return (drmSetMaster(file_.GetPlatformFile()) == 0); 499 return (drmSetMaster(file_.GetPlatformFile()) == 0);
500 } 500 }
501 501
502 bool DrmDevice::DropMaster() { 502 bool DrmDevice::DropMaster() {
503 DCHECK(file_.IsValid()); 503 DCHECK(file_.IsValid());
504 return (drmDropMaster(file_.GetPlatformFile()) == 0); 504 return (drmDropMaster(file_.GetPlatformFile()) == 0);
505 } 505 }
506 506
507 bool DrmDevice::SetGammaRamp(uint32_t crtc_id,
508 const std::vector<uint16_t>& r,
509 const std::vector<uint16_t>& g,
510 const std::vector<uint16_t>& b) {
511 DCHECK(file_.IsValid());
512 TRACE_EVENT0("drm", "DrmDevice::SetGamma");
513 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, r.size(),
514 const_cast<uint16_t*>(&r[0]),
515 const_cast<uint16_t*>(&g[0]),
516 const_cast<uint16_t*>(&b[0])) == 0);
517 }
518
507 } // namespace ui 519 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698