Skip to content

refactor(path-layer): share GLSL join output assembly - #10648

Merged
chrisgervang merged 2 commits into
masterfrom
codex/path-layer-join-tail
Nov 24, 2026
Merged

chrisgervang merged 2 commits into
masterfrom
codex/path-layer-join-tail

Conversation

@chrisgervang

@chrisgervang chrisgervang commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Follow up of #10647

Change List

  • PathLayer GLSL: select renderOffsetVec once, assemble join outputs once
  • Unit tests for all four ANTIALIASING/DASH_ENABLED variants

No golden images changed. Verified with headless unit tests and the WebGL path render suites.


Note

Low Risk
Low-risk shader refactoring with no behavioral changes, verified by unit tests across all shader preprocessor variants.

Overview
Refactors the PathLayer vertex shader to deduplicate line join and fragment varying calculations between antialiased and non-antialiased code paths.

Instead of duplicating the assignment block across conditional branches, the shader now defines a unified renderOffsetVec based on whether ANTIALIASING is enabled and computes joint outputs once. Also adds unit tests verifying preprocessed shader outputs across all combinations of antialiasing and dashed line modes.

Reviewed by Cursor Bugbot for commit d9b6746. Bugbot is set up for automated code reviews on this repo. Configure here.

@coveralls

coveralls commented Sep 3, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.755% (+0.003%) from 82.752% — codex/path-layer-join-tail into master

@greptile-apps

greptile-apps Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

This PR selects renderOffsetVec once, then shares the GLSL join output calculations.

  • PathLayer writes join outputs once after choosing the right extrusion offset.

Reviews (5) · Last reviewed commit: "Merge branch 'codex/path-style-dash-vary..." · Reviewed by Greptile

@athomct athomct left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks equivalent to me: in both the raw and the coverage-padded branches the corner offset, the path position and the vertex offset all used the same vector before, and they now share renderOffsetVec. Unit and WebGL render suites pass locally.

One optional idea: the new preprocessing test would still pass if vCornerOffset were later assigned the raw offsetVec while the extrusion stays padded. An assertion for vCornerOffset = renderOffsetVec; in all four variants would pin that too.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@ibgreen ibgreen added the chore label Nov 21, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

Base automatically changed from codex/path-style-dash-varyings to master November 24, 2026 22:01
@chrisgervang
chrisgervang force-pushed the codex/path-layer-join-tail branch from 53e4708 to d9b6746 Compare November 24, 2026 22:01

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@chrisgervang
chrisgervang added this pull request to the merge queue Nov 24, 2026
Merged via the queue into master with commit f9fe603 Nov 24, 2026
11 of 12 checks passed
@chrisgervang
chrisgervang deleted the codex/path-layer-join-tail branch November 24, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants