Fix black bottom-screen Mirror with HDR enabled (#3710)

* Keep Mirror frames readable with HDR enabled

* Exercise mirror capture messages in the native host queue test

* Preserve the HDR display fallback while Mirror is open
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-12-04 14:01:37 -05:00
1 parent 77fffa7592
commit b072cedd16
8 files changed
+87 -5

No files matched your search

@@ -6348,7 +6348,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
private fun holdComposedOutput(hold: Boolean) {
val wasHeld = composedHolds > 0
composedHolds = (composedHolds + if (hold) 1 else -1).coerceAtLeast(0)
val held = composedHolds > 0
if (held == wasHeld) return
WaylandCompositor.nativeSetMirrorCapture(held)
// Importable HDR is redirected by the compositor hold. Keep its layer-only fallback available.
if (zeroCopyActive()) WaylandCompositor.nativeSetZeroCopy(composedOutputFree())
}
@@ -333,6 +333,8 @@ public final class WaylandCompositor {
public static native void nativeSetZeroCopy(boolean on);
public static native void nativeSetMirrorCapture(boolean on);
public static native void nativeSetDisplayBufferDriver(boolean on);
public static native int nativeZeroCopyFrames();