Loading services/surfaceflinger/Scheduler/Scheduler.h +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading services/surfaceflinger/SurfaceFlinger.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading services/surfaceflinger/common/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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, ""); Loading services/surfaceflinger/common/include/common/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading services/surfaceflinger/surfaceflinger_flags_new.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -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" Loading Loading
services/surfaceflinger/Scheduler/Scheduler.h +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading
services/surfaceflinger/SurfaceFlinger.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
services/surfaceflinger/common/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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, ""); Loading
services/surfaceflinger/common/include/common/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
services/surfaceflinger/surfaceflinger_flags_new.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -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" Loading