Skip to content

fix(app): preserve stroke fringe in dirty redraws - #230

Open
kivutar wants to merge 1 commit into
gogpu:mainfrom
kivutar:fix/dirty-clip-stroke-fringe
Open

fix(app): preserve stroke fringe in dirty redraws#230
kivutar wants to merge 1 commit into
gogpu:mainfrom
kivutar:fix/dirty-clip-stroke-fringe

Conversation

@kivutar

@kivutar kivutar commented Aug 18, 2026

Copy link
Copy Markdown

Summary

  • expand the framework-managed dirty clip by one logical pixel
  • preserve centered one-pixel borders and their antialiasing fringe during hover and focus redraws
  • add regression coverage for the padded dirty clip

Why

Framework-managed incremental redraw used the exact dirty widget bounds as its clip. Widget painters commonly center strokes on those bounds, so the clip removed the outer part of the stroke and its antialiasing fringe. This made button and text-field borders disappear during incremental hover or focus updates, especially at fractional scale.

The fix retains incremental rendering and adds only a one-logical-pixel margin around the existing dirty union; it does not force a full redraw.

Validation

  • reproduced with the Vulkan renderer at 1.25x scale in a nested widget tree
  • verified button-hover and text-field-focus redraws retain their borders
  • go test ./...
  • go vet ./...

@kivutar
kivutar requested a review from kolkov as a code owner August 18, 2026 05:05
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.

1 participant