/* * Copyright (c) Hisilicon Technologies Co., Ltd.. 2016-2019. All rights reserved. * Description: Some callback interfaces of hwcomposer * Author: Hisilicon * Created: 2016.08.12 */ #ifndef HWC_CALLBACKS_H #define HWC_CALLBACKS_H #include #include #include namespace android { class HWCCallbacks { public: void Hotplug(hwc2_display_t display, HWC2::Connection state) const; void Refresh(hwc2_display_t display) const; void Vsync(hwc2_display_t display, int64_t timestamp) const; HWC2::Error Register(HWC2::Callback descriptor, hwc2_callback_data_t callbackData, hwc2_function_pointer_t pointer); HWCCallbacks(); ~HWCCallbacks(); private: hwc2_callback_data_t m_hotplugData = nullptr; hwc2_callback_data_t m_refreshData = nullptr; hwc2_callback_data_t m_vsyncData = nullptr; HWC2_PFN_HOTPLUG m_hotplug = nullptr; HWC2_PFN_REFRESH m_refresh = nullptr; HWC2_PFN_VSYNC m_vsync = nullptr; }; } // namespace android #endif // HWC_CALLBACKS_H