Skip to content

Oversample small SVG icons before rasterization#317

Closed
anthony-firn wants to merge 1 commit intopop-os:masterfrom
anthony-firn:anthony/small-svg-oversampling
Closed

Oversample small SVG icons before rasterization#317
anthony-firn wants to merge 1 commit intopop-os:masterfrom
anthony-firn:anthony/small-svg-oversampling

Conversation

@anthony-firn
Copy link
Copy Markdown

Oversample small SVG icons before rasterization

Summary

Small SVG icons are currently rasterized at their final draw size. That leaves very little coverage information for curved edges and diagonal strokes, which shows up as rough launcher and greeter icons at common 16-32 px sizes.

This change rasterizes small SVGs at 2x size in the shared wgpu and tiny_skia vector backends, then lets the existing image draw path scale them back down into the requested bounds.

Why this shape

  • It keeps the change in the shared renderer path instead of adding app-specific workarounds.
  • It only oversamples small icons, so the extra cache and raster cost stays bounded.
  • It applies to both renderer backends used by COSMIC surfaces.

Validation

  • Built cosmic-launcher against the patched renderer path.
  • Verified the centered launcher still rendered its result text correctly.
  • Compared launcher app-icon crops against the stock renderer output and confirmed visibly smoother small icons with no meaningful text regression.

@anthony-firn
Copy link
Copy Markdown
Author

Closing this for now to keep review focused on #318, which is the active renderer-side fix for the dock issue. This can be reopened later if a separate SVG follow-up still makes sense.

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