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

Unified Diff: ui/ozone/platform/drm/host/drm_native_display_delegate.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, 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/host/drm_native_display_delegate.cc
diff --git a/ui/ozone/platform/drm/host/drm_native_display_delegate.cc b/ui/ozone/platform/drm/host/drm_native_display_delegate.cc
index c9054241de7e460e5864d703575d04febe468c62..cda5e2bac27760c818fb4b7768bf1606f973d4ae 100644
--- a/ui/ozone/platform/drm/host/drm_native_display_delegate.cc
+++ b/ui/ozone/platform/drm/host/drm_native_display_delegate.cc
@@ -10,6 +10,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_restrictions.h"
#include "base/threading/worker_pool.h"
+#include "base/tuple.h"
#include "ui/display/types/display_snapshot.h"
#include "ui/display/types/native_display_observer.h"
#include "ui/events/ozone/device/device_event.h"
@@ -210,6 +211,21 @@ bool DrmNativeDisplayDelegate::SetColorCalibrationProfile(
return false;
}
+bool DrmNativeDisplayDelegate::SetGammaRamp(const ui::DisplaySnapshot& output,
+ const std::vector<uint16_t>& r,
+ const std::vector<uint16_t>& g,
+ const std::vector<uint16_t>& b) {
+ if (r.size() != g.size() || g.size() != b.size())
+ return false;
+
+ GammaRampRGBData lut;
+ for (unsigned int i = 0; i < r.size(); ++i) {
+ lut.push_back(MakeTuple(r[i], g[i], b[i]));
+ }
+ proxy_->Send(new OzoneGpuMsg_SetGammaRamp(output.display_id(), lut));
+ return true;
+}
+
void DrmNativeDisplayDelegate::AddObserver(NativeDisplayObserver* observer) {
observers_.AddObserver(observer);
}

Powered by Google App Engine
This is Rietveld 408576698