| 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);
|
| }
|
|
|