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

Commit f5f27128 authored by Antti Hatala's avatar Antti Hatala Committed by Erik Gilling
Browse files

surfaceflinger: give hwcomposer a chance to release buffers

Change-Id: I605fa779702022865dd58df3b36f37c2644ade36
parent 586a0deb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -292,6 +292,9 @@ void DisplayHardware::fini()
void DisplayHardware::releaseScreen() const
{
    DisplayHardwareBase::releaseScreen();
    if (mHwc->initCheck() == NO_ERROR) {
        mHwc->release();
    }
}

void DisplayHardware::acquireScreen() const
+5 −0
Original line number Diff line number Diff line
@@ -87,6 +87,11 @@ status_t HWComposer::commit() const {
    return (status_t)err;
}

status_t HWComposer::release() const {
    int err = mHwc->set(mHwc, NULL, NULL, NULL);
    return (status_t)err;
}

size_t HWComposer::getNumLayers() const {
    return mList ? mList->numHwLayers : 0;
}
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@ public:
    // commits the list
    status_t commit() const;

    // release hardware resources
    status_t release() const;

    size_t getNumLayers() const;
    hwc_layer_t* getLayers() const;