Skip to content

Fix logic error causing unnecessary repeated SVG rasterization.#12104

Merged
vorporeal merged 2 commits into
masterfrom
david/fix-repeated-svg-rasterization-bug
Jun 2, 2026
Merged

Fix logic error causing unnecessary repeated SVG rasterization.#12104
vorporeal merged 2 commits into
masterfrom
david/fix-repeated-svg-rasterization-bug

Conversation

@vorporeal
Copy link
Copy Markdown
Contributor

@vorporeal vorporeal commented Jun 2, 2026

Description

Fixes an ImageCache hole that caused SVGs rendered at their intrinsic size to be rasterized again on every frame instead of reusing a cached rendered image. This also makes rendered-cache identity include fit behavior, because different fit modes can produce different pixels at the same final dimensions.

Adds regression coverage for intrinsic-size SVG reuse and for distinct same-size bitmap results produced by different fit modes.

Linked Issue

No linked issue.

Testing

  • ./script/run — verified SVG conversion logging occurred during initial materialization rather than repeating across subsequent rendered frames; the temporary diagnostic log was removed before submitting.
  • ./script/format
  • cargo check -p warpui_core
  • cargo nextest run -p warpui_core -E 'test(test_caches_svg_rendered_at_intrinsic_size) | test(test_different_fit_types_do_not_collide_in_rendered_image_cache) | test(test_evict_size_drops_arc_only_for_targeted_entry)'

Screenshots / Videos

Not applicable; this fixes internal rendering-cache behavior without changing the UI.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-NONE

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label Jun 2, 2026
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vorporeal vorporeal requested a review from jefflloyd June 2, 2026 22:12
@vorporeal vorporeal marked this pull request as ready for review June 2, 2026 22:12
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 2, 2026

@vorporeal

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR fixes the rendered image cache so SVGs rasterized at intrinsic size are cached and so cache entries distinguish fit behavior when the same requested bounds can produce different pixels.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@vorporeal vorporeal requested a review from liliwilson June 2, 2026 22:18
@vorporeal vorporeal merged commit 5c57b38 into master Jun 2, 2026
44 checks passed
@vorporeal vorporeal deleted the david/fix-repeated-svg-rasterization-bug branch June 2, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants