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

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: Fix incorrect error message display Created 5 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 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 bool DrmDevice::SetMaster() { 469 bool DrmDevice::SetMaster() {
470 DCHECK(file_.IsValid()); 470 DCHECK(file_.IsValid());
471 return (drmSetMaster(file_.GetPlatformFile()) == 0); 471 return (drmSetMaster(file_.GetPlatformFile()) == 0);
472 } 472 }
473 473
474 bool DrmDevice::DropMaster() { 474 bool DrmDevice::DropMaster() {
475 DCHECK(file_.IsValid()); 475 DCHECK(file_.IsValid());
476 return (drmDropMaster(file_.GetPlatformFile()) == 0); 476 return (drmDropMaster(file_.GetPlatformFile()) == 0);
477 } 477 }
478 478
479 bool DrmDevice::SetGammaRamp(uint32_t crtc_id,
480 uint32_t size,
481 uint16_t* r,
482 uint16_t* g,
483 uint16_t* b) {
484 DCHECK(file_.IsValid());
485 TRACE_EVENT0("drm", "DrmDevice::SetGamma");
486 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, size, r, g,
487 b) == 0);
488 }
489
479 } // namespace ui 490 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698