diff options
author | Peiyong Lin <lpy@google.com> | 2019-04-10 17:06:09 -0700 |
---|---|---|
committer | Peiyong Lin <lpy@google.com> | 2019-04-11 14:00:33 -0700 |
commit | de3af81f47db7fec43e6c8da7a84d6b2bc79dafe (patch) | |
tree | c122a7fbc41c800ea4bec81f036093ca471b2ce2 | |
parent | b19125ea4fdef0a7567679d02695a53a6784dd90 (diff) | |
download | android_hardware_qcom_sdm845_display-de3af81f47db7fec43e6c8da7a84d6b2bc79dafe.tar.gz android_hardware_qcom_sdm845_display-de3af81f47db7fec43e6c8da7a84d6b2bc79dafe.tar.bz2 android_hardware_qcom_sdm845_display-de3af81f47db7fec43e6c8da7a84d6b2bc79dafe.zip |
Remove getDisplayBrightnessSupport register.
Brightness is already a per display capability, we don't need this API.
BUG: 130313275
Test: build
Change-Id: I56658285020307b0f1d2203b41de029075710239
-rw-r--r-- | sdm/libs/hwc2/hwc_session.cpp | 16 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_session.h | 4 |
2 files changed, 9 insertions, 11 deletions
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp index a2cd6f60..259c2049 100644 --- a/sdm/libs/hwc2/hwc_session.cpp +++ b/sdm/libs/hwc2/hwc_session.cpp @@ -321,6 +321,13 @@ void HWCSession::GetCapabilities(struct hwc2_device *device, uint32_t *outCount, *outCount = count; } +int32_t HWCSession::GetDisplayBrightnessSupport(hwc2_device_t *device, hwc2_display_t display, + bool *out_support) { + HWCSession *hwc_session = static_cast<HWCSession *>(device); + *out_support = display == HWC_DISPLAY_PRIMARY && hwc_session->brightness_fd_ != -1; + return INT32(HWC2::Error::None); +} + template <typename PFN, typename T> static hwc2_function_pointer_t AsFP(T function) { static_assert(std::is_same<PFN, T>::value, "Incompatible function pointer"); @@ -977,13 +984,6 @@ int32_t HWCSession::GetDisplayCapabilities(hwc2_device_t* device, hwc2_display_t return INT32(HWC2::Error::None); } -int32_t HWCSession::GetDisplayBrightnessSupport(hwc2_device_t *device, hwc2_display_t display, - bool *out_support) { - HWCSession *hwc_session = static_cast<HWCSession *>(device); - *out_support = display == HWC_DISPLAY_PRIMARY && hwc_session->brightness_fd_ != -1; - return INT32(HWC2::Error::None); -} - int32_t HWCSession::SetDisplayBrightness(hwc2_device_t *device, hwc2_display_t display, float brightness) { bool brightness_support = false; @@ -1145,8 +1145,6 @@ hwc2_function_pointer_t HWCSession::GetFunction(struct hwc2_device *device, return AsFP<HWC2_PFN_GET_DISPLAYED_CONTENT_SAMPLE>(GetDisplayedContentSample); case HWC2::FunctionDescriptor::GetDisplayCapabilities: return AsFP<HWC2_PFN_GET_DISPLAY_CAPABILITIES>(GetDisplayCapabilities); - case HWC2::FunctionDescriptor::GetDisplayBrightnessSupport: - return AsFP<HWC2_PFN_GET_DISPLAY_BRIGHTNESS_SUPPORT>(GetDisplayBrightnessSupport); case HWC2::FunctionDescriptor::SetDisplayBrightness: return AsFP<HWC2_PFN_SET_DISPLAY_BRIGHTNESS>(SetDisplayBrightness); default: diff --git a/sdm/libs/hwc2/hwc_session.h b/sdm/libs/hwc2/hwc_session.h index ea187bcf..303743b3 100644 --- a/sdm/libs/hwc2/hwc_session.h +++ b/sdm/libs/hwc2/hwc_session.h @@ -181,8 +181,6 @@ class HWCSession : hwc2_device_t, HWCUEventListener, IDisplayConfig, public qCli int32_t *out_support); static int32_t GetDisplayCapabilities(hwc2_device_t* device, hwc2_display_t display, uint32_t* outNumCapabilities, uint32_t* outCapabilities); - static int32_t GetDisplayBrightnessSupport(hwc2_device_t *device, hwc2_display_t display, - bool *out_support); static int32_t SetDisplayBrightness(hwc2_device_t *device, hwc2_display_t display, float brightness); @@ -197,6 +195,8 @@ class HWCSession : hwc2_device_t, HWCUEventListener, IDisplayConfig, public qCli static int Close(hw_device_t *device); static void GetCapabilities(struct hwc2_device *device, uint32_t *outCount, int32_t *outCapabilities); + static int32_t GetDisplayBrightnessSupport(hwc2_device_t *device, hwc2_display_t display, + bool *out_support); static hwc2_function_pointer_t GetFunction(struct hwc2_device *device, int32_t descriptor); // Uevent handler |