diff options
author | YongWook Shin <yongwook.shin@samsung.com> | 2021-01-29 18:39:59 +0900 |
---|---|---|
committer | susi_su <susisu@google.com> | 2022-03-03 11:22:27 +0800 |
commit | 62fd46880e1fe9723143fc93e516d74c6a9d2a54 (patch) | |
tree | 1b3f2ed01a851135386c5026043bbe6a6d69b74e /libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp | |
parent | 74a8766e6d4fa38005042a319ea5e16585ec1b6d (diff) |
libhwc2.1: Add Histogram handling codes
It creates Histogram related functions and adds related
handling codes.
Bug: 197519352
Signed-off-by: YongWook Shin <yongwook.shin@samsung.com>
Change-Id: Ia0d3af1b278d6e984b4dbb7fcdc5dbba6acda2b0
Merged-In: Ia0d3af1b278d6e984b4dbb7fcdc5dbba6acda2b0
(cherry picked from commit d350b14c64ee443bd0c9e5d89b10df03ed1e5fbc)
Diffstat (limited to 'libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp')
-rw-r--r-- | libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp b/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp index e77d4ab..4f0a205 100644 --- a/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp +++ b/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp @@ -73,6 +73,8 @@ ExynosDeviceDrmInterface::ExynosDeviceDrmInterface(ExynosDevice *exynosDevice) ExynosDeviceDrmInterface::~ExynosDeviceDrmInterface() { mDrmDevice->event_listener()->UnRegisterHotplugHandler(static_cast<DrmEventHandler *>(&mExynosDrmEventHandler)); + mDrmDevice->event_listener()->UnRegisterHistogramHandler( + static_cast<DrmHistogramEventHandler *>(&mExynosDrmEventHandler)); mDrmDevice->event_listener()->UnRegisterTUIHandler(static_cast<DrmTUIEventHandler *>(&mExynosDrmEventHandler)); } @@ -88,6 +90,8 @@ void ExynosDeviceDrmInterface::init(ExynosDevice *exynosDevice) mExynosDrmEventHandler.init(mExynosDevice, mDrmDevice); mDrmDevice->event_listener()->RegisterHotplugHandler(static_cast<DrmEventHandler *>(&mExynosDrmEventHandler)); + mDrmDevice->event_listener()->RegisterHistogramHandler( + static_cast<DrmHistogramEventHandler *>(&mExynosDrmEventHandler)); mDrmDevice->event_listener()->RegisterTUIHandler(static_cast<DrmTUIEventHandler *>(&mExynosDrmEventHandler)); if (mDrmDevice->event_listener()->IsDrmInTUI()) { @@ -240,6 +244,15 @@ void ExynosDeviceDrmInterface::ExynosDrmEventHandler::HandleEvent(uint64_t times display->handleHotplugEvent(); } +void ExynosDeviceDrmInterface::ExynosDrmEventHandler::HandleHistogramEvent(void *bin) { + ExynosDisplay *primaryDisplay = mExynosDevice->getDisplay(HWC_DISPLAY_PRIMARY); + if (primaryDisplay != NULL) { + ExynosDisplayDrmInterface *displayInterface = + static_cast<ExynosDisplayDrmInterface *>(primaryDisplay->mDisplayInterface.get()); + displayInterface->setHistogramData(bin); + } +} + void ExynosDeviceDrmInterface::ExynosDrmEventHandler::HandleTUIEvent() { if (mDrmDevice->event_listener()->IsDrmInTUI()) { |