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

Commit d09c8b02 authored by Chia-I Wu's avatar Chia-I Wu Committed by Android (Google) Code Review
Browse files

Merge "graphics: composer should not die with its client"

parents c285859b 43398711
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -230,6 +230,8 @@ ComposerClient::ComposerClient(ComposerBase& hal)

ComposerClient::~ComposerClient()
{
    ALOGD("client destroyed");

    mHal.enableCallback(false);
    mHal.removeClient();

@@ -275,17 +277,23 @@ void ComposerClient::onHotplug(Display display,
        }
    }

    mCallback->onHotplug(display, connected);
    auto ret = mCallback->onHotplug(display, connected);
    ALOGE_IF(!ret.isOk(), "failed to send onHotplug: %s",
            ret.description().c_str());
}

void ComposerClient::onRefresh(Display display)
{
    mCallback->onRefresh(display);
    auto ret = mCallback->onRefresh(display);
    ALOGE_IF(!ret.isOk(), "failed to send onRefresh: %s",
            ret.description().c_str());
}

void ComposerClient::onVsync(Display display, int64_t timestamp)
{
    mCallback->onVsync(display, timestamp);
    auto ret = mCallback->onVsync(display, timestamp);
    ALOGE_IF(!ret.isOk(), "failed to send onVsync: %s",
            ret.description().c_str());
}

Return<void> ComposerClient::registerCallback(