Repository navigation
fix(core): a graded clip's canvas no longer comes out blank on a real GPU - #6615
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · reviewed 217ce51b, plus the comment-only a6e04242 that fixes Comments
The drawing-buffer guard keeps the source showing only when nothing has drawn yet. Once a clip has drawn, it hits the same blank canvas the PR fixes. ↓ inline
Scope and checks
- I ran
colorGrading.test.tslocally at the head: 112/112 pass. With main'scolorGrading.tsswapped in, the 3 tests the PR names on itsfails without the fix:line fail, as claimed. - The cap math and the requestVideoFrameCallback scheduling look right.
scheduleVideoDrawskips the call if a draw is already pending, and a paused video draws once and stops. - CI at
217ce51bwas cancelled whena6e04242was pushed.Commentswas red there (+5 comment lines), and the new head removes those lines.
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 166 of thoseThe gate passes. Quarantined, measured but not gated (0) |
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 changed
A graded video could show as a flat background instead of its footage in the preview: the grade drew a blank canvas and hid the source video under it. Two causes, both in the runtime's colour grading:
loadeddataandseekedarrive before the GPU can upload the frame, so that draw produced a blank canvas, and nothing redrew until the next seek. A video now also redraws once its frame is presented (requestVideoFrameCallback, a single draw when paused).What I measured
Real GPU: Chromium (Electron) on an Apple-silicon Mac, a 9 s montage with several graded clips, the preview page served by
hyperframes previewwith the runtime swapped for each build. After the page loads, the playhead goes to 0.4 s, 0, 0.4 s, 0, and each shown clip's grading canvas is read back.Three runs after the change gave the same readings. With the change, the frame at 0 matches
hyperframes snapshot, which shows ungraded footage there.What I did NOT exercise
fails without the fix:
caps a clip shown far larger than the screen to what a GPU can draw, keeping its shape,leaves the source showing when the drawing buffer cannot hold the canvas,gives a drawn clip back to its source when a later draw outgrows the drawing buffer, anddraws a paused video again once its frame is presented, after the first draw sampled nothinginpackages/core/src/runtime/colorGrading.test.ts; all four fail on main and pass here (113 of 113 in the file, three runs in a row).