Keep the last frame visible on manual pause (#3626)

Use the effective zero-copy profile to capture and restore presentation across manual pause and resume, without overriding a disabled preference.
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-12-03 07:39:12 -05:00
1 parent eeb10e02fd
commit f9eeef44ed
3 files changed
+39 -3

No files matched your search

@@ -6281,7 +6281,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
val back = {
if (restore.compareAndSet(false, true)) {
pauseCaptures--
if (!isDestroyed) WaylandCompositor.nativeSetZeroCopy(composedOutputFree())
if (!isDestroyed && zeroCopyActive()) WaylandCompositor.nativeSetZeroCopy(composedOutputFree())
}
}
uiHandler.postDelayed({ capturePausedFrame(manual = true, onDone = back) }, ZERO_COPY_SETTLE_MS)
@@ -1874,10 +1874,10 @@ object SessionPrefs {
prefs(context).edit().putBoolean(hdrKey(mode), on).apply()
}
fun zeroCopy(context: Context, mode: String): Boolean = prefs(context).getBoolean("zeroCopy.$mode", true)
fun zeroCopy(context: Context, mode: String): Boolean = prefs(context).getBoolean("zeroCopy.${prefMode(mode)}", true)
fun setZeroCopy(context: Context, mode: String, on: Boolean) {
prefs(context).edit().putBoolean("zeroCopy.$mode", on).apply()
prefs(context).edit().putBoolean("zeroCopy.${prefMode(mode)}", on).apply()
}
const val FPS_UNPACED = -1