summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinpeter <linpeter@google.com>2021-12-03 02:15:42 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-03 02:15:42 +0000
commitee64a0a29da2b38e98fcfb57bf04ecff98e3dabf (patch)
treef1cc1af1eaef964358e20c0cde57c53cbdd9c522
parentdf0e5c588e1e886ab0ad96b2a751a917b485c250 (diff)
parent97abc71ca5f3ac3f7bfa996aa559e0a6ae7f6733 (diff)
downloadgs101-ee64a0a29da2b38e98fcfb57bf04ecff98e3dabf.tar.gz
libhwc2.1: get display calibrated information am: 97abc71ca5
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/gs101/+/16191139 Change-Id: I599e8b7595655e3f902292bad55328954e0dcc45
-rw-r--r--libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp6
-rw-r--r--libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
index 4946899..117dd25 100644
--- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
+++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
@@ -1097,3 +1097,9 @@ bool ExynosPrimaryDisplayModule::isDisplaySwitched(int32_t mode, int32_t prevMod
return (device->getActiveDisplay() != mIndex) && (prevMode == HWC_POWER_MODE_OFF) &&
(mode != HWC_POWER_MODE_OFF);
}
+
+bool ExynosPrimaryDisplayModule::isColorCalibratedByDevice() {
+ const DisplayType display = getDisplayTypeFromIndex(mIndex);
+ IDisplayColorGS101* displayColorInterface = getDisplayColorInterface();
+ return displayColorInterface->GetCalibrationInfo(display).factory_cal_loaded;
+};
diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.h b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.h
index 679b20b..0339526 100644
--- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.h
+++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.h
@@ -119,6 +119,9 @@ class ExynosPrimaryDisplayModule : public ExynosPrimaryDisplay {
IDisplayColorGS101* displayColorInterface = getDisplayColorInterface();
return displayColorInterface->IsRrCompensationEnabled(display);
}
+
+ virtual bool isColorCalibratedByDevice();
+
virtual int32_t getColorAdjustedDbv(uint32_t &dbv_adj);
virtual void initLbe();