diff options
author | Ramkumar Radhakrishnan <ramkumar@codeaurora.org> | 2017-07-31 21:37:46 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-08-04 13:31:25 -0700 |
commit | 497b638a133add2e061e6b75796912d6de309697 (patch) | |
tree | 42b40571c3ad901d402104dd86e59e91fa969f3e /sdm/libs/hwc2/hwc_callbacks.h | |
parent | 0c689d47be3e7ad80d69c183958d32c210196496 (diff) | |
download | display-497b638a133add2e061e6b75796912d6de309697.tar.gz |
hwc2: Wait for RegisterCallback() from SF before sending events.
Surfaceflinger registers callback functions to be called from
hwcomposer on specific events like hotplug, vsync and screen refresh.
since surfaceflinger and hwcomposer are two different processes that
can run asynchronously. This causes hwcomposer to send an event to
surfaceflinger before surfaceflinger registers callback and results
in undefined behavior. So wait for callbacks to get registered by
surfaceflinger and send an event to surfacelinger.
Change-Id: I288e4d7dde8179cb4a119cdedad2877344c06dae
CRs-Fixed: 2085392
Diffstat (limited to 'sdm/libs/hwc2/hwc_callbacks.h')
-rw-r--r-- | sdm/libs/hwc2/hwc_callbacks.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sdm/libs/hwc2/hwc_callbacks.h b/sdm/libs/hwc2/hwc_callbacks.h index 015bf5d5..d3f4e529 100644 --- a/sdm/libs/hwc2/hwc_callbacks.h +++ b/sdm/libs/hwc2/hwc_callbacks.h @@ -40,9 +40,9 @@ namespace sdm { class HWCCallbacks { public: - void Hotplug(hwc2_display_t display, HWC2::Connection state); - void Refresh(hwc2_display_t display); - void Vsync(hwc2_display_t display, int64_t timestamp); + HWC2::Error Hotplug(hwc2_display_t display, HWC2::Connection state); + HWC2::Error Refresh(hwc2_display_t display); + HWC2::Error Vsync(hwc2_display_t display, int64_t timestamp); HWC2::Error Register(HWC2::Callback, hwc2_callback_data_t callback_data, hwc2_function_pointer_t pointer); |