Skip to content

Pin Chromium rendering flags and instant scrolling so repeat loads paint the same pixels #127

Closed

Description

@tmashara

What
Launch Chromium with the flags that take threaded, time-dependent and host-dependent work out of painting, and make smooth scrolling instant on every element, not only html.

Why
launch() passes only --blink-settings (src/run.ts:847). @beprajwal/visual-diff, a replay-based visual diff tool, launches with:

  • --force-color-profile=srgb, --font-render-hinting=none, --disable-lcd-text, --disable-skia-runtime-opts: rasterisation that depends less on the host. It might narrow the macOS vs Linux gap that makes accepted entries OS-specific (docs/accepted.md). That is unproven.
  • --disable-threaded-animation, --disable-threaded-scrolling, --disable-checker-imaging: compositor-thread work and async image decode that can land between two shots of the same page.
  • --disable-background-timer-throttling, --disable-renderer-backgrounding: background pages under --concurrency keep their timers running.

They deliberately avoid --deterministic-mode: it implies --enable-begin-frame-control, and page.screenshot() then hangs on Linux headless.

Scrolling: STILL_CSS sets scroll-behavior: auto on html only (src/config.ts:218). An inner scroller styled scroll-behavior: smooth, or a before hook calling el.scrollIntoView({ behavior: "smooth" }), can be shot mid-scroll. They put the rule on *, *::before, *::after and rewrite behavior: "smooth" to "instant" in scrollTo, scroll, scrollBy and scrollIntoView from the init script.

How

  1. Measure first. Run base vs base on the visual fixtures and one real site, with the current args and with the new ones, on macOS and Linux. Compare unstable px, varies lines, retries, and how far apart the macOS and Linux pixel hashes are for the same page.
  2. Keep only the flags that move a number. Add the * scroll rule to STILL_CSS and the smooth-scroll rewrite to the init script in capture.ts. probe goes through launch(), so it gets the same flags.
  3. Pixels change, so every hash in an existing renderdiff.accepted.json stops matching once. The release notes must say so: re-accept on the platform that checks.

Activity

  1. added
    enhancement
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions