-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Editor GPU: Support rendering strikethrough #285606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds strikethrough rendering support to the GPU-accelerated editor renderer. The implementation includes CSS validation for text-decoration properties, decoration style caching for strikethrough attributes, and canvas-based rendering of the strikethrough line.
Key Changes:
- Added support for text-decoration CSS properties (
text-decoration,text-decoration-line,text-decoration-style,text-decoration-color,text-decoration-thickness) - Extended decoration style cache to track strikethrough state and thickness
- Implemented strikethrough rendering in the glyph rasterizer using canvas fillRect
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/editor/browser/gpu/viewGpuContext.ts | Added text-decoration CSS properties to supported rules list and implemented validation logic for strikethrough-specific values |
| src/vs/editor/browser/gpu/renderStrategy/viewportRenderStrategy.ts | Added strikethrough and strikethroughThickness variables, parsing logic for text-decoration properties, and updated cache entry creation |
| src/vs/editor/browser/gpu/renderStrategy/fullFileRenderStrategy.ts | Applied same strikethrough handling as viewport strategy to maintain consistency between render strategies |
| src/vs/editor/browser/gpu/raster/glyphRasterizer.ts | Implemented canvas-based strikethrough rendering with positioning and thickness calculations |
| src/vs/editor/browser/gpu/css/decorationStyleCache.ts | Extended interface and cache implementation to include strikethrough and strikethroughThickness properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Fixes #233992