refactor: centralize presentation render plans - #283
Open
nmfisher wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR centralizes swapchain attachment/renderability state in
RenderManager, and separates a platform presentation target from a view's raw Filament render target.View.setRenderTargetnow always means “bind this target directly to the Filament view”. The newView.setPresentationRenderTargetis the platform-facing entry point for changing the final output target. Its default implementation delegates tosetRenderTarget, while composite pipelines can override it to route intermediate targets without changing the low-level API's meaning.RenderManagernow exposes:setRenderables, for applying a group of view renderability changes before synchronizing the updated attachment listsgetViewAttachments, which returns one immutable, orderedList<ViewAttachment>containing the view, render order, and current renderability stateFilamentApp.capturetakes one attachment list before beginning the frame and uses it throughout both the primary render/readback loop and the WebGL completion frame. It renders only renderable attachments, while still reading every attached target for per-view diagnostics. This avoids mixing attachment state across async render-thread calls. The capture callback is also awaited, and the WebAssembly success path now resumes the render manager before returning.NativeTextureSurfaceManagernow deals exclusively in presentation targets. This removes its highlight-overlay-specific target routing and leaves ownership of composite routing with the view/pipeline that implements it.Adds coverage for attachment ordering, retained renderability, grouped updates, and immutability of the returned attachment list.
The
RenderManagerinterface now documents the full attachment lifecycle, ordering and ownership rules, the distinction between attachment and render-target routing, native/web completion semantics, and the teardown requirements for views and swapchains.