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

Unified 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 spang/oshima nits 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/drm/gpu/drm_device.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc
index fb5bbc8d4d080a2fcd397d1b3dc54801c853d3be..3aa3ee4eedffad7a5df40a7e376e5be7320576c0 100644
--- a/ui/ozone/platform/drm/gpu/drm_device.cc
+++ b/ui/ozone/platform/drm/gpu/drm_device.cc
@@ -504,4 +504,16 @@ bool DrmDevice::DropMaster() {
return (drmDropMaster(file_.GetPlatformFile()) == 0);
}
+bool DrmDevice::SetGammaRamp(uint32_t crtc_id,
+ const std::vector<uint16_t>& r,
+ const std::vector<uint16_t>& g,
+ const std::vector<uint16_t>& b) {
+ DCHECK(file_.IsValid());
+ TRACE_EVENT0("drm", "DrmDevice::SetGamma");
+ return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, r.size(),
+ const_cast<uint16_t*>(&r[0]),
+ const_cast<uint16_t*>(&g[0]),
+ const_cast<uint16_t*>(&b[0])) == 0);
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698