Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8de78331 authored by Arun Kumar K.R's avatar Arun Kumar K.R Committed by Steve Kondik
Browse files

surfaceflinger: call perform function with custom events to HAL

- SF will call perform with event and value to inform HALS about
  custom events(external display, orientation change etc.,)
- remove actionsafe related functions.

CRs-Fixed: 341947
(cherry picked from commit ca1e7b9ee353bc4d2fdc2234d8860e84bbff74f1)

Change-Id: Icfe5f2f8ce56561c6959e206771b2850a3597e70
parent c09b5510
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -138,8 +138,6 @@ public:
#ifdef QCOM_HDMI_OUT
    //HDMI SPecific functions
    static void enableExternalDisplay(int disp_type, int enable);
    static void setActionSafeWidthRatio(float asWidthRatio);
    static void setActionSafeHeightRatio(float asHeightRatio);
#endif

    status_t    hide(SurfaceID id);
+3 −11
Original line number Diff line number Diff line
@@ -59,17 +59,9 @@ public:
    framebuffer_device_t const * getDevice() const { return fbDev; } 

#ifdef QCOM_HDMI_OUT
    void orientationChanged(int orientation) {
        if (fbDev->orientationChanged)
            fbDev->orientationChanged(fbDev, orientation);
    }
    void setActionSafeWidthRatio(float asWidthRatio) {
        if (fbDev->setActionSafeWidthRatio)
            fbDev->setActionSafeWidthRatio(fbDev, asWidthRatio);
    }
    void setActionSafeHeightRatio(float asHeightRatio) {
        if (fbDev->setActionSafeHeightRatio)
            fbDev->setActionSafeHeightRatio(fbDev, asHeightRatio);
    void orientationChanged(int event, int orientation) {
        if (fbDev->perform)
            fbDev->perform(fbDev, event, orientation);
    }
#endif

+1 −11
Original line number Diff line number Diff line
@@ -421,16 +421,6 @@ void DisplayHardware::dump(String8& res) const
#ifdef QCOM_HDMI_OUT
void DisplayHardware::orientationChanged(int orientation) const
{
    mNativeWindow->orientationChanged(orientation);
}

void DisplayHardware::setActionSafeWidthRatio(float asWidthRatio) const
{
    mNativeWindow->setActionSafeWidthRatio(asWidthRatio);
}

void DisplayHardware::setActionSafeHeightRatio(float asHeightRatio) const
{
    mNativeWindow->setActionSafeHeightRatio(asHeightRatio);
    mNativeWindow->orientationChanged(EVENT_ORIENTATION_CHANGE, orientation);
}
#endif
+2 −2
Original line number Diff line number Diff line
@@ -227,9 +227,9 @@ void HWComposer::dump(String8& result, char* buffer, size_t SIZE,
}

#ifdef QCOM_HDMI_OUT
void HWComposer::enableHDMIOutput(bool enable) {
void HWComposer::perform(int event, int value) {
    if (mHwc) {
        mHwc->enableHDMIOutput(mHwc, enable);
        mHwc->perform(mHwc, event, value);
    }
}
#endif
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ public:
    uint32_t getFlags() const;
#endif
#ifdef QCOM_HDMI_OUT
    void enableHDMIOutput(bool enable);
    void perform(int event, int value);
#endif

    // for debugging
Loading