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

Commit 8345034b authored by ramindani's avatar ramindani
Browse files

[HWC3] VTS client updates for onRefreshRateChangedDebug callback

And for setRefreshRateChangedCallbackDebugEnabled

This does not add any implementation for the VTS code.
Implementation will be added with the VTS tests as a followup.

Test: Device boots
BUG: 202734676
Change-Id: If47bbcf87698b346907b3bc1903908ff0a63203f
parent ff0da0bb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -124,6 +124,12 @@ GraphicsComposerCallback::takeLastVsyncPeriodChangeTimeline() {
    return ::ndk::ScopedAStatus::ok();
}

::ndk::ScopedAStatus GraphicsComposerCallback::onRefreshRateChangedDebug(
        const RefreshRateChangedDebugData&) {
    // TODO(b/202734676) Add implementation for Vts tests
    return ::ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}

::ndk::ScopedAStatus GraphicsComposerCallback::onVsyncPeriodTimingChanged(
        int64_t in_display,
        const ::aidl::android::hardware::graphics::composer3::VsyncPeriodChangeTimeline&
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ class GraphicsComposerCallback : public BnComposerCallback {
            const ::aidl::android::hardware::graphics::composer3::VsyncPeriodChangeTimeline&
                    in_updatedTimeline) override;
    virtual ::ndk::ScopedAStatus onVsyncIdle(int64_t in_display) override;
    virtual ::ndk::ScopedAStatus onRefreshRateChangedDebug(
            const RefreshRateChangedDebugData&) override;

    mutable std::mutex mMutex;
    // the set of all currently connected displays
+6 −0
Original line number Diff line number Diff line
@@ -373,6 +373,12 @@ int64_t VtsComposerClient::getVsyncIdleTime() {
    return mComposerCallback->getVsyncIdleTime();
}

ndk::ScopedAStatus VtsComposerClient::setRefreshRateChangedCallbackDebugEnabled(
        int64_t /* display */, bool /* enabled */) {
    // TODO(b/202734676) Add implementation for VTS tests
    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}

int64_t VtsComposerClient::getInvalidDisplayId() {
    // returns an invalid display id (one that has not been registered to a
    // display. Currently assuming that a device will never have close to
+3 −0
Original line number Diff line number Diff line
@@ -196,6 +196,9 @@ class VtsComposerClient {

    bool verifyComposerCallbackParams();

    ndk::ScopedAStatus setRefreshRateChangedCallbackDebugEnabled(int64_t /* display */,
                                                                 bool /* enabled */);

    // Keep track of displays and layers. When a test fails/ends,
    // the VtsComposerClient::tearDown should be called from the
    // test tearDown to clean up the resources for the test.