Skip to content

Make CompositorScreenshot markers schema-based - #6261

Open
fatadel wants to merge 2 commits into
firefox-devtools:mainfrom
fatadel:issue-5303
Open

Make CompositorScreenshot markers schema-based#6261
fatadel wants to merge 2 commits into
firefox-devtools:mainfrom
fatadel:issue-5303

Conversation

@fatadel

@fatadel fatadel commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Main | Deploy preview

Screenshot markers had no schema, so the tooltip, the marker derivation and the string-table lookup all special-cased them.

They now have a marker schema, which needs two new field formats: screenshot-size, whose value is a { width, height } object, and screenshot-data-url, a string table index rendered as an image at the aspect ratio of a sibling screenshot-size field. The payload's windowWidth / windowHeight collapse into a single windowSize, and the tooltip is schema-driven.

They are also stored as start and end marker pairs named CompositorScreenshot <windowID> rather than instant markers, so the generic name-based pairing handles them and the special case in deriveMarkersFromRawMarkerTable is gone. CompositorScreenshotWindowDestroyed becomes the end marker of that window's last screenshot.

Notes:

  • A window that is never destroyed leaves its last screenshot open, so the derived marker is now incomplete. Same time range as before, but it changes the tooltip duration line and marker-table duration sorting.
  • The marker chart shows one row per window instead of one shared row, and CompositorScreenshotWindowDestroyed no longer has a row of its own.
  • Track ordering is unchanged: computeGlobalTracks still adds windows in first-screenshot order.

Closes #5303


Profile

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.
@fatadel
fatadel requested review from canova and mstange August 14, 2026 12:08
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.45223% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.77%. Comparing base (1198e50) to head (a0d2a93).
⚠️ Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/marker-schema.ts 84.61% 2 Missing ⚠️
src/profile-logic/processed-profile-versioning.ts 95.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6261      +/-   ##
==========================================
+ Coverage   83.73%   83.77%   +0.03%     
==========================================
  Files         350      350              
  Lines       37523    37610      +87     
  Branches    10543    10553      +10     
==========================================
+ Hits        31420    31507      +87     
  Misses       5676     5676              
  Partials      427      427              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make CompositorScreenshot markers schema-based

1 participant