Documentation
¶
Overview ¶
Command replacedtexprobe checks #1082 on a GPU: a replaced screen's image, and the texture the painter made for it, are let go of with the walk of the frame that shows the new screen, with no frame after it.
It shows a 2048x2048 image under a RepaintBoundary for 2 s, so the painter draws it into a texture, replaces the content with a label, and then sits idle, collecting garbage every 250 ms and printing
REPLACED frames=N RESULT image=freed|KEPT after=... frames-since-replace=M
image=freed means the image is unreachable, which on WebGPU it can only be once the painter's Free released its texture and dropped the cache entry that held it. frames-since-replace counts the frames begun after the replace: the frame that shows the label is one, so 1 means nothing after it was needed. Before #1082 the texture cache kept the image until the first frame at least a minute after it was last drawn, so an idle window printed KEPT at the 20 s limit.
go run ./hack/replacedtexprobe
On Android, package it and read logcat for "replacedtexprobe".