Make CompositorScreenshot markers schema-based - #6261
Open
fatadel wants to merge 3 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6261 +/- ##
==========================================
+ Coverage 83.82% 83.86% +0.03%
==========================================
Files 350 350
Lines 37744 37837 +93
Branches 10646 10661 +15
==========================================
+ Hits 31638 31731 +93
Misses 5677 5677
Partials 429 429 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
These markers had no schema, so both the tooltip and the string table
lookup for their image special-cased this marker type. Declaring every
field is also a prerequisite for storing marker payloads without
repeating their keys.
The schema uses two new field formats: screenshot-size, whose value is
a { width, height } object, and screenshot-data-url, which renders a
string table index as an image sized from a sibling screenshot-size
field. The payload now has a single windowSize field instead of
windowWidth and windowHeight.
Screenshot markers arrived as instant markers and were turned into intervals by a special case in the marker derivation, which also had to track the last screenshot of every window separately in order to close it. Putting the window ID in the marker name lets the ordinary name-based pairing handle them, so that special case is gone. Each window now gets its own row in the marker chart. CompositorScreenshotWindowDestroyed is the end marker of that window's last screenshot rather than a marker of its own. A window that is never destroyed leaves its last screenshot open, so the derived marker is extended to the end of the thread and marked incomplete.
The CompositorScreenshot schema now declares a timeline-screenshots display location. computeGlobalTracks uses the combined front-end and profile schema list to identify marker types for screenshot tracks instead of naming the payload type directly. Window IDs remain in first-screenshot order so global track indexes referenced by shared URLs stay stable.
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.
Main | Deploy preview
Screenshot markers had no schema and were handled by custom code in tooltip rendering, string-table lookup, marker derivation, and screenshot track creation.
They now use a marker schema. The
windowWidthandwindowHeightfields collapse intowindowSize: { width, height }, described by the newscreenshot-sizeformat. The newscreenshot-data-urlformat renders a string-table image URL using the aspect ratio of the siblingwindowSizefield. The schema also uses the newtimeline-screenshotsdisplay location to drive screenshot track creation.Screenshot markers are stored as start and end pairs named
CompositorScreenshot <windowID>, allowing generic name-based pairing.CompositorScreenshotWindowDestroyedcloses the last screenshot for its window.Notes:
incomplete. Its time range is unchanged, but tooltip duration and Marker Table duration sorting change.CompositorScreenshotWindowDestroyedrow.computeGlobalTracksstill adds windows in first-screenshot order.Closes #5303
Profile