T15: paint barrier — pump event loop until framebuffer is consistent

`webview.paint()` dispatches a render command to Servo's paint thread
asynchronously, so the subsequent `read_to_image()` raced the paint
thread and reliably returned cleared-white pixels on data: URLs (T10.8).
Clear `has_pending_frame` before dispatching paint, then spin the Servo
event loop until `notify_new_frame_ready` re-arms it or 32 ms elapse
(override via `ELY_PAINT_BARRIER_MS`). Bench: software path now ships
real RGBA bytes for 60 frames instead of all-white.
This commit is contained in:
2026-05-11 00:57:35 -04:00
parent 10d77135d9
commit 42b4e8c87b
2 changed files with 71 additions and 2 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ impl HostWebViewDelegate {
self.title.borrow().clone()
}
fn has_pending_frame(&self) -> bool {
pub(super) fn has_pending_frame(&self) -> bool {
self.has_pending_frame.get()
}