You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.0 KiB
36 lines
1.0 KiB
/*
|
|
* 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 <hardware/hwcomposer2.h>
|
|
#include <hardware/hwcomposer_defs.h>
|
|
#include <cstdint>
|
|
|
|
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
|