Fix logic error causing unnecessary repeated SVG rasterization.#12104
Merged
Conversation
Contributor
|
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 Powered by Oz |
Contributor
There was a problem hiding this comment.
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
jefflloyd
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes an
ImageCachehole 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/formatcargo check -p warpui_corecargo 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
CHANGELOG-NONE
Co-Authored-By: Oz oz-agent@warp.dev