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

Commit db8d150c authored by Ady Abraham's avatar Ady Abraham Committed by Android (Google) Code Review
Browse files

Merge "SF: resync to vsync on transaction." into main

parents 8b365021 c0209848
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -236,6 +236,7 @@ public:
        ftl::FakeGuard guard(kMainThreadContext);
        resyncToHardwareVsyncLocked(id, allowToEnable, modePtr);
    }
    void resync() override EXCLUDES(mDisplayLock);
    void forceNextResync() { mLastResyncTime = 0; }

    // Passes a vsync sample to VsyncController. Returns true if
@@ -498,7 +499,6 @@ private:
    bool throttleVsync(TimePoint, uid_t) override;
    // Get frame interval
    Period getVsyncPeriod(uid_t) override EXCLUDES(mDisplayLock);
    void resync() override EXCLUDES(mDisplayLock);
    void onExpectedPresentTimePosted(TimePoint expectedPresentTime) override EXCLUDES(mDisplayLock);

    // Returns the powered-on display with the highest refresh rate in |mDisplays| as the new
+1 −0
Original line number Diff line number Diff line
@@ -4832,6 +4832,7 @@ void SurfaceFlinger::setTransactionFlags(uint32_t mask, TransactionSchedule sche
    SFTRACE_INT("mTransactionFlags", transactionFlags);

    if (const bool scheduled = transactionFlags & mask; !scheduled) {
        if (FlagManager::getInstance().resync_on_tx()) { mScheduler->resync(); }
        scheduleCommit(frameHint);
    } else if (frameHint == FrameHint::kActive) {
        // Even if the next frame is already scheduled, we should reset the idle timer
+2 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ void FlagManager::dump(std::string& result) const {
    DUMP_ACONFIG_FLAG(monitor_buffer_fences);
    DUMP_ACONFIG_FLAG(readback_screenshot);
    DUMP_ACONFIG_FLAG(refresh_rate_overlay_on_external_display);
    DUMP_ACONFIG_FLAG(resync_on_tx);
    DUMP_ACONFIG_FLAG(vsync_predictor_rate_change_with_aligned_sequence);
    DUMP_ACONFIG_FLAG(unify_refresh_rate_callbacks);
    DUMP_ACONFIG_FLAG(vsync_predictor_recovery);
@@ -289,6 +290,7 @@ FLAG_MANAGER_ACONFIG_FLAG(graphite_renderengine_preview_rollout, "");
FLAG_MANAGER_ACONFIG_FLAG(increase_missed_frame_jank_threshold, "");
FLAG_MANAGER_ACONFIG_FLAG(monitor_buffer_fences, "");
FLAG_MANAGER_ACONFIG_FLAG(readback_screenshot, "")
FLAG_MANAGER_ACONFIG_FLAG(resync_on_tx, "");
FLAG_MANAGER_ACONFIG_FLAG(vsync_predictor_rate_change_with_aligned_sequence, "")
FLAG_MANAGER_ACONFIG_FLAG(unify_refresh_rate_callbacks, "");
FLAG_MANAGER_ACONFIG_FLAG(vsync_predictor_recovery, "");
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ public:
    bool increase_missed_frame_jank_threshold() const;
    bool monitor_buffer_fences() const;
    bool readback_screenshot() const;
    bool resync_on_tx() const;
    bool refresh_rate_overlay_on_external_display() const;
    bool vsync_predictor_rate_change_with_aligned_sequence() const;
    bool unify_refresh_rate_callbacks() const;
+10 −0
Original line number Diff line number Diff line
@@ -231,6 +231,16 @@ flag {
  bug: "384816457"
} # readback_screenshot

flag {
  name: "resync_on_tx"
  namespace: "core_graphics"
  description: "Resync to vsync on an incoming transaction"
  bug: "425994753"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
 } # resync_on_tx

flag {
  name: "skip_invisible_windows_in_input"
  namespace: "window_surfaces"