From 9653ef4a9816748cb264f361a49ec700a68a1c0a Mon Sep 17 00:00:00 2001 From: mtlcl410 Date: Thu, 5 Nov 2026 20:33:54 +0800 Subject: [PATCH] M2: count a JPX soft mask's decodes now that it goes through the cache Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn --- crates/render/src/raster/tests.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/render/src/raster/tests.rs b/crates/render/src/raster/tests.rs index 68a823ca70..40a2410ba3 100644 --- a/crates/render/src/raster/tests.rs +++ b/crates/render/src/raster/tests.rs @@ -8190,7 +8190,10 @@ fn decoded_images_serve_every_size_they_are_drawn_at() { cache.decoded_image_decodes() }; assert_eq!(decodes("A"), 1, "a Flate image decodes the same at every size"); - assert_eq!(decodes("B"), 5, "a JPX soft mask decodes for the size it is drawn at"); + // The image and its JPX soft mask each decode once for each of the five sizes: the mask goes + // through the cache too since hayro-interpret patch 77, so its decodes are counted with the + // image's. + assert_eq!(decodes("B"), 10, "a JPX soft mask decodes for the size it is drawn at"); } /// A soft mask far larger than where its image is drawn is averaged down to that size and cached