You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a7cb895
Browse filesBrowse the repository at this point in the historyBrowse files
Do not present the root surface when an external view embedder owns it (flutter#193000)
`GPUSurfaceVulkan` and `GPUSurfaceGLImpeller` both take
`render_to_surface` and return a no-op `SurfaceFrame` when it is false.
`GPUSurfaceVulkanImpeller` has no such flag, so with a compositor the
engine acquires an embedder image and presents it after every composited
frame.
The compositor has already presented that frame's layers. The root
present puts an unrendered image on top of them. An embedder holding a
single image sees nothing; one cycling a ring of scanout buffers sees
its frame replaced by whatever the ring handed back — one good frame,
then black, at a flip rate that still reads 60fps. That is what it
looked like on hardware before I found this.
Nothing can reach it today: with a compositor and Impeller on Vulkan the
embedder cannot build a render target at all, so the frame fails earlier
(flutter#187525). It becomes reachable with that fix, so the
gate is groundwork for it.
Also moves `DisposeThreadLocalCachedResources` ahead of the gate. It is
per-frame upkeep, not part of presenting, and leaving it after would
hand the compositor path a raster thread that holds its command and
descriptor pools for the life of the engine.
## Tests
Two in `gpu_surface_vulkan_impeller_unittests.cc`:
- `DoesNotPresentWhenNotRenderingToSurface` — no image acquired, none
presented, and the thread-local pools still released. Fails without the
gate; fails again if the dispose is moved back after it ("thread-local
pools survived a frame the compositor presented").
- `PresentsWhenRenderingToSurface` — the default still acquires, which
is what a compositor-less embedder relies on.
Verified against the failing behavior, not just green: reverting each
half of the change fails the matching assertion.
Second of six, from flutter#187525. Independent of the others;
conflicts textually with the third (both touch
`gpu_surface_vulkan_impeller.cc`), so whichever lands second wants a
rebase.
---------
Co-authored-by: Andy Wolff <[email protected]>
0 commit comments