cockpitLayerTreeHasPlatformView function
Whether root's subtree contains a PlatformViewLayer.
RenderRepaintBoundary.toImage rasterizes only Flutter-drawn layers, so a
platform view layer in this tree is the deterministic signal that the
captured image silently excludes native content. The walk is a pure
traversal of already-built layers: it runs on the UI thread, allocates
nothing but sibling links, and never waits for a frame.
Implementation
bool cockpitLayerTreeHasPlatformView(Layer? root) {
return _layerTreeHasPlatformView(root, 0);
}