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

Commit ae155199 authored by Leon Scroggins's avatar Leon Scroggins Committed by Android (Google) Code Review
Browse files

Merge "SF: Rename postComposition and related for clarity" into main

parents 70d90ba1 5b581496
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1341,7 +1341,7 @@ protected:
                newFrame->mRefreshes[0].mGpuCompositionDone.mFenceTime :
                FenceTime::NO_FENCE;
        // HWC2 releases the previous buffer after a new latch just before
        // calling postComposition.
        // calling onCompositionPresented.
        if (oldFrame != nullptr) {
            mCfeh->addRelease(nOldFrame, oldFrame->kDequeueReadyTime,
                    std::shared_ptr<FenceTime>(oldFrame->mRelease.mFenceTime));
+4 −4
Original line number Diff line number Diff line
@@ -4024,7 +4024,7 @@ bool Layer::isVisible() const {
    return getAlpha() > 0.0f || hasBlur();
}

void Layer::onPostComposition(const DisplayDevice* display,
void Layer::onCompositionPresented(const DisplayDevice* display,
                                   const std::shared_ptr<FenceTime>& glDoneFence,
                                   const std::shared_ptr<FenceTime>& presentFence,
                                   const CompositorTiming& compositorTiming) {
+4 −7
Original line number Diff line number Diff line
@@ -435,11 +435,8 @@ public:
    void updateCloneBufferInfo();
    uint64_t mPreviousFrameNumber = 0;

    /*
     * called after composition.
     * returns true if the layer latched a new buffer this frame.
     */
    void onPostComposition(const DisplayDevice*, const std::shared_ptr<FenceTime>& /*glDoneFence*/,
    void onCompositionPresented(const DisplayDevice*,
                                const std::shared_ptr<FenceTime>& /*glDoneFence*/,
                                const std::shared_ptr<FenceTime>& /*presentFence*/,
                                const CompositorTiming&);

+1 −1
Original line number Diff line number Diff line
@@ -1165,7 +1165,7 @@ void Scheduler::onNewVsyncPeriodChangeTimeline(const hal::VsyncPeriodChangeTimel
    }
}

bool Scheduler::onPostComposition(nsecs_t presentTime) {
bool Scheduler::onCompositionPresented(nsecs_t presentTime) {
    std::lock_guard<std::mutex> lock(mVsyncTimelineLock);
    if (mLastVsyncPeriodChangeTimeline && mLastVsyncPeriodChangeTimeline->refreshRequired) {
        if (presentTime < mLastVsyncPeriodChangeTimeline->refreshTimeNanos) {
+2 −2
Original line number Diff line number Diff line
@@ -281,8 +281,8 @@ public:
    // Notifies the scheduler about a refresh rate timeline change.
    void onNewVsyncPeriodChangeTimeline(const hal::VsyncPeriodChangeTimeline& timeline);

    // Notifies the scheduler post composition. Returns if recomposite is needed.
    bool onPostComposition(nsecs_t presentTime);
    // Notifies the scheduler once the composition is presented. Returns if recomposite is needed.
    bool onCompositionPresented(nsecs_t presentTime);

    // Notifies the scheduler when the display size has changed. Called from SF's main thread
    void onActiveDisplayAreaChanged(uint32_t displayArea);
Loading