feat(engine): add experimental canvas renderer using drawElementImage API#198
Closed
miguel-heygen wants to merge 1 commit into
Closed
feat(engine): add experimental canvas renderer using drawElementImage API#198miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
… API Adds a new `--experimental-canvas` flag that uses Chrome's experimental CanvasDrawElement API to composite DOM directly onto a <canvas> before capturing screenshots. Benchmarks show ~25% faster frame capture (33.6ms vs 44.7ms/frame at 1920x1080) by skipping full page compositing. Requires Chrome 146+ with --enable-blink-features=CanvasDrawElement. Gracefully degrades to standard screenshot capture when the API is unavailable. Injects a <canvas layoutsubtree> wrapper at runtime via page.evaluate after the composition loads. Changes: - engine: Add "canvas" CaptureMode, canvasDrawElementCapture(), canvas wrapper injection in initializeSession - producer: Wire experimentalCanvas through RenderConfig - cli: Add --experimental-canvas flag to render command Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 2, 2026
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.

What
Brief description of the change.
Why
Why is this change needed?
How
How was this implemented? Any notable design decisions?
Test plan
How was this tested?