summaryrefslogtreecommitdiffstats
path: root/legacymm/PictureAdjustment.h
diff options
context:
space:
mode:
authorPaul Keith <javelinanddart@gmail.com>2019-01-19 18:03:15 +0100
committerdianlujitao <dianlujitao@lineageos.org>2019-02-04 11:35:34 +0800
commitce53d14f0645b6050c2b6358cf5488701ec3d0f4 (patch)
treef611009694c4121f41ccde09800964add9cd6a68 /legacymm/PictureAdjustment.h
parentc6e1c35a9c4c06ba8397cd67e835487527b1cc1d (diff)
downloadandroid_hardware_lineage_livedisplay-ce53d14f0645b6050c2b6358cf5488701ec3d0f4.tar.gz
android_hardware_lineage_livedisplay-ce53d14f0645b6050c2b6358cf5488701ec3d0f4.tar.bz2
android_hardware_lineage_livedisplay-ce53d14f0645b6050c2b6358cf5488701ec3d0f4.zip
livedisplay: legacymm: Wire it up
Change-Id: Ic580ceb333c361444d4e009db1a34ccca8fbbbfc
Diffstat (limited to 'legacymm/PictureAdjustment.h')
-rw-r--r--legacymm/PictureAdjustment.h37
1 files changed, 23 insertions, 14 deletions
diff --git a/legacymm/PictureAdjustment.h b/legacymm/PictureAdjustment.h
index 60a3b63..a578075 100644
--- a/legacymm/PictureAdjustment.h
+++ b/legacymm/PictureAdjustment.h
@@ -18,8 +18,6 @@
#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_PICTUREADJUSTMENT_H
#include <vendor/lineage/livedisplay/2.0/IPictureAdjustment.h>
-#include <hidl/MQDescriptor.h>
-#include <hidl/Status.h>
namespace vendor {
namespace lineage {
@@ -27,16 +25,18 @@ namespace livedisplay {
namespace V2_0 {
namespace legacymm {
-using ::android::hardware::hidl_array;
-using ::android::hardware::hidl_memory;
-using ::android::hardware::hidl_string;
-using ::android::hardware::hidl_vec;
+using ::android::sp;
using ::android::hardware::Return;
using ::android::hardware::Void;
-using ::android::sp;
-struct PictureAdjustment : public IPictureAdjustment {
- // Methods from ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment follow.
+class PictureAdjustment : public IPictureAdjustment {
+ public:
+ PictureAdjustment(void* libHandle);
+
+ bool isSupported();
+
+ // Methods from ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment
+ // follow.
Return<void> getHueRange(getHueRange_cb _hidl_cb) override;
Return<void> getSaturationRange(getSaturationRange_cb _hidl_cb) override;
Return<void> getIntensityRange(getIntensityRange_cb _hidl_cb) override;
@@ -44,14 +44,23 @@ struct PictureAdjustment : public IPictureAdjustment {
Return<void> getSaturationThresholdRange(getSaturationThresholdRange_cb _hidl_cb) override;
Return<void> getPictureAdjustment(getPictureAdjustment_cb _hidl_cb) override;
Return<void> getDefaultPictureAdjustment(getDefaultPictureAdjustment_cb _hidl_cb) override;
- Return<bool> setPictureAdjustment(const ::vendor::lineage::livedisplay::V2_0::HSIC& hsic) override;
+ Return<bool> setPictureAdjustment(
+ const ::vendor::lineage::livedisplay::V2_0::HSIC& hsic) override;
- // Methods from ::android::hidl::base::V1_0::IBase follow.
+ static void updateDefaultPictureAdjustment();
-};
+ private:
+ void* mLibHandle;
+
+ int (*disp_api_supported)(int32_t, int32_t);
+ int (*disp_api_get_pa_range)(int32_t, void*);
+ int (*disp_api_get_pa_config)(int32_t, void*);
+ int (*disp_api_set_pa_config)(int32_t, void*);
-// FIXME: most likely delete, this is only for passthrough implementations
-// extern "C" IPictureAdjustment* HIDL_FETCH_IPictureAdjustment(const char* name);
+ HSIC getPictureAdjustmentInternal();
+
+ HSIC mDefaultPictureAdjustment;
+};
} // namespace legacymm
} // namespace V2_0