diff options
Diffstat (limited to 'sdm')
-rw-r--r-- | sdm/libs/hwc2/hwc_display.h | 6 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_display_external.cpp | 4 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_display_external.h | 3 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_session.cpp | 4 |
4 files changed, 15 insertions, 2 deletions
diff --git a/sdm/libs/hwc2/hwc_display.h b/sdm/libs/hwc2/hwc_display.h index beed4255..3977e737 100644 --- a/sdm/libs/hwc2/hwc_display.h +++ b/sdm/libs/hwc2/hwc_display.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright 2015 The Android Open Source Project @@ -150,6 +150,10 @@ class HWCDisplay : public DisplayEventHandler { virtual int SetState(bool connected) { return kErrorNotSupported; } + virtual DisplayError Flush() { + return kErrorNotSupported; + } + int SetPanelBrightness(int level); int GetPanelBrightness(int *level); int ToggleScreenUpdates(bool enable); diff --git a/sdm/libs/hwc2/hwc_display_external.cpp b/sdm/libs/hwc2/hwc_display_external.cpp index 9d1ad6cc..bb4ea891 100644 --- a/sdm/libs/hwc2/hwc_display_external.cpp +++ b/sdm/libs/hwc2/hwc_display_external.cpp @@ -293,4 +293,8 @@ void HWCDisplayExternal::GetUnderScanConfig() { } } +DisplayError HWCDisplayExternal::Flush() { + return display_intf_->Flush(); +} + } // namespace sdm diff --git a/sdm/libs/hwc2/hwc_display_external.h b/sdm/libs/hwc2/hwc_display_external.h index fbee6a3d..5eb1704f 100644 --- a/sdm/libs/hwc2/hwc_display_external.h +++ b/sdm/libs/hwc2/hwc_display_external.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -49,6 +49,7 @@ class HWCDisplayExternal : public HWCDisplay { virtual HWC2::Error Present(int32_t *out_retire_fence); virtual void SetSecureDisplay(bool secure_display_active); virtual int SetState(bool connected); + virtual DisplayError Flush(); private: HWCDisplayExternal(CoreInterface *core_intf, HWCBufferAllocator *buffer_allocator, diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp index fa3d7664..7518b402 100644 --- a/sdm/libs/hwc2/hwc_session.cpp +++ b/sdm/libs/hwc2/hwc_session.cpp @@ -960,6 +960,10 @@ int HWCSession::DisconnectDisplay(int disp) { DLOGI("Display = %d", disp); if (disp == HWC_DISPLAY_EXTERNAL) { + DisplayError error = hwc_display_[disp]->Flush(); + if (error != kErrorNone) { + DLOGW("Flush failed. Error = %d", error); + } HWCDisplayExternal::Destroy(hwc_display_[disp]); } else if (disp == HWC_DISPLAY_VIRTUAL) { HWCDisplayVirtual::Destroy(hwc_display_[disp]); |