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

Commit e9a02ec2 authored by Erik Gilling's avatar Erik Gilling Committed by Android (Google) Code Review
Browse files

Merge "surfaceflinger: give hwcomposer a chance to release buffers"

parents 3cab73e3 f5f27128
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;